You are on page 1of 1

→ J1939 Diagnostics – Part

Index

1
Updated June 10, 2021 // Posted in J1939 / CAN / Communication / Diagnostics //

Tagged as CAN, Diagnostics, J1939 Diagnostics // 0 Comments // 10 mins read

HOME Home - J1939 - J1939 Diagnostics – Part 1

ABOUT US

CONTACT
About Us
J1939 Diagnostics – Part 1

N k s A G 0SHARES

Diagnostics functionality is very crucial for repairing and maintaining any system. The complex system often need to identify and
  
communicate faults to different subsystems, need calibration functionality, need the 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.
EMBEDDED FLAKES

The standard defines a diagnostic connector to be used for service tools and defines messages required to perform diagnostic services. Everything about embedded systems
Diagnostic messages (DM) are used when a vehicle is repaired as well as during vehicle operation. It allows the exchange of diagnostic
information between networked ECUs. This helps to build an intelligent system that can self adjust in presence of faults or compensate as  
appropriate based on diagnostic information.

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

Table Of Contents

Diagnostics Connector
Diagnostics Trouble Code (DTC)

Recent Posts 
DTC Conversion Method (CM)

CANFD: The Next Big Thing


Diagnostic Message 1 (DM1) Active Diagnostics Trouble Codes
in Automotive
Diagnostic Message 2 (DM2) Previously Active Diagnostics Trouble Codes Communication
Diagnostic Message 3 (DM3) Diagnostics Data Clear of Previously Active DTCs DECEMBER 11, 2022 /
0 COMMENTS
Diagnostic Message 4 (DM4) Freeze Frame Parameters
Diagnostic Message 11 (DM11) Diagnostics Data Clear of Active DTCs
Diagnostic Message 12 (DM12) Emission Related Active DTCs The Wonders Of The
Embedded World: How
Takeaway
Embedded Systems Make
Our Lives Easier
Table of Contents OCTOBER 30, 2022 / 0 COMMENTS

1. Diagnostics Connector
2. Diagnostics Trouble Code (DTC) Simulink: Best modeling and
2.1. DTC Conversion Method (CM)
simulation tool
3. Diagnostic Message 1 (DM1) Active Diagnostics Trouble Codes
MAY 23, 2022 / 0 COMMENTS
4. Diagnostic Message 2 (DM2) Previously Active Diagnostics Trouble Codes
5. Diagnostic Message 3 (DM3) Diagnostics Data Clear of Previously Active DTCs
6. Diagnostic Message 4 (DM4) Freeze Frame Parameters
What is Logical Indexing in
7. Diagnostic Message 11 (DM11) Diagnostics Data Clear of Active DTCs
MATLAB?
8. Diagnostic Message 12 (DM12) Emission Related Active DTCs
JUNE 6, 2021 / 0 COMMENTS
9. Takeaway

Diagnostics Connector Easily Make Plots in


MATLAB in 5 Minutes

The off-board diagnostics connector specifications are defined in SAE J1939-13. This standard talks about more details of the connector MAY 30, 2021 / 0 COMMENTS

mounting, serviceability, performance, environmental, physical requirements, and connector mechanical requirements. All these topics are
out of the scope of this article, please refer to the standard document for these details.

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

C Code

CAN

CMS

Code

Communication

Diagnostics

Hardware

SAE J1939 diagnostics 9 pin


Interrupts
connector
J1939

Pin A – Battery (-)


MATLAB
Pin B – Battery (+)
Pin C – CAN_H Microcontroller

Pin D – CAN_L
Optimization
Pin E – CAN_SHLD
Pin F – SAE J1708 (+) PCB
Pin G – SAE J1708 (-)
Simulink
Pin H – Proprietary OEM Use or Implement Bus CAN_H
Pin J – Proprietary OEM Use or Implement Bus CAN_L Software

Diagnostics Trouble Code (DTC) Software Tools

Subversion
DTCs are used to report potential fault conditions 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 a 19-bit number assigned for a specific component or electric subsystem which aids to find the location of a fault. PGNs already
defined by application layer documents are used as SPN in diagnostics, so there is no need to define SPNs again. FMI is a 5-bit number
that defines the nature of the fault. FMI can indicate a problem with the electrical systems or abnormal conditions detected. Below is the list
of FMIs defined in the standard.

FMI Description

0 High – most severe (3)

1 Low – most severe (3)

2 Erratic, Intermittent, or Incorrect

3 Voltage Above Normal or shorted to high fault

4 Voltage Below Normal

5 Current Below Normal or open circuit fault

6 Current Above Normal or Shorted to ground fault

7 System Not Responding Properly

8 Abnormal Frequency, Pulse Width, or Period

9 Abnormal Update Rate

10 Abnormal Rate of Change

11 Other Failure Mode

12 Failure

13 Out of Calibration

14 Special Instruction

15 data valid but above normal range– least severe

16 data valid but above normal range – moderate severity

17 data valid but below normal range – least severe

18 data valid but below normal range – moderate severity

19 Received network Data Error

20 Data Drifted High

21 Data Drifted Low

31 Condition exists

Failure Mode Indicators


OC is a 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 to indicate the DTC conversion method. This bit defines byte alignment in the DTC.

The standard defines multiple Diagnostic Messages (DM) to accomplish a specific purpose. DM1 message transmit active DTCs while
DM2 message transmits non-active/ previously active DTCs. DM1 and DM2 messages may contain multiple DTCs. In the 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 aligned using a newer conversion method. If CM is 0 (zero) means one of the three DTC
conversion methods is used and ECU manufacture shall know which of the three methods is used.

