LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN real time data logger

Hi:

I am a graduate student working on a project that involves Labview.  This is my first exposure to Labview so please bear with me. 

I have a cRIO 9024 with a NI 9853 CAN module.  At the moment I am trying to develop a data logger that will take CAN signals in real time and save them for later viewing.  Eventually, the data logger will be used in a hardware in the loop system, another topic I am new to.  A vehicle simulator has been developed that will act as the plant.  From my understanding, data will be sent from the simulator, converted to CAN signals and then logged.  The "ECU" will then take CAN signals sent out of the cRIO back to the model after converting them back to engineering units. 

What I am having a hard time with is knowing how to properly develop the data logger.  I have gone over some tutorials on data logging and I've looked through the CAN examples on labview.  Specifically, I am wondering if the channel API vi's are what I should be using and is there a way to save to a file the signals that go to the FIFO. 

Again, please excuse my low level of understanding on these things if I got something completely wrong.  Thank you.

 

 

 

0 Kudos
Message 1 of 8
(3,550 Views)

You can't use any of the NI-CAN vi's with that module on a cRIO.

 

You will have to program the FPGA in the RIO to recieve the CAN data and transmit it to the RIO.

 

Try see this: FPGA CAN Engine Reference Example

0 Kudos
Message 2 of 8
(3,540 Views)

You should really take a look into NI VeriStand. It has integrated support for logging CAN data and is designed to be used for HIL test systems (among other things).

Jarrod S.
National Instruments
0 Kudos
Message 3 of 8
(3,533 Views)

This link about VeriStand and CAN might be of interest to you.

Jarrod S.
National Instruments
0 Kudos
Message 4 of 8
(3,532 Views)

I'm trying to use the example but when it starts loading VI's it gets to some that it can't find.  I don't know where they are either?  Any ideas?

0 Kudos
Message 5 of 8
(3,516 Views)

dkfire,

 

I was able to get he vi's to show up but now when I try running the FPGA to compile it i get the following error.

 

an fpga I/O node, i/o method node, or i/o property node is connected to an i/o name control or constant that does not match the configuration of the node

 

It won't show me where the error is though. All I did was make a project with everything that was in the example.  Thanks for the help and quick responses.

 

 

 

0 Kudos
Message 6 of 8
(3,505 Views)

@Jarrod_S. wrote:

You should really take a look into NI VeriStand. It has integrated support for logging CAN data and is designed to be used for HIL test systems (among other things).


Jarrod_S: Before giving that suggestion, try looking up the OP's card. That CAN module is NOT a NI-XNET compatible card.

 

SRamirez :

I'll try it this weekend.

0 Kudos
Message 7 of 8
(3,491 Views)

dkfire,

 

I was able to finally set up a vi to log CAN data in engineering units.  I used the Frame to Channel conversion library but I've noticed that while some of the data seems fine, other parts are grossly wrong.  In other words, either the conversion from raw data to engineering units didnt work properly or the maximum and minumum was not upheld.  For example, I send in a signal for of the following bits, [2 42 51 13 15 7 51 10],

I have a scalling factor of 16 and a minimum and maximum of zero and 4000, respectively.  I end up with an array of [32, 26.4, 12.96, 3.04, -216.34375, 0, 0, 0]  Anyone else notice this issue with the conversion library vi's?

0 Kudos
Message 8 of 8
(3,436 Views)