Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Lack of CAN documentation for beginner

Solved!
Go to solution

Dear Labview Users,

I'm trying to interface with a CAN customer device, with a provided .dbc file, using the USB-8502 device.

I would like to better understand the difference between the NI-XNET and the NI-CAN channel API mentioned here https://www.ni.com/it-it/support/documentation/supplemental/06/the-ni-can-channel-api.html. Furthermore, I would like to understand how to get the .vi mentioned for the ni-can-channel-api (as the CAN Init Start .vi), since I was not able to found them.

In the specific, I would like to understand how to send a single signal (described in the .dbc file) and wait for a response.

Thank you very much for all your support

0 Kudos
Message 1 of 3
(3,017 Views)
Solution
Accepted by topic author Raffa87

As with all NI toolkits, the best place to look is the examples.  Once a toolkit is installed it usually comes with a variety of examples showing code doing common tasks.  These aren't setup for a full application, but usually highlight one feature of the toolkit and then expects the developer to integrate that with their full application.

 

So for NI-CAN and NI-XNet the examples can be found by running LabVIEW, then going to the Help >> Find Examples menu.  From here you can search for things, or find all examples from that toolkit.

 

As for the differences.  NI-CAN is legacy, and really has barely been updated in the last 10 years.  Taking it's place is XNet.  And while the XNet drivers can do all things the NI-CAN can and lots more, they do take a different approach and some people have a hard time understanding the best way to use them.  I highly recommend you don't consider using NI-CAN for projects where NI-XNet API can be used.  You might be able to get it to work, but there will be more help, examples, and support if you just take the plunge with XNet.

 

Signal and frame conversion can be done a few ways.  Ignoring NI-CAN for a second my first suggestion is to just use the XNet API.  It allows for you to import a database, and read and write values as doubles in engineering units.  If you want you can also convert raw frames to signals and back using the XNet API, or I've also re-written this conversion in raw G for efficiency, and non-XNet hardware.

 

I have a CAN blog, that you might find interesting.  Most useful will probably be Part 3, Part 5, and Part 6.

0 Kudos
Message 2 of 3
(2,988 Views)

Dear Hoovahh,

really thank you for your answer. I will really read your blog, it seems very clear and detailed

0 Kudos
Message 3 of 3
(2,984 Views)