Method 4 is recommended method.

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 supports visual diagnostics and used by
fault indicators on a vehicle dashboard. SAE J1939 diagnostic supports four types of lamp status. Malfunction Indicator Lamp (MIL)
shows malfunctions related to emission. Red Stop Lamp (RSL) indicates serious faults that require the vehicle to stop. Amber Warning
Lamp (AWL) signals less critical faults and vehicles need not be immediately stopped. The vehicle can still run while these faults are
active. Protection Lamp (PL) indicates faults that 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
does not have an 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 the response of the
request. If there is more than 1 active DTC, this message is sent using the transport protocol. The transmission rate of this message is 1
second. When a 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 the 1-second interval, only one DM1 message is sent in the one-second interval. The following
table shows the DM1 message format.

Default Priority 6

PDU Format 254

PDU Specific 202

PGN 65226

Byte 1 – bits 8-7 Malfunction Indicator Lamp status

Byte 1 -bits 6-5 Red Stop Lamp status

Byte 1 -bits 4-3 Amber Warning Lamp status

Byte 1 -bits 2-1 Protect Lamp status

Byte 2 – bits 8-7 Reserved

Byte 2 -bits 6-5 Reserved

Byte 2 -bits 4-3 Reserved

Byte 2 -bits 2-1 Reserved

Byte 3 – bits 8-1 SPN

Byte 4 – bits 8-1 SPN

Byte 5 – bits 8-6 SPN

Byte 5 -bits 5-1 FMI

Byte 6 – bit 8 SPN Conversion Method (CM)

Byte 6 -bit 7-1 Occurance Count (OC)

Diagnostic Message 2 (DM2) Previously Active Diagnostics Trouble Codes

DM2 messages contain a list of previously active DTCs. This message contains all the DTCs which were previously active and the
occurrence count is non zero. Like DM1 message if the number of DTCs is more than 1, DM2 message is sent using the 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). The following table shows DM2 message details.

Default Priority 6

PDU Format 254

PDU Specific 203

PGN 65227

Byte 1 – bits 8-7 Malfunction Indicator Lamp status

Byte 1 – bits 6-5 Red Stop Lamp status

Byte 1 – bits 4-3 Amber Warning Lamp status

Byte 1 – bits 2-1 Protect Lamp status

Byte 2 – bits 8-7 Reserved

Byte 2 – bits 6-5 Reserved

Byte 2 – bits 4-3 Reserved

Byte 2 – bits 2-1 Reserved

Byte 3 – bits 8-1 SPN

Byte 4 – bits 8-1 SPN

Byte 5 – bits 8-6 SPN

Byte 5 – bits 5-1 FMI

Byte 6 – bit 8 SPN Conversion Method (CM)

Byte 6 -bit 7-1 Occurance 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 the 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 acknowledgment is sent by the controller. If the diagnostic data clear operation is failed or the controller could not perform
the operation for some reason, then a negative acknowledgment is sent by the controller.

DM3 message does not affect active DTC data. The below table shows DM3 message details.

Default Priority 6

PDU Format 254

PDU Specific 204

PGN 65228

Byte 1 – 8 No data for this message. All bytes are set to FF.

Diagnostic Message 4 (DM4) Freeze Frame Parameters

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

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 on this message is
exactly the same as the DM3 message.

Below table shows DM11 message details.

Default Priority 6

PDU Format 254

PDU Specific 211

PGN 65235

Byte 1 – Byte 8 No data for this message. All bytes are set to FF.

Diagnostic Message 12 (DM12) Emission Related Active DTCs

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

Default Priority 6

PDU Format 254

PDU Specific 212

PGN 65236

Byte 1 – bits 8-7 Malfunction Indicator Lamp status

Byte 1 -bits 6-5 Red Stop Lamp status

Byte 1 -bits 4-3 Amber Warning Lamp status

Byte 1 -bits 2-1 Protect Lamp status

Byte 2 – bits 8-7 Reserved

Byte 2 – bits 6-5 Reserved

Byte 2 – bits 4-3 Reserved

Byte 2 – bits 2-1 Reserved

Byte 3 – bits 8-1 SPN

Byte 4 – bits 8-1 SPN

Byte 5 – bits 8-6 SPN

Byte 5 -bits 5-1 FMI

Byte 6 – bit 8 SPN Conversion Method (CM)

Byte 6 -bit 7-1 Occurance Count (OC)

Takeaway

J1939/73 specifications define application-layer diagnostics and calibration. There are a 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 together with source address is used to identify the fault in a specific subsystem or component.

With the DM1, DM2, and DM12 messages one can read Active and previously active DTC data from the 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.

J1939 Diagnostics Part 2

N k s A G 0SHARES

TAGS: CAN, DIAGNOSTICS, J1939 DIAGNOSTICS

 Previous Post Next Post 


Basic Introduction of SAE J1939 J1939 Transport Protocol

 YOU MIGHT ALSO LIKE

J1939 Transport Protocol J1939 Diagnostics – Part 2 A Simple Guide to Understand


October 7, 2018 May 10, 2020 Network Management in SAE
J1939
October 7, 2018

Leave a Reply

Your comment here...

Name (required) Email (required) Website

POST C O MMENT

Copyright 2023 - EmbeddedFlakes Home | About Us | User Agreement | Terms of Service | Privacy Policy | Sitemap | Contact

You might also like