Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

X-can sample project

Hey guys,

 

I´m getting started with the myRIO-1900 and try to connect it with my car via X-CAN module with OBD-II BD9 cable to collect and record data from my car.

 

I've installed Labview 2014, X-CAN, realtime module in my computer without any problem.

 

When I connected myRIO 1900 and X-CAN module with my Mercedes, launched "X-CAN for myRIO" under "sample project", it worked successfully and I can read data from Labview.

 

Question: What do all the data read mean in the labview, eg. what does identifier means and what does payload means? At first I thought they might be PID codes, but after browsing all the info online, I felt the data are not PID codes because they should start with P01 or P02. Is there a manual for me to review and learn? Or is there a weblink that can tell and translate these codes? 

 

Here is a snapshot of the result. Appreciate for the help.

labview data issue.jpg

0 Kudos
Message 1 of 5
(5,839 Views)

HI lichlich1,

 

I'm glad that you were able to get the example to run and read in values! That indicates that your NI hardware, drivers, and your program are working. 

 

The identifier is an ID from the device you are interacting with. In this case, it's probably the car's ODB controller. As for the payload, that is the actual data sent by the car to your program. It looks like it's displayed in hex.

 

As for the meaning of this data, that might rely on Mercedes. I would recommend looking for ODB codes. A quick search turned up this page as well as this more specific page of codes.

 

Hope this helps,

 

Andrew

Andrew T.
"His job is to shed light, and not to master" - Robert Hunter
0 Kudos
Message 2 of 5
(5,821 Views)

Hello,

 

It's a CAN Data. You need to decode this data to get the Actual signal values. For this, you need CAN data base.

 

Refer below links for some more information,

http://www.ni.com/white-paper/2732/en/

 

 

You can use NI XNET to convert CAN Frames to Signal values.

https://decibel.ni.com/content/docs/DOC-39793

Munna
0 Kudos
Message 3 of 5
(5,816 Views)
0 Kudos
Message 4 of 5
(5,811 Views)

Dear Poster,

 

You will need the CAN Database File (extension .cdf or .xml or .odx depending on the OEM), to decode these thousands upon thousands of signals and messages. Most are readily available for free to consumers and third-party developers from their websites - a quick google search yielded an amalgamated trove of these from every oem:

https://www.vboxautomotive.co.uk/index.php/en/customer-area/vehicle-can-database

use these with the XNET Database VIs to build your database into the myRIOs memory (or your PC memory) for decoding important signals like lighting status, door status, etc. etc.

Happy Digging!

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 5 of 5
(2,581 Views)