REXDESKREXGEN 1REXGEN 2REXGEN 2 IMU GNSSREXGEN AirREXGEN ProManual

REXGEN: log OBD2 Mode 1 PIDs

Updated

Make any REXGEN logger ask a vehicle for standard OBD-II Mode 1 parameters, such as engine speed and coolant temperature. Then record the answers and decode them with a DBC file. You need REXDESK and a logger connected to the vehicle's OBD socket.

How Mode 1 logging works

OBD-II is designed for emission control. It defines a broad set of standard parameter IDs (PIDs) that most vehicles answer. A logger does not see these values on the bus unless it asks for them. The REXGEN logger sends a request for each PID at a fixed interval. The engine ECU answers, and the logger records both.

Requesting engine speed (PID 0C) with OBD-II mode 01 OBD-II · MODE 01 Requesting engine speed (PID 0C) with OBD-II mode 01 Request: tester to every engine-related ECU (functional address) ID 7DF 02 01 0C pad pad pad pad pad length mode PID Response: engine ECU to tester ID 7E8 04 41 0C 1A F8 pad pad pad length mode + 40 PID A B Engine speed, PID 0C rpm = (256 × A + B) / 4 = (256 × 0x1A + 0xF8) / 4 = (6656 + 248) / 4 = 1726 rpm length: how many bytes follow. A positive reply adds 40 to the mode. With 29-bit identifiers the request goes to 18DB33F1 and replies come from 18DAF1xx, where xx is the ECU address. Unused bytes are padding.

Mode 1 (service 01) and its PIDs are defined in SAE J1979. For the background, see on-board diagnostics basics.

Set up the requests

  1. Create a new project. Select New Project in REXDESK.
  2. Add a periodic transmission. Drag the Periodic tool from Transmitting into the Output area of the configuration window.
    REXDESK Tools panel with the Periodic tool highlighted under Transmitting, and the Output area of the Configuration panel highlighted as the drop target
  3. Set up the bus. If the bus is not configured yet, drag Log All onto it, select its Bus icon and set the bit rate. Use Bit Timing for advanced settings.
  4. Add one request per PID. In the Periodic messages window, select Add for each request and fill in its fields.
    Periodic messages window with four rows on ident 0x7DF, the first with a 100 ms period on CAN 0 and three linked rows with a delay of 1, each CAN Standard with DLC 8 and data 02 01 followed by the PIDs 0A, 05, 0C and 0D
    Four Mode 1 requests: fuel pressure, coolant temperature, engine speed and vehicle speed.
  5. Send the configuration. Select Run to send it to the logger. Keep Log All on the bus so the logger records the answers.
Ident
The CAN identifier of the request. 7DF is the standard 11-bit OBD-II broadcast (functional) request. The main engine ECU answers on 7E8. Some vehicles need physical addressing, a request sent to one ECU, for example 7E0.
Linked
Links a message to the one above, so they go out as a sequence. Optional.
Period
How often the request is sent. Optional.
Delay
The delay before a linked message is sent. Optional.
CAN 0 to CAN 3
The bus that carries the request. Use only the channels your logger has.
Type
CAN Standard (11-bit) or Extended (29-bit) identifier.
DLC
The data length, in bytes. OBD-II requests use 8.
Data
The request bytes, for example 02 01 0C 00 00 00 00 00 for engine speed.

To reuse a list, save it with Save CSV and load it later with Load. This sample list asks one ECU, by physical address, for six PIDs.

Download the sample transmit list (CSV, under 1 KB)

Read a request and an answer

Each request and answer is a short byte string:

  • Length. The first byte counts the bytes that follow. In the request 02 01 0C, 02 says two bytes follow: the mode and the PID.
  • Mode. 01 asks for current data. The answer replaces it with 41.
  • PID. The parameter, as defined in SAE J1979.
  • Data. The answer's value bytes, called A, B, C and D in order.

Engine speed (PID 0C) uses two data bytes, and the value is (256 × A + B) / 4 rpm. An answer of 04 41 0C 1A F8 gives (256 × 26 + 248) / 4 = 1726 rpm.

Common Mode 1 PIDs
PID Parameter
05 Engine coolant temperature
0A Fuel pressure
0C Engine speed
0D Vehicle speed

Every PID has its own formula. For the full list, see Wikipedia's OBD-II PIDs page.

Decode the answers with a DBC file

REXDESK can decode the recorded answers with a DBC file, so you do not work out each value by hand. The export includes only the messages and signals you choose. The sample DBC covers the standard 11-bit Mode 1 answers.

Download the sample OBD-II DBC file (DBC, 16 KB)

  1. Open the logs. Select Internal Storage, select the logs and open the Download menu.
  2. Open the export window. Select Advanced to open Export data.
  3. Set the output. On General, choose the output format (.mf4, .mat or .csv), the time format (CSV only) and the output location. Tick the merge option to combine several logs into one file.
  4. Load the DBC file. On Database, select the load DBC icon and open the file.
  5. Assign it to the bus. Drag the messages or signals you need onto the bus they were recorded on, for example CAN 0.
    Export data window on the Database page: an OBD message loaded on the left is dragged onto CAN 0 in the bus list on the right, with the Process button highlighted
  6. Process. Select Process. REXDESK decodes the raw data and saves the result where you chose.

For more export options, see REXDESK: download and export your logs.

Watch: Log OBD2 data with REXGEN (2:02)

Export the configuration as an RXC file

To load the same OBD-II configuration onto another logger without REXDESK connected, for example over the air, export it as an RXC file. Select Export on the Config menu, then Export ReXgen Configuration (rxc).

REXDESK Config menu with Export open, showing Export ReXgen Configuration (rxc) and Export Configuration to XML

To send a configuration over the air, see REXDESK: send a new configuration over the air.

Products in this guide

REXDESK

Logger setup & data export

View REXDESK Ask an engineer

REXGEN 1

Vehicle black box

View REXGEN 1 Ask an engineer

REXGEN 2

Evidence data logger

View REXGEN 2 Ask an engineer

REXGEN 2 IMU GNSS

Motion & location data logging

View REXGEN 2 IMU GNSS Ask an engineer

REXGEN Air

CAN to cloud

View REXGEN Air Ask an engineer

REXGEN Pro

Edge data platform

View REXGEN Pro Ask an engineer

Still stuck?

Our engineers answer support questions on every Influx Technology product.