J1939 Diagnostics – Part 1

Diagnostics functionality is very crucial for repairing and maintaining any system. Complex system often need to identify and communicate faults to different subsystems, need calibration functionality, need ability to read and write specific memory, need security functions. All such features are defined by J1939-73 standard for off-road and heavy vehicles.

the standard defines diagnostic connector to be used for service tool and defines messages required to perform diagnostic services. Diagnostic messages (DM) are used when whehicle being repaired as well as during vehicle operation. It allows exchange of diagnostic information between networked ECUs. This helps to build intelligent system that can self adjust in presence of faults or compensate as appropriate based on diagnostic information.

In this article gives brief information of diagnostics connector and fault handling supported in SAE J1939.

Diagnostics Connector

The off board diagnostics connector specifications are defined in SAE J1939-13. This standard talks about more details of the connector mounting, serviceability, performance, environmental, physical requirements and connector mechanical requirements. All these topics are out of scope of this article, please refer standard document for these details.

J1939 CAN diagnostics connector supports twisted shielded pair as well as twisted un-shielded wiring. 9-pin CAN diagnostics connector pin designations are shown below.

SAE J1939 diagnostics 9 pin connector

SAE J1939 diagnostics 9 pin connector

  • Pin A – Battery (-)
  • Pin B – Battery (+)
  • Pin C – CAN_H
  • Pin D – CAN_L
  • Pin E – CAN_SHLD
  • Pin F – SAE J1708 (+)
  • Pin G – SAE J1708 (-)
  • Pin H – Proprietary OEM Use or Implement Bus CAN_H
  • Pin J – Proprietary OEM Use or Implement Bus CAN_L

Diagnostics Trouble Code (DTC)

DTCs are used to report potential fault condition in the system. A DTC contains four independent fields which give information about the fault being reported by DTC. These fields are,

  1. Suspect Parameter Number (SPN)
  2. Failure mode identifier (FMI)
  3. Occurance Count (OC)
  4. SPN Conversion Method (CM)

SPN is 19 bit number assigned for specific component or electric subsystem which aids to find location of fault. PGNs already defined by application layer document are used as SPN in diagnostics, so there is no need to define SPNs again. FMI is a 5 bit number which defines nature of fault. FMI can indicate problem with electrical system or abnormal conditions detected. Below is the list of FMIs defined in standard.

FMIDescription
0High – most severe (3)
1Low – most severe (3)
2Erratic, Intermittent, or Incorrect
3Voltage Above Normal or shorted to high fault
4Voltage Below Normal
5Current Below Normal or open circuit fault
6Current Above Normal or Shorted to ground fault
7System Not Responding Properly
8Abnormal Frequency, Pulse Width, or Period
9Abnormal Update Rate
10Abnormal Rate of Change
11Other Failure Mode
12Failure
13Out of Calibration
14Special Instruction
15data valid but above normal range– least severe
16data valid but above normal range – moderate severity
17data valid but below normal range – least severe
18data valid but below normal range – moderate severity
19Received network Data Error
20Data Drifted High
21Data Drifted Low
31Condition exists

 

OC is 7 bit number and it tells how many times failure has occurred. Every time fault goes from inactive to active, the OC is incremented by 1. if fault becomes active for more than 126 times the OC remains 126.

CM is 1 bit indicate DTC conversion method. This bit defines byte alignment in the DTC.

Standard defines multiple Diagnostic Messages (DM) to accomplish specific purpose.  DM1 message transmit active DTCs while DM2 message transmit non active/ previously active DTCs. DM1 and DM2 messages may contain multiple DTCs. In case of more than one DTC, DM1 and DM2 messages are transmitted using Transport protocol (TP).

DTC Conversion Method (CM)

DM1 and DM2 messages contain 4 bytes of data per trouble code. The alignment of these 4 bytes defined by CM bit. Older SAE J1939 specifications supported 3 methods for SPN while the newer versions of specifications support only one conversion method called method 4. If CM bit is set to 1 that means DTC bytes are alligned using newer conversion method. If CM is 0 (zero) means one of the three DTC conversion methods is used and ECU manufacture shall know the which of the three methods is used.

Method 4 is recommended method.

 

J1939 DTC Conversion Methods

J1939 DTC Conversion Methods

 

In next section we can see DTC related diagnostic messages supported in J1939.

Diagnostic Message 1 (DM1) Active Diagnostics Trouble Codes

DM1 message contains information of all active DTCs and diagnostic lamp status. The lamp status support visual diagnostics and used by fault indicators on vehicle dashboard. SAE J1939 diagnostic support four types of lamp status. Malfunction Indicator Lamp (MIL) shows malfunctions related to emission. Red Stop Lamp (RSL) indicates serious faults that require vehicle to stop. Amber Warning Lamp (AWL) signals less critical faults and vehicle need not be immediately stopped. Vehicle can still run while these faults are active. Protection Lamp (PL) indicate faults which are not because of electronics, like hydraulic fluid temperature is rising beyond prescribed temperature range. All these lamp status supports 4 states; Lamp OFF, Lamp Steady ON, Lamp Flashing 1 Hz, Lamp flashing 2 Hz.  if ECU do not have active fault, them lamp status shall be set to Lamp Off.

DM1 message uses PGN 65226 (0xFECA) . DM1 message is sent periodically only when there is an active DTC or in response of request. If there are more than 1 active DTC, this messaeg is sent using transport protocol. Transmission rate of this message is 1 second. When an DTC becomes active DM1 message is sent immediately and then every one second thereafter. If a different DTC changes state (inactive to active or active to inactive) within the 1 second update period, a DM1 message is transmitted to communicate the change. To avoid high transmission rates, it is recommended that only one state change of one DTC shall be transmitted in one second. For a DTC becoming active and inactive twice within 1 second interval, only one DM1 message is send in one second interval. Following table shows DM1 message format.

Default Priority6
PDU Format254
PDU Specific202
PGN65226
Byte 1bits 8-7Malfunction Indicator Lamp status
bits 6-5Red Stop Lamp status
bits 4-3Amber Warning Lamp status
bits 2-1Protect Lamp status
Byte 2bits 8-7Reserved
bits 6-5Reserved
bits 4-3Reserved
bits 2-1Reserved
Byte 3bits 8-1SPN
Byte 4bits 8-1
Byte 5bits 8-6
bits 5-1FMI
Byte 6bit 8SPN Conversion Method (CM)
bit 7-1Occurance Count (OC)

Diagnostic Message 2 (DM2) Previously Active Diagnostics Trouble Codes

DM2 messages contains list of previously active DTCs. This messages contains all the DTCs which were previously active and occurrence count is non zero.Like DM1 message if number of DTCs are more than 1, DM2 message is sent using transport protocol. This message is not a periodic message, so it is sent only on request using PGN 59904. If this PGN is not supported then a NACK response shall be sent. DM2 message uses 65227 (0xFECB). Following table shows DM2 message details.

Default Priority6
PDU Format254
PDU Specific203
PGN65227
Byte 1bits 8-7Malfunction Indicator Lamp status
bits 6-5Red Stop Lamp status
bits 4-3Amber Warning Lamp status
bits 2-1Protect Lamp status
Byte 2bits 8-7Reserved
bits 6-5Reserved
bits 4-3Reserved
bits 2-1Reserved
Byte 3bits 8-1SPN
Byte 4bits 8-1
Byte 5bits 8-6
bits 5-1FMI
Byte 6bit 8SPN Conversion Method (CM)
bit 7-1Occurance Count (OC)

Diagnostic Message 3 (DM3) Diagnostics Data Clear of Previously Active DTCs

DM3 message is used to clear all diagnostic information related to previously active DTCs. This information may include following items.

  • Number of previously active DTCs
  • Previously active DTCs
  • Freeze frame data
  • Status of system monitoring tests
  • On-Board monitoring tests
  • Distance traveled while MIL (malfunction indicator lamp) is active
  • Performance monitoring information
  • manufacturer specific diagnostic data

DM3 message is sent using request PGN 59904. Once the previously active diagnostic data is clear or there is no previously active DTC data, the positive acknowledgement is sent by controller. If the diagnostic data clear operation is failed or the controller could not perform the operation for some reason, then negative acknowledgement is sent by controller.

DM3 message do not affect active DTC data. Below table shows DM3 message details.

Default Priority6
PDU Format254
PDU Specific204
PGN65228
Byte 1No data for this message. All bytes are set to FF.
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8

Diagnostic Message 4 (DM4) Freeze Frame Parameters

DM4 message (PGN 65229) is used to read freeze frame data. Freeze frame contains recorded data corresponding to a DTC when the fault is occurred. A freeze frame is associated with only DTC and a DTC can have only one freeze frame. Maximum number of bytes in a freeze frame data can be 1785 bytes so that it can fit in to TP frame. DM4 message is not a periodic message and requested using PGN 59904. Controller shall send NACK if DM4 message is not supported. Below table shows DM4 message details.

Default Priority6
PDU Format254
PDU Specific205
PGN65229
Byte 1Freeze frame length
Byte 2bits 8-1SPN
Byte 3bits 8-1
Byte 4bits 8-6
bits 5-1FMI
Byte 5bit 8SPN Conversion Method (CM)
bit 7-1Occurance Count (OC)
Byte 6Engine Torque mode
Byte 7Boost
Byte 8Engine Speed LSB
Byte 9Engine speed LSB (31.5 RPM/bit)
Byte 10Engine % Load
Byte 11Engine coolant temperature
Byte 12Vehicle Speed LSB
Byte 13Vehicle Speed MSB (1km/bit)
Byte 14 – nManufacturer specific information

Diagnostic Message 11 (DM11) Diagnostics Data Clear of Active DTCs

DM11 messages used PGN 65235 (0xFED3), This message is used to clear diagnostic data for active DTCs. Working of this message is exactly same as DM3 message.

Below table shows DM3 message details.

Default Priority6
PDU Format254
PDU Specific211
PGN65235
Byte 1No data for this message. All bytes are set to FF.
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8

Diagnostic Message 12 (DM12) Emission Related Active DTCs

DM12 messages sends information of active DTCs only related to emission. This message contains lamp status and list of DTCs. if there are more than 1 DTC then transport protocol is used to transmit this message. Thsi messages is not periodic and sent only when requested using request PGN 59904. Following table shows DM12 message format.

Default Priority6
PDU Format254
PDU Specific212
PGN65236
Byte 1bits 8-7Malfunction Indicator Lamp status
bits 6-5Red Stop Lamp status
bits 4-3Amber Warning Lamp status
bits 2-1Protect Lamp status
Byte 2bits 8-7Reserved
bits 6-5Reserved
bits 4-3Reserved
bits 2-1Reserved
Byte 3bits 8-1SPN
Byte 4bits 8-1
Byte 5bits 8-6
bits 5-1FMI
Byte 6bit 8SPN Conversion Method (CM)
bit 7-1Occurance Count (OC)

 

Takeaway

J1939/73 specifications defines application layer diagnostics and calibration. there are number of predefined diagnostics messages.  Faults can be identified using diagnostic trouble code (DTC) which is a 32 bit identifier. DTC includes 4 components; SPN, FMI, OC and CM. The DTC togather with source address is used to identify fault in specific subsystem or component.

With the DM1, DM2 and DM12 messages one can read Active and previously active DTC data from controller. To clear DTC data DM3 and DM11 messages are used. DM22 message is used to clear selected individual DTC. Freeze frame can be read using DM4 messages.

Leave a Reply

Your email address will not be published. Required fields are marked *