LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW and CAN getting started programming

Solved!
Go to solution

Hi!

I am new to CAN and LabVIEW communication. I am trying to write and read a message from a CAN bus. I have LabVIEW 2015 SPI. I was reading through the NI-CAN Hardware and Software Manual and in chapter 7 Channel API for Labview (pg 128) and it said to use some blocks that are not available to me. I was wondering where I could find these blocks and if thereare any resources out there for just starting out with CAN communication.   

 

Here is the link for the CAN Hardware and Software: http://www.ni.com/pdf/manuals/370289k.pdf

0 Kudos
Message 1 of 4
(5,093 Views)

Which CAN hardware are you using? That will determine the appropriate driver for you to download and install. NI-CAN is the older driver but still used for the USB CAN modules. Newer hardware uses X-NET. To get the NI-CAN functions mentioned in the linked manual, you need to install NI-CAN, which is available on the NI website and might also be on the drivers disk that comes with LabVIEW.

Message 2 of 4
(5,053 Views)

Hi!

I ordered the NI USB-8473s, it's the high-speed CAN, USB interface with synchronization, I have yet to receive it and I was hoping to get so coding done before it gets here. Is the manual I linked is that the correct manual to look at for this CAN device? 

0 Kudos
Message 3 of 4
(5,018 Views)
Solution
Accepted by topic author mkapler1

These cheap little USB CAN devices are a bit limiting when compared to the new hardware.  Don't get me wrong you can still read/write frames with it, but it doesn't nativly support retransmitting frames, or converting frames to signals and signals to frames.  This means that any timing involvolved in sending the messages need to be told from the PC.  Newer CAN devices like NI's XNet hardware can handle the retransmit, and frame/signal conversion on the hardware.  Just be aware some information and help on CAN might relate to one set of hardware and API while what you have uses the NI-CAN API not NI-XNet, both are currently supported and maintained.

 

As for examples after you install NI-CAN go to the Help >> Find Examples and look for some examples.  The basic one is the Transmit Receive same Port.vi which takes a CAN port and can read and write CAN frames.  You'll also notice there is a CAN port 256 and 257.  These are virtual CAN ports and writing on one, will be sent to the other.  So you can actually write to CAN256 and read what you wrote on CAN257.  This is great for testing things out before you have hardware.

Message 4 of 4
(4,993 Views)