Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-CAN with C#

Im planning to use C# (Visual Studio 2005) to control a NI PXI-8461/2. I just discovered that Measurement Studio does not support any CAN cards. So, my question is if there is an easy way to control the CAN card directly from C# and if there is any example code availible for this kind of task?
 
 
0 Kudos
Message 1 of 7
(9,234 Views)
 

Hello!

Please look at these resources:

What Programming Language APIs Does National Instruments Provide for CAN and DNET?
http://digital.ni.com/public.nsf/websearch/FF00FD7D7A77EB038625712A004FC52F?OpenDocument 

Where are the NI-CAN or NI-DNET examples located?
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019Pq9SAE&l=en-US

I have passed on your interest in a NI-CAN .NET API to the US.

 

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 2 of 7
(9,228 Views)
I am in the exact same situation. I have measurement Studio and am hoping to control a PCI-CAN card from C#. I've never done any managed code or CLI work before, and so I am having a hard time getting it to work. Has anyone ever been sucsessful in doing this? If so, would they mind sharing some sample code to show how it was done?
Thanks,
--ted
0 Kudos
Message 3 of 7
(8,934 Views)

I cheat a bit here as do the low level code in Borland Builder as a COM sever that I can use from C#.

I also need to run ECU code from vba hence my use of COM.

Then I just make a reference to the COM server and all the p-invoke stuff is sorted by VS.

If not you will have to do the p-invoke stuff yourself to rap the calls to your CAN driver, not to difficult but a bit of work needed.

Colin  

0 Kudos
Message 4 of 7
(8,739 Views)

I have just started to use the NI ECU CCP tool kit, Great product that got me out off a big hole..

I had an a2l file but no loader that works with a black box ECU from another manufacturer.

Our Internal one was full off bugs and I was assigned to fix it.

Most off my  development is now done in VS 2005 (installing VS 2008 today)

I would like to see a .NET rappers for this tool (and others) so that al the users off Measurement Studio  or just VS studio do not have to reinvent the wheel.

I have just started to develope modules for Teststand and will use VS instead of LabWindows or Labview.

 

Colin

Delphi Diesel Systems

 

 

 

 

 

  

 

 

 

 

 

 

0 Kudos
Message 5 of 7
(8,724 Views)

Hi Jammie

Both links are cop-outs by NI.

Lets see more commitment from NI for .Net users, after all .Net is a few years old now.

Excuses for not doing so are unacceptable.

Ta

 Colin 

Message 6 of 7
(8,722 Views)

Not so great as it did not work.

Colin

0 Kudos
Message 7 of 7
(8,710 Views)