Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

OBD II Frame Data

New on the NI CAN here and am struggle on this for a while.

If I want to read the signal from OBDII, like RPM (PID: 0c), which Frame data I should use, expecially the payload? I can convert the RAW frame to signal.

I am using NI-XNET and NI9862, like this?

ID 7DF, Payload: 5 4 41 C

ID: 7E8, payload: 5 4 41 C

Anyone can share a simple VI for me as a start?

 

Any help would be apprecaited.

0 Kudos
Message 1 of 5
(4,261 Views)

So the OBDII data has a couple of ways of getting data.  The first level is just to read the raw frames being transmitted, and convert them to real world engineering units with something like a DBC.  This is covered in Part 5 of my CAN blog.  Another way of getting data is through the diagnostic requests which is also how to get or set multi-frame data.  This is by implementing the ISO-15765 protocol which allows for things like KWP2000, UDS, and Diagnostics.  NI has the Automotive Diagnostic Command Set, which is a toolkit which allows for easily using these protocols.  You can download a trial and see if it works for you. 

 

But at the end of the day this is just a software protocol on top of the normal CAN frame API.  This means you can implement this yourself if you think NI's toolkit isn't worth it, or you need to use it on non-NI hardware.  You'll probably use the Frame In Stream XNet session, combined with the Frame Out Stream, which would allow for reading and writing raw frames (Part 6).  As for what to send and receive you can look at my software implementation of the ISO-15765 (Part 8).  That example is for non-NI hardware but the functions in the state machine are the same.

Message 2 of 5
(4,256 Views)

Hi Hooovahh,

Your blog is very helpful and I got PCAN hardware work with labview because it. The ADCS trial's application works, I just want to try sth else before I buy the toolkit. 

I installed your ISO-15765 package but can't find it's location. I might miss sth and need read your blog again.

Thank you. 

0 Kudos
Message 3 of 5
(4,248 Views)

@agnis wrote:

Hi Hooovahh,

I installed your ISO-15765 package but can't find it's location. I might miss sth and need read your blog again.


After installing it and all dependencies (the one package here includes them all and should make it easy to get going), it should be found on the palette on your block diagram by going to the Hooovahh palette, and then the ISO 15765 subpalette.  Keep in mind that this implementation focuses on using it with non-NI hardware.  You can't just download it and use it with your device, but looking at the code (and specifically the state machine) you should get a good idea of the raw payload you need to send and receive.  If you replace the read and write calls with your own XNet calls it should work.

0 Kudos
Message 4 of 5
(4,245 Views)

Works now, I have to update the VIPM to install the palette. Also the the NI-Xnet bus monitor only shows the RX  frame. Thanks for your help.



@Hooovahh wrote:

@agnis wrote:

Hi Hooovahh,

I installed your ISO-15765 package but can't find it's location. I might miss sth and need read your blog again.


After installing it and all dependencies (the one package here includes them all and should make it easy to get going), it should be found on the palette on your block diagram by going to the Hooovahh palette, and then the ISO 15765 subpalette.  Keep in mind that this implementation focuses on using it with non-NI hardware.  You can't just download it and use it with your device, but looking at the code (and specifically the state machine) you should get a good idea of the raw payload you need to send and receive.  If you replace the read and write calls with your own XNet calls it should work.


@Hooovahh wrote:

@agnis wrote:

Hi Hooovahh,

I installed your ISO-15765 package but can't find it's location. I might miss sth and need read your blog again.


After installing it and all dependencies (the one package here includes them all and should make it easy to get going), it should be found on the palette on your block diagram by going to the Hooovahh palette, and then the ISO 15765 subpalette.  Keep in mind that this implementation focuses on using it with non-NI hardware.  You can't just download it and use it with your device, but looking at the code (and specifically the state machine) you should get a good idea of the raw payload you need to send and receive.  If you replace the read and write calls with your own XNet calls it should work.



@Hooovahh wrote:

@agnis wrote:

Hi Hooovahh,

I installed your ISO-15765 package but can't find it's location. I might miss sth and need read your blog again.


After installing it and all dependencies (the one package here includes them all and should make it easy to get going), it should be found on the palette on your block diagram by going to the Hooovahh palette, and then the ISO 15765 subpalette.  Keep in mind that this implementation focuses on using it with non-NI hardware.  You can't just download it and use it with your device, but looking at the code (and specifically the state machine) you should get a good idea of the raw payload you need to send and receive.  If you replace the read and write calls with your own XNet calls it should work.


 

0 Kudos
Message 5 of 5
(4,208 Views)