Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Import CANdb from LabVIEW

Hello, is it possible to import a CANdb file (.ncd) into MAX programmatically from LabVIEW, rather than having to do it manually from MAX?
Thanks,
Sima Azar
 
0 Kudos
Message 1 of 4
(4,358 Views)

Hi Sima!
Unfortunately, importing a .ncd file to MAX programatically in LabVIEW is not possible at this time.  If a configuration in MAX is not necessary, you can create messages and channels during runtime in LabVIEW, but there is no channel name or message name created.  So, everything you create during runtime is created temporarily as a handle, and identification is possible only by the message ID or handle.  Unfortunately, it is not possible to save these created messages within MAX or a file because the channel API is always related to a database or database file. Therefore, you must create the channels first in a file or in MAX in order to use them at a later time.

I hope this information is helpful, but let me know if you have any questions!  Best of luck to you and have a great day!

Chris R.
Applications Engineer
National Instruments

Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,344 Views)
Hi Sima,

Maybe there is another option:
If you just want to use the channel and message names from the CANdb file in LabVIEW, then you don't have to import that file into MAX at all. The CAN Init, CAN InitStart and CAN Get Names VIs have an optional input ('filepath') that you can use to reference the CANdb file directly.

-B2k
Message 3 of 4
(4,341 Views)
I liked the 'filepath' option. Thanks for your suggestions!
0 Kudos
Message 4 of 4
(4,323 Views)