LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Learn CAN by communicating with a CAN device (IVTS) using CAN USB.

Solved!
Go to solution

Thank you very much, thats a good idea. I have never worked with CAN. So maybe that is exactly what I have to do. Very good idea and thank you. 

0 Kudos
Message 11 of 16
(536 Views)

Yes I highly recommend checking out my CAN blog if you are new to CAN.  Additionally Peak CAN has a few drivers floating around some are free some are paid.  Here is an older set of drivers on LAVA that I think should give a basic understanding of how it works.  It uses the PCAN DLL so it might only work in LabVIEW 32 bit unless you can find the equivalent 64 bit DLLs.

0 Kudos
Message 12 of 16
(521 Views)

can you send me the link to your blog

0 Kudos
Message 13 of 16
(515 Views)

@govindsankar wrote:

Oh ok, thank you for that info. So we can only program via CAN only if we use NI devices. 


Is your goal to learn CAN, or to learn NI-XNET?

 

You can learn CAN just fine with any hardware. Also, LabVIEW can work with it with just about any hardware, you just may need to use the C interface rather than one provided by NI. I have done plenty of CAN work with LabVIEW, almost exclusively with PCAN-USB adapters.

 

There is a paid driver out there, but honestly I think aside from maybe having a couple VERY basic example VIs and a few documentation tweaks, it's pretty much just what the Import Shared Library wizard spits out repackaged.

 

Steps to get started if you still want to use this device:

 

  1. If you have done a full driver install it should have already installed the PCAN-Basic DLLs in your system folders, but it doesn't include development resources. Go here and download the PCAN-Basic API development kit to get the headers and documentation for this API: https://www.peak-system.com/PCAN-Basic.239.0.html?&L=1
  2. Start here for guidance on how to use the Import Shared Library wizard to create a LabVIEW library that utilizes those DLLs: https://www.ni.com/docs/en-US/bundle/labview/page/importing-functions-from-a-shared-library-file.htm...
  3. Consult the documentation and examples that come with the API development kit to understand how to utilize the API. It's really pretty easy, especially if polling for received data is sufficient for your needs.

Honestly, it has been a couple years... I don't think much, if any, tweaking was required to get the imported libraries working, but I could be misremembering.

0 Kudos
Message 15 of 16
(501 Views)

Actually both. But more specifically NI XNET, because when the hardware for the project is ready I will need to use NI XNET to program, so i need to know that more but still it will be important to know what I am programming and how to communicate etc. Thats why I need to understand CAN. 

0 Kudos
Message 16 of 16
(489 Views)