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: 

On Board Diagnostics Datalogging

Hi,

 

I am communicating with the On Board Diagnostics (through the can_h, can_l on the OBD connector) on an Audi A1, with a labview vi based on this example. I use a NI9862 with Xnet.

Now, I would like to log the data as quickly as possible. When I use tdms write, I get about 10 frames per second. Using the NI Bus Monitor (in MAX),  I can monitor my vag-com VCDS communicating with the ECU. The bus monitor statistics show about 16 frames/sec. And when I log using the VCDS, I only get about 6-7 frames/sec. Are these normal rates for the diagnose lines in cars?

 

I wonder what the Bus Monitor statistics frames/s rates would be when monitoring the communication between the labview VI and the ECU. Too bad I need a second ni9862 for that, which I dont have. Actually I wonder what the statistics would show for different diagnose scan tools. I will test that out tomorrow!

grtz

 

0 Kudos
Message 1 of 5
(6,254 Views)

Hi,

 

if you run the NI BusMonitor in the subordinate mode (same port as your LabVIEW VI) you should be able to log the CAN frames.

 

Hope this helps.

 

 

0 Kudos
Message 2 of 5
(6,222 Views)

What do you mean by subordinate mode? You mean in Measurements and Automatisation eXplorer? I wouldnt be able to log the CAN-frames send and received by the labview VI?

This link clearly says "A CAN application cannot use a streaming session on the same port as the bus monitor.  This is because the bus monitor already uses a streaming session and that type of session can only be opened once on a port"

 

As for the logging, I should specify that I'm interested in logging the data values only, not the whole CAN frames..

0 Kudos
Message 3 of 5
(6,219 Views)

@Corentinm wrote:

What do you mean by subordinate mode?


From the bus monitor go to Settings >> Interface and Database Settings and change the "Run Mode" from "Normal" to "Subordinate". This allows the bus monitor to connect to the bus but not interefere with the start/stop behavior of your application.

0 Kudos
Message 4 of 5
(6,205 Views)

when you check the VI

obd_ii_monitor_demo\obdii_monitor_demo\Top-Level Source\OBD Get Parameters.vi

you notice that in facht 9 OBD values are read from the ECU. Each OBD Read initiates a handshake which has performance limitations as well, the ECU may also take time to answer the OBD requests, TDMS logging takes some time (the Express VI may has some overhead) so the 10Hz log rate sounds reasonable to me.

0 Kudos
Message 5 of 5
(6,201 Views)