03-08-2016 02:13 AM
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.
03-08-2016 04:12 AM
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.
03-09-2016 01:16 AM
Thanks a lot for your quick answer. This was helpful and I can now log every frames.
Kind regards.
03-09-2016 04:34 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord