# Log OBD2 Mode 1

OBD2 generally focuses on emission control and supports a broad range of standard parameter IDs (PIDs) that can be logged across most vehicles.

### 'How to' - with ReXgen?

The OBD data can be easily logged using any ReXgen logger from Influx with the ReXdesk software.

### Periodic CAN/CAN FD Transmission

Create a new project.&#x20;

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FA2gNmHAPMJBdBFNDFSqA%2Fimage.png?alt=media&#x26;token=326c20b6-2008-44fe-bd63-c41bcdc4ae76" alt="" width="101"><figcaption></figcaption></figure></div>

Drag and drop the 'Periodic Transmission' tool to the 'Output' area of the configuration window.

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2F1suZQ8pMW6kaW6GqzTdG%2Fimage.png?alt=media&#x26;token=ffd41b14-f3bf-4a76-bb69-7a2cf8cc893e" alt=""><figcaption></figcaption></figure>

If you have not configured the same in the logging area, click the CAN bus icons and set the CAN bus properties.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FVpSH5qcDAtFxTsyvbhCs%2Fimage.png?alt=media&#x26;token=0799e912-f4d7-4f72-b8c3-05e843d97b33" alt="" width="207"><figcaption></figcaption></figure></div>

To initiate OBDII Mode1 data logging, users must configure periodic transmission with OBD requests to the ECU.

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FQhiRxnwmqfW6BzaETAgb%2Fimage.png?alt=media&#x26;token=9d159ad0-c667-4b95-8844-06d085b32faf" alt=""><figcaption></figcaption></figure>

* **Ident**: specifies if the identifier is for "request messages" or "response messages."

  * **ID 7DF** - OBD2 message identifier for a standard 11-bit.

  **Note:** In some cases, the user will need to use physical rather than functional addressing.

  * **ID 7E8** - main engine or ECU response identifier.

* \***Linked**: lets you link the message(s).

* \***Period**: Specify the Period of transmission.

* \***Delay**: Specify the delay in transmission.

* **CAN 0/CAN 1/CAN 2/CAN 3**: Option to choose the transmission bus.

* **Type**: CAN message (Standard/Extended).

* **DLC**: Data Length Code (0-64).

(\* - define only if/when needed)

* **Data**:

  * **Request data message** –

  <figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FPZ3XVYCpLmUxY8HtLmEp%2Fimage.png?alt=media&#x26;token=0fa65d5a-3bd0-4251-a0ff-7b698e1078a7" alt=""><figcaption></figcaption></figure>

  * **Response data message** –

  <figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FAs9eRTsk9p5uydNZENCl%2Fimage.png?alt=media&#x26;token=fdc52c5f-ffeb-4398-9e88-36e47207d780" alt=""><figcaption></figcaption></figure>

**Length:** Specifies the length of bytes (after it) containing valid data. For example, in the request message

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FkZN4IQtFcgVEent7SBht%2Fimage.png?alt=media&#x26;token=ea1395ad-c4f0-4dc5-b4cd-dc18427c0bfb" alt=""><figcaption></figcaption></figure>

'02' specifies that the Engine or ECU must respond to the mode 01 and PID 0A codes in the next two bytes.

Similarly, for the response message

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FjsfuOmiiTELfL2QARxcD%2Fimage.png?alt=media&#x26;token=dd1c664c-9691-4b8f-9c31-cf41d4e1c667" alt=""><figcaption></figcaption></figure>

'04' specifies that the Engine or ECU response lies in the next four bytes, mode '01' request is replaced with '41' for responses and the PID code 0A's data is in the next four bytes '23 E6' (hex values).

**Mode:** specifies the diagnostic services described in the latest OBD-II standard SAE J1979 (this document is made explicitly for Mode 1).

**PID:**  these are the standard OBD-II PIDs as defined by SAE J1979.

* 0A - Fuel pressure
* 05 - Engine coolant temperature
* 0C - Engine speed
* 0D - Vehicle speed

#### Decoding data values for the PIDs:

For example, if the output data looks like this

<div align="center"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2F9gBbNNo5IXGMg27vDkAz%2Fimage.png?alt=media&#x26;token=56577f16-e693-4d49-91a1-d9020d877704" alt=""><figcaption></figcaption></figure></div>

Then,

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FcJz2ExbN1HUq9JqQuzKF%2Fimage.png?alt=media&#x26;token=8abb7ecb-6942-4c6c-89ca-43baf7f18cfe" alt=""><figcaption></figcaption></figure></div>

Similarly, all the hex data values need to be decoded according to their respective PID formulas

([Click for detailed list](https://en.wikipedia.org/wiki/OBD-II_PIDs))

\*For Heavier vehicles that use extended 29-bit CAN identifiers with bit rates 250K or 500K, the OBDII PID identifier is 18DB33F1 instead of 7DF. Also, the response ID is 18DAF1XX, where 'XX' varies according to various OEMs, as it is up to them to determine what CAN ID they assign for ECUs.

## Decode data using DBC:

This method exports only specific messages/signals from the RAW data using a DBC file.

The user will need to assign the DBC to the specific CAN Bus.

Click on the 'Internal Storage.'

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FJ46LiXBDNTQuGNNgit1x%2Fimage.png?alt=media&#x26;token=73aae1c0-abb3-4e9b-87e8-b29e52e6ecb5" alt="" width="136"><figcaption></figcaption></figure></div>

The window below will open.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2Fe0yexKtrr8XybsTzRSPv%2Fimage.png?alt=media&#x26;token=bbd6f90f-6184-4da4-baca-174bea9692e7" alt=""><figcaption></figcaption></figure></div>

Select the data logs and click on Download;

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FBRFL8Hu6JCsmVnedc91W%2Fimage.png?alt=media&#x26;token=83b2c88a-874a-4bb4-86c5-1ee6ac446f89" alt=""><figcaption></figcaption></figure></div>

Select the 'Advanced' option and open the 'Export data' window below.

Choose the output format (.mf4/.mat/.csv).

Choose the time format (Only applicable to .csv format).

The user can choose the 'Merge' option if multiple data logs are to be exported.

Specify the output location to save the exported data.

Click 'Process'.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2F85Z7xmeekgZouFjbpM2w%2Fimage.png?alt=media&#x26;token=bf935d56-7f98-4268-af77-a130eab67246" alt=""><figcaption></figcaption></figure></div>

Click on the 'load DBC file' icon.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FGtbtaAFwHH9OPOzt2Fa6%2Fimage.png?alt=media&#x26;token=ab72ef89-0932-4c62-b29e-9612abef6f75" alt=""><figcaption></figcaption></figure></div>

Drag and drop the required DBC messages/signals to the corresponding bus.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FbuJ49cZ9xPI8OQntxbVm%2Fimage.png?alt=media&#x26;token=bd04509e-c4ac-4000-b859-ad7030339ee9" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}

#### Note:

* ReXdesk supports PGN-based exports when J1939 DBC is imported.
  {% endhint %}

Click 'Process'.

ReXdesk will process the RAW data and save the decoded data to the location specified during step 3.

#### Sample dbc file

{% file src="<https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2F2S2VQs3Xy1Hv7J3diFmi%2FInflux_11bit_OBD2_V1.dbc?alt=media&token=0da47fce-315e-4c24-a946-f589117162b5>" %}

#### Sample csv file

{% file src="<https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2Fo1xHbMph4NPAmcsvqAyz%2FNew%20Project_0002471_20240605_101323.csv?alt=media&token=5175b8dc-b879-4ecf-b541-ed1a3373cc18>" %}

[<mark style="color:blue;">Video Tutorial</mark>](https://youtu.be/8XSEYJRXnGQ)
