Understanding SAE J1939 Frame Format and Message Structure
Advertisement
SAE J1939 is a widely used communication protocol in heavy-duty vehicles like trucks, buses, and construction equipment. It facilitates data exchange between various Electronic Control Units (ECUs) within the vehicle’s network. Based on the Controller Area Network (CAN), it’s known for its standardized message format. This includes a 29-bit CAN Identifier (CAN ID), an 18-bit Parameter Group Number (PGN), and a Suspect Parameter Number (SPN).
The SAE J1939 message format consists of the following components: SOF, CAN ID, PGN, SPN, Data field, CRC, and EOF. Let’s break them down:
- Start of Frame (SOF): This single bit marks the beginning of the message.
29-bit CAN ID
The 29-bit CAN ID is a unique identifier for each J1939 message. It provides information about the message’s source and destination, its priority, and whether it’s a broadcast message. The CAN ID is divided into several parts:
- Priority (3 bits): Higher-priority messages have lower numerical values, ranging from 0 to 7.
- Reserved (1 bit): These bits are reserved and might have specific meanings in certain applications.
- Data Page (1 bit): This bit indicates which data page is being used, as some PGNs have multiple data page options.
- Extended Data Page (EDP bits): A further extension to the data page.
- PDU Format (8 bits): Specifies the PGN grouping and represents the general message category.
- PDU Specific (8 bits): Provides additional information about the message.
18-bit Parameter Group Number (PGN)
The PGN is a standardized value defining the message’s type and purpose. It categorizes the data contained within the message. Crucially, the PGN allows for message filtering and processing. It is part of the CAN ID and is 18 bits in size.
The PGN can be classified into two types:
- Global Parameter Group Numbers: These PGNs are broadcasted to all ECUs. The PDU format is >= 240, and the PDU specific field is a group extension.
- Specific Parameter Group Numbers: These parameter groups are sent directly from one ECU to another. If the PDU format is <= 239 and PDU specific field is set to 0.
Both types contain the following fields: PDU Format, PDU Specific, Data Page, and Extended Data Page.
Source Address
This field contains the unique address of the device transmitting the message. There are 254 different addresses available, as the field is 8 bits in size. No two devices can use the same address on the network.
Suspect Parameter Number (SPN)
SPNs identify specific parameters or data items within the message. They provide detailed information about the message’s content. For example, an SPN could represent a temperature reading, engine speed, or a fault code. SPNs are usually associated with a range of possible values, units of measurement, and diagnostic information. The SPN is 19 bits in size, ranging from 0 to 524287.
SPNs are always interpreted from the Least Significant Bit (LSB) to the Most Significant Bit (MSB). It may be present in multiple PGNs. It contains Data Length in bytes, Scale, Data Type, Unit, Resolution, Offset, Range, and Reference Tag (Label).
Data Field
The data field contains the actual information being transmitted, ranging from 0 to 8 bytes in size, depending on the message.
Checksum (CRC)
The message usually includes a Cyclic Redundancy Check (CRC) to ensure data integrity and detect errors during transmission.
End of Frame (EOF)
The message ends with an End of Frame (EOF) delimiter.
In summary, the SAE J1939 message format uses a 29-bit CAN ID to encapsulate the 18-bit PGN and additional information like the SPN to specify the message’s content and meaning. This standardized format allows different ECUs in a vehicle to communicate effectively and interpret the exchanged data.