03-24-2015 01:15 PM - edited 03-24-2015 01:31 PM
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 1: 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?
Question 2: Do you guys know how can I record all the data that read from my vehicle and export them to Excel file? I tried to add "File I/O" and "Measure to write" followed by the instructio online, but there was not excel file generated after the run. Any suggestions?
Here is a snapshot of the project result. Appreciate for the help.
03-25-2015 09:45 AM - edited 03-25-2015 09:45 AM
There is TONS of documentation on CAN buses. From various hardware and software implementations and a bunch of other variations that can make working with it difficult.
On the surface everything is easy, you just read and write frames, as described here
http://en.wikipedia.org/wiki/CAN_bus
Frames are just raw data that you can then do things with. A frame consistes of an ID which identifies the message and also does things like sets priority of the message. Then the payload is 0-8 bytes (excluding CAN-FD). These 0-8 bytes are the usable parts of the message. Protocols have been written to support multi frames, and request reply, among several other features not supported in the hardware.
Basically you have a lot of reading to do. Find all the documentation you can on CAN and how it works knowing that it starts at the frame level which is what you get. You might even get something out of the first few slides of a recent presentation I did on CAN and XNET.
https://decibel.ni.com/content/docs/DOC-41749
As for recording the data. The most common way is to format it into a 2D array of string, and then use the write measurements to file, or write spreadsheet to create a CSV file that Excel can open. There are other options that are usually more messy, but can be done.
EDIT: Oh and you might get better support from CAN related questions over on the Automotive subforum.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-25-2015 10:13 AM
04-01-2018 07:15 AM
Can you please share the .vi of sample given in software. I get a "error 1055" when I try to open the example. tried on LabVIEW 2015(supplied with the myRIO Bundle) and also LabVIEW 2017. Still get the same issue.
Please help
@lichlich1 wrote:
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 1: 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?
Question 2: Do you guys know how can I record all the data that read from my vehicle and export them to Excel file? I tried to add "File I/O" and "Measure to write" followed by the instructio online, but there was not excel file generated after the run. Any suggestions?
Here is a snapshot of the project result. Appreciate for the help.
04-02-2018 04:12 PM
Hi Kaushalm,
This post is 3 years old. Try making a new post with the following information:
Regarding error 1055, that's a generic one where LabVIEW doesn't understand the reference you're using. Try disabling any startup applications. Check out this KB for some insight.
BDog
06-16-2018 10:11 AM
hi,
i have the same problem!
have you found a solution ?
thank you