J1939 basics_En_V1

Created by Mikaël MAUNIER, Modified on Mon, 30 Oct, 2023 at 5:07 PM by Frank ROIG

J1939 communications


Composition of a J1939 frame:


Used as a communication system in utility vehicles, usually diesel-powered. As the same motors are used in many industries, the J1939 is also present in many other fields. The J1939 has a 29-bit message identifier. Its standard baud rate is 250 kbit/s. Simply put, J1939 offers a standardized method of communication between ECUs and provides a common language between manufacturers. A J1939 frame is made up of 93 bits divided into two parts, the first is the identifier (29 bits) and the second DATA (64 bits).


ID:


Specifically, the 29-bit CAN identifier includes Priority (3 bits), J1939 PGN (18 bits), and Source Address (8 bits). In turn, the PGN can be divided into reserved bit (1 bit), data page (1 bit), PDU format (8 bits) and specific PDU (8 bits). Simply put, the PGN serves as the unique frame identifier within the J1939 standard.



The data:


A J1939 frame has 8 bytes (64 bits) of data. The J1939 Suspect Parameter Number (SPN) serves as an identifier for the CAN signals (parameters) contained in the data bytes. SPNs are grouped by PGN and can be described in terms of bit start position, bit length, scale, offset, and unit. There can be multiple SPNs in a PGN (see photo below).



Each SPN represents information (engine speed, oil pressure, etc.) and has a number (the engine speed request is SPN no. 190). Each SPN is unique and has its own characteristics such as its PGN, its number, its description, its start byte, its start bit, its number of bits, its resolution, its offset, its unit, its minimum and maximum value.

 

Transmission of a frame (Speed control):



In the frame above that we send to the ECU, the priority is 0x3, the PGN is 0x0, the transmitter ID is 0xDC (220). The information contained in this frame is according to the J1939 standard, engine speed control.



The SPN of the motor speed request is 898 because it starts at bit #8 and ends at bit #23 (byte 2 and 3). The value 0x2EE0 of our frame corresponds to 12000 in decimal base. This SPN is known to have a resolution of 0.125, which means that the emission value of 12000 will be interpreted as 1500 by the ECU and will run the engine at 1500 rpm.


If you only want to modify the value of an SPN, all you have to do is send the frame with all the other bits at 1.


Reception of a frame (ECU measurement):



In the above frame we receive from ECU, Priority is 0x3, PGN is 0xFEEF, Transmitter ID is 0x0. The information contained in this frame is according to the J1939 standard, the engine oil pressure (see photo below).



The oil pressure SPN is 100 because it starts at byte 4 and contains 8 bits. This means that it has a resolution of 4 and that its maximum value is 1000. The value 0x0A of our frame corresponds to 10 in decimal base. We know that this SPN has a resolution of 4, which means that the emission value of 10 will be interpreted as 40 by the COMPACT and will therefore display 40 kPA.


MTU MDEC:


Important information

Attention

MTU MDEC is proposed as a software option. Option must be available and activated on your controller in order to enable MTU MDEC communication and access dedicated settings and measurements.

When MTU MDEC protocol is in use on CAN engine communication port CAN2, then the associated CAN bus bit rate is automatically fixed to 125kbit/s.

In case any CANopen configuration is enabled, then the CANopen protocol will be switched to CAN1 of the controller. Additional attention must be taken on CANopen configuration when this protocol is switched on port CAN1: see dedicated chapter for more information

 

For other ECUs not using the J1939 protocol, refer to the technical documentation of your ECU or contact CRE Technology technical support.


The MTU MDEC is not part of the J1939, so the reading of values, alarms and shutdowns are different. MDEC and ADEC protocols are protocols designed by MTU and their communication speed is 125 kb/s.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article