07-30-2020 10:59 AM
So I am trying to establish a communication between two devices, but for that I need to set some parameters to one of them via a CAN bus.
I happen to have the USB-8473 from NI and tried to use it ... unsuccessfully.
I have downlaoded the drivers, NI Max recognizes it, and I tried the CANOpen SDO example for USB CAN but it doesn't work, I keep receiving a dll error.
All of this is dating from 2008 and 2009 and I was wondering if there are some more recent stuff that I missed or how to set up a very easy communication so I can sent the parameters to my device. I have never used Can protocoll in the past and I am a bit confused.
Thanks in advance for any help.
Solved! Go to Solution.
07-30-2020 11:14 AM
Those older NI-CAN devices have since been replaced by similar XNet devices using the NI-XNet drivers. That isn't to say you can't use them, I'm just trying to explain why support for these older devices might not have as much discussions and help online.
From MAX you can open a manual panel by right clicking the device. There you can perform a read that just shows a stream of data coming in if there is a device sending data out. I'd start there because if you can't read data in this manual panel, then there's no reason to expect LabVIEW can. The main thing you'll need to get right is to match the baud rate of the device that is sending data. You'll also need to have the right amount of terminating resistors on the bus. If there is only two devices on the bus, then you need 2 120 ohm resistors between the CAN-H and CAN-L lines which are typically Pin-2 and Pin-7 on a DB-9.
Since you are new to CAN I'd also make sure you don't swap lines. This isn't a TX and RX that need to be swapped.
Also CANOpen is a standard on top of the standard CAN stuff, and I'd just start with the basic manual panel, and then the Help >> Find Examples from LabVIEW. This is where the NI-CAN examples are installed to.
I made a 12 part (so far) CAN blog that goes over lots of this and more here.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
15 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-31-2020 02:31 AM
Thanks for your answer.
Yep I'm aware of the reader in Max, I intend to use it and hope for the best.
There is already those two 120 Ohms resistors between my 2 devices so that shouldn't be a problem to remove one and siwtch it with my 8473 🙂
I'll have a look at your blog and the Xnet, never hurts to get updated hardware ...
08-11-2020 02:16 AM
In the end I used and mixed the examples provided by Labview CANOpen to transmit and receive data.
According to my colleague, it worked fine, so I'm just uploading it here, if ever it can help someone.