LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface variables in a Labview code with CAN signals in a dbc file

I have an existing LabVIEW code to control a coolant loop. It has multiple variables like Coolant out temp, PID gains etc. I want to send these signals via CAN to an engine testing software called PUMA. I created the .dbc file with signals I want to send over CAN. My question is how do I interface/connect the variables in my Labview code with the corresponding signal in the database (.dbc) file? I am using the NI 9862 CAN module which requires me to use NI-XNET. I have attached the LabVIEW code for the coolant loop below.

 

Thank you.

0 Kudos
Message 1 of 3
(1,998 Views)

Hi Rinavp

 

    I see that you currently are acquiring data with DAQ, do you intend to also acquire the data with XNET?

 

    Regarding how to interface with the .dbc file, you could read the CAN data with an example that ships with the XNET driver in LabVIEW. In those examples you can select a frame from a database file, so you should be able to browse for your .dbc.

 

    Some examples you could take a look at are the ones in the hardware input and output>NI XNET>Intro to Sessions>Frame Sessions folder, such as the CAN Frame Input Single Point.vi. 

 

    The front panel of that VI has a control for the frames that allows you to look for the database file. 

0 Kudos
Message 2 of 3
(1,968 Views)

Create a database alias for your xnet session, your, you can then select which signals to output with a single out single-point or whatever method you choose.

0 Kudos
Message 3 of 3
(1,944 Views)