From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Logging J1939 signals with other physical channels (NI 9862)?

I have experience with DAQ systems but am new to NI and Labview. To start I need some direction on logging J1939 signals with the NI 9862, for instance logging vehicle speed, rpm, temperatures over time. I have used the BUS monitor to verify my database and hardware is working. I also looked through some examples but haven't found what I need yet.

 

My end goal is to be able to log physical channels like strain gages and accelerometers with J1939 signals. So if I was collecting strain data I could reference J1939 data to see what the vehicle speed or RPM was.

 

My prior experience is with Somat eDAQ equipment which is more user freindly (and more expensive) when you want to log CAN and physical channels in one time history.  

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

Well if you are new to NI and LabVIEW I suggest the free training.

 

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide 

Learn NI Training Resource Videos

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

 

Beyond that what you will be needing to do is reading CAN data, likely with the XNet Read using the XY format.  When you use the Create Session you'll need to specify it there as well.  There are shipped examples in the Help >> Find Examples, search for the CAN Signal Input XY.vi example.  Perform a read periodically and it will return all data that has been read into the buffer since the last read.  This will give the data for each signal specified, and a time that the signal was read.

 

I suggest loggin this in TDMS.  There are several shipped examples on how to do this but the basic idea is you write N signals for N channels.  Meaning a 1D array of strings will have your signal names (like RPM, Speed, Temperature) and you'll have a 2D array of values, one dimension is for each signal, the other is for each sample.

 

As for DAQ it depends on your hardware but generally you'll use the DAQmx functions to perform a continuous analog read set to some sampling rate.  This read will return a waveform (which is has time and sample rate along with samples) for each signal.  This can also be written to TDMS in seperate channels, or in seperate groups in channels, organization is up to you.

 

For viewing your data you can use Diadem, or the Excel add on for TDMS, Scout by SignalX, or the one shipped with LabVIEW called TDMS File Viewer which is on your File I/O palette.

 

If you have any specific questions feel free to come back to the forums and post what you go so far.

0 Kudos
Message 2 of 2
(3,144 Views)