LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to log CAN frame without database using x net driver?

Dear all,

 

For an application, I would like to log every CAN frame that is sent on the Network using a NI 9862 CAN board, without using a database. I'm currently using LabView 2012 SP1.

The application will be on a test bench that is used to perform tests on a sensor that sends CAN frames. The sensor is in development and the database linked to this sensor evolves every day. That's why I would like to log data without taking into account any database.

 

Is it possible? How can I program this function?

I have seen that it's possible to create a cluster in memory (meaning no database file is required) but I don't manage to read a data.

 

Thank you for the time you will consider to this qustion.

 

Regards.

 

0 Kudos
Message 1 of 4
(3,763 Views)

Take a look at the 'CAN Input Stream to TDMS Logfile' example under 'XNET' in the example finder. It's an example that receives all CAN frames and logs them to a TDMS file.

 

The key points are to use a :memory: database, a 'frame in stream' session and then use the 'frame CAN' option of the Read VI - this will give you the basic CAN frame information (e.g. message ID, data bytes etc.). The 'raw' format used in the example is useful for binary storage of the CAN data and is the best way to store CAN data in a TDMS file.

 

You only need a database if you want to convert the CAN frames to signals or vice-versa.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 4
(3,740 Views)

Thanks a lot for your quick answer. This was helpful and I can now log every frames.

 

Kind regards.

0 Kudos
Message 3 of 4
(3,716 Views)

By the way you may find more help on topics like CAN over on the Automotive and Embedded Networks sub forum.  I'm not saying you won't get good help here (clearly you already did) but these more specialized forums might have a smaller community more equipt to answer your questions.  If you have another CAN question feel free to post there, or both locations and link from one to the other with a crosspost.

0 Kudos
Message 4 of 4
(3,685 Views)