Diagnostics
Diagnostics
Search Toolkit
1 2 3
4 5
Conclusion Reference
Introduction
An automobile as we know it was not invented in a single day by a single inventor. It is more than an engine and a body; it is a complex machine that has undergone over a century of evolution. Over the years we have seen a constant stream of innovations and improvements in engine design. We have seen the advent of 4 wheel brakes, fuel injection and the automatic transmission. Detecting a failure in this complex machine would be a tedious task. However, most of the vehicles today include computers (Electronic Control Unit (ECU)), which monitors several sensors, located throughout the engine, fuel and exhaust systems. When the computer system of the car detects a fault, two things are supposed to happen/monitored. First, a warning light on the dashboard is set, to inform the driver that a problem exists. Second the code is recorded in the computers memory (Electrically Erasable Programmable Read-Only Memory) so that it can later be retrieved by a technician for diagnosis and repair. The key to good auto repair lies in troubleshooting the problem. Problem in cars could be caused due to number of reasons. Proper troubleshooting will eliminate the potential issues that aren't the real problem and point you in the right direction. This can be achieved through Diagnostics. Did you notice when a problem happens in a car or a vehicle? Ok!! Let me say one situation. There is a Check Engine Light (warning Lamp) present in our cars dashboard, which alerts us when a problem occurs in the engine control system. Depending on the nature of the problem, the Check Engine Light may come on and go off, remain on continuously or flash. Some intermittent problems will make the Check Engine Light come on only when the fault is occurring. When the problem goes away, the Check Engine Light goes off. So, When the Check Engine Light comes on, a diagnostic trouble code (DTC) is recorded in the on-board computer memory that corresponds to the fault. Some problems can generate more than one trouble code, and some vehicles may have multiple problems that set multiple trouble codes.
Overview of Diagnostics
2.1
Diagnostics
Diagnostics, as the word suggests, is to identify the cause of a problem or a situation. Whenever the ECU finds a problem, it stores that problem as a Diagnostics Trouble Code (DTC) in the Electrically Erasable Programmable Read-Only Memory (EEPROM) for later retrieval. Diagnostic Tools are used to read data (DTCs) from the EEPROM to analyze the cause of failure. 2.2 Diagnostics Protocol
Protocol refers to a set of rules for communication. Here the communication happens between two ECUs which follow the same rule and able to exchange the information. The protocols which are used for Diagnostics purposes are known as Diagnostics Protocol. The automotive industry has come up with Diagnostics protocols which are used for diagnostics purposes like, CAN (Control Area Network), K-Line, UDS (Unified Diagnostics Services), and KWP (Keyword Protocol) and so on. Here (in this document) we will study/know about UDS. 2.3 Diagnostics Session
Diagnostic session is the basis for/of communication between the ECU and the diagnostic tool. During Diagnostics the ECU being analyzed is in a particular session. Basically there are different types of diagnostics sessions like Default Session, Extended Diagnostic Session and ECU Programming Session. After Ignition on, ECU will be switched to a Default Diagnostic Session and after receiving the request from Diagnostic Tool, the ECU will be switched to the Extended Diagnostic Session. Further, after receiving the ECU Programming Session start request from Diagnostic tool, it will switch to the ECU Programming Session. 2.4 Automotive Diagnostic Service
Automotive diagnostic service is the way to discover, whats wrong with the vehicle if it is not running / behaving properly. Diagnosing a vehicles problem in order to fix or repair a car can be done through a professional automobile diagnostic center. Diagnostic Service uses the read command for retrieving the information/data from ECU and the write command to write/program the data to the ECU. Some of the services are given below as, Diagnostic Session Control
ECU Reset Clear Diagnostic Information Read DTC Information Read Data By Identifier Read Memory By Address Security Access Communication Control Write Data By Identifier Input Output Control By Identifier Write Memory By Address Tester Present Control DTC Setting
For communicating with the ECU, the diagnostic tool uses either Physical addressing or Functional addressing method. Physical addressing is the kind of addressing where the Diagnostics tool communicates with a single ECU. Functional addressing is where the Diagnostics tool communicates with multiple ECUs.
The services supported by the UDS protocol are described in the table below: Description Used to enable different diagnostic sessions in one ECU or a group of ECUs. ECU Reset Used by the external diagnostic tool to request an ECU reset based on content of the reset type parameter included in the ECU Reset request message. Clear Diagnostic Information Used by the external diagnostic tool to clear diagnostic information in one or multiple ECUs memory. Service Name Diagnostic Session Control
Security Access
Allows a diagnostic tool to read the status of ECU resident Diagnostic Trouble Code (DTC) information from any ECU, or group of ECUs within a vehicle. Allows the diagnostic tool to request data record values from the ECU identified by Record data identifier. Allows the diagnostic tool to request memory data from the ECU via provided starting address and size of memory to be read. Provides a means to access data and/or diagnostic services, which have restricted access for security, emissions, or safety reasons. Switches on and off the transmission of certain ECU messages Allows the diagnostic tool to write information into the ECU at an internal location specified by the provided data identifier. Used by the diagnostic tool to substitute a value for an input signal, internal ECU function and/or control an output (actuator) of an electronic system. Allows the external diagnostic tool to write information into the ECU at one or more contiguous memory locations. Used to indicate to an ECU or a group of ECUs that a diagnostic tool is still connected to the vehicle. Used by diagnostics tool to stop or resume the setting of DTCs in ECU.
3.1
The Diagnostic Session Control service shall be used to enable different diagnostic sessions in one ECU or a group of ECUs. If no diagnostic session has been requested by the client after start communication a default session shall be automatically enabled in the server. The default session shall support at least the following services stop Communication service and tester Present service. If a diagnostic session has been requested by the client which is already running, the server shall send a positive response message.
The Diagnostic Session Control request message shall meet the format defined in the Table below:
Data Byte No. Parameter Name 1 Diagnostic Session Control Service Id 2 sub Function Default Session Programming Session Extended Session
Data Value 10
01 02 03
Diagnostic Session Control Responses Once ECU receives the request message from Tester, it has to send the response message to Tester. If the response message is positive, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Diagnostics Session Control Response Service Id 2 sub Function 3 Session Parameter Record
Positive Response
And if the response message is negative, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Negative Response 2 Diagnostics Session Control 3 sub function Sub function Not supported Incorrect Message Length or Invalid Format Conditions are not correct Negative Response
3.2
ECU Reset
The ECU Reset service is used by the external diagnostic tool to request an ECU reset based on content of the reset type parameter included in the ECU Reset request message. Basically there are two different types of ECU resets.
1. Hard Reset
2. Soft Reset
Hard Reset: This type identifies a hard reset condition which simulates the power-on/start-up sequences typically performed after an ECU has been previously disconnected from its power supply (i.e Battery). This implies the memory (Volatile or Non-volatile) as well as electronic sub-components directly connected to the ECU are initialized upon request of this reset type which are also initialized during the power-up sequence. Soft Reset: This type identifies a "soft reset" condition, which causes the ECU to immediately restart the application program if applicable. Before restarting the application the ECU saves any data in non-volatile memory that might be lost during the startup sequence.
The ECU Reset request message shall meet the format defined in the Table below,
Data Byte No. Parameter Name 1 ECU Reset Request Service Id 2 sub Function Hard Reset - Positive response required Key On-Off Reset - Positive Response Required Soft Reset Positive Response Required
Data Value 11 01 02 03
ECU Reset Responses If the response message is positive, then response should meet the format, given in below table. Data Byte No. Parameter Name Data Value 1 ECU Reset Response Service Id 51 2 sub Function 00-FF 3 Power Down Time 00-FF
Positive Response
And if the response message is negative, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Negative Response 2 ECU Reset 3 sub Function
Sub function Not supported Incorrect Message Length or Invalid Format Conditions are not correct
12 13 22
Negative Response
3.3
The Clear Diagnostic Information service is used by the external diagnostic tool to clear diagnostic information in one or multiple ECUs memory. A Clear DTC information request shall reset/erase all DTC information including the following: a) DTC b) DTC status byte c) Other DTC related data such as first/most recent DTC, flags, counters, timers, etc. specific to DTC
Data Byte No. Parameter Name 1 Clear Diagnostic Information Request Service Id 2 Group Of DTC [2] = [
Group Of DTC High Byte Group Of DTC Low Byte ] Emission Related Systems 000000
Clear Diagnostic Information Responses If the response message is positive, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Clear Diagnostic Information Positive Response Service Id
Data Value 54
Positive Response
And if the response message is negative, then response should meet the format, given in below table. Data Byte No. Parameter Name 1 Negative Response 2 Clear Diagnostic Information Request Service Id 3 sub-function Incorrect Message Length Invalid Format Conditions Not Correct Request Out Of Range Data Value 7F 14 00-FF 13 22 31
This service allows a diagnostic tool to read the status of ECU resident Diagnostic Trouble Code (DTC) information from any ECU, or group of ECUs within a vehicle. Requesting the ECU to report Most Recent Confirmed DTC or all Supported DTCs the diagnostic tool shall use the format defined in the Table below.
Data Byte No. Parameter Name 1 Read DTC Information request Service Id 2 sub-function Report Supported DTCs -Positive Response Required Report Most Recent Confirmed DTC - Positive Response Required
Read DTC Information Responses If the response message is positive, then response should meet the format, given in below table. Data Byte No. Parameter Name 1 Read DTC Information response Service Id 2 Report Type Report Number Of DTC By Status Mask Report Number Of Mirror Memory DTC By Status Mask Report Number Of DTC By Severity Mask Record 3 DTC Status Availability Mask 4 DTC Format Identifier 5 DTC Count [ 2] = [ DTC Count High Byte DTC Count Low Byte ] Positive Response Data Value 59 00-FF 01 11 07 00-FF 00-FF 00-FF
And if the response message is negative, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Negative Response 2 Read DTC Information 3 sub-function Sub Function Not Supported Incorrect Message Length Invalid Format Request Out Of Range Negative Response
3.5
The Read Data By Identifier service allows the diagnostic tool to request data record values from the ECU identified by Record Data identifiers.
Data Byte No. Parameter Name 1 Read Data By Identifier Request Service Id 2 Data Identifier[2]
Read Data By Identifier Responses If the response message is positive, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Read Data By Identifier Response Service Id 2 Data Identifier[2] 4 Data Record [2]
Positive Response
If an ECU responds positively to a Read Data By Identifier request, the response message Data Identifier parameter value shall be an echo of the value provided in the request message by the diagnostics tool
And if the response message is negative, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Negative Response 2 Read Data By Identifier 3 sub-function Incorrect Message LengthInvalid Format Conditions Not Correct Request Out of Range Security Access Denied
The Read Memory By Address services allows the diagnostics tool to request memory data from the ECU via provided starting address and size of memory to be read.
Read / Write Memory By Address Parameter Address And Length Format Identifier
Description This parameter is a one byte value with each nibble encoded separately: bit 3 - 0: Length (number of bytes) of the Memory Address parameter bit 7 - 4: Length (number of bytes) of the Memory Size parameter The parameter Memory Address is the starting address of ECUs memory where the data is to be written or from which the data is to be read. The parameter Memory Size in the Read / Write Memory By Address request message specifies the number of bytes to be read or written starting at the address specified by Memory Address in the ECU's memory. The number of bytes used for this size is defined by the high nibble (bit 7 - 4) of the Address And Length Format Identifier. This parameter is used by the Read Memory By Address positive response message to provide the requested data record values to the diagnostic tool. The content of the Data Record is not defined in this document and is vehicle manufacturer specific.
Memory Address
Memory Size
Data Record
The Read Memory By Address request message shall meet the format defined in table below.
Data Value 23
2 3 4
Request Service ID Address And Length Format Identifier Memory Address[2] Memory Size[2]
Read Memory By Address Responses If the response message is positive, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Read Memory By Address Response Service Id 2 Data Record [2] = [data number 1, data number 2]
Positive Response
And if the response message is negative, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Negative Response 2 Read Data By Identifier 3 sub-function
Incorrect Message LengthInvalid Format Conditions Not Correct Request Out of Range Security Access Denied
13 22 31 33
Negative Response
3.7
Security Access
The purpose of this service is to provide a means to access data and/or diagnostic services, which have restricted access for security, emissions, or safety reasons. The security concept uses a seed and key relationship.
Send Key
Description This type specifies that the ECU shall transmit to the test device the so called seed value with a defined security level for calculating an appropriate key value to unlock the ECU. This type signalizes to the ECU that the diagnostic tool transmits now the appropriate key value associated with the seed requested before.
The Security Access request message shall meet the format defined in table below.
Data Byte No. Parameter Name 1 Security Access Request Service ID 2 sub Function = [Security Access type] Request Seed Positive Response Required Send Key Positive Response Required 3 Security key[1]
Security Access Responses If the response message is positive, then response should meet the format, given in below table. Data Byte No. Parameter Name 1 Security Access Response Service Id 2 Security Access Type 3 Security Seed [2] Data Value 67 00-FF 00-FF
Positive Response
And if the response message is negative, then response should meet the format, given in below table.
Sub-Function Not Supported Incorrect Message Length Conditions Not Correct Request Sequence Error Invalid Key Exceeded Number Of Attempts Required Time Delay Not Expired
12 13 22 24 35 36 37
The purpose of this service is to switch on and off the transmission of certain ECU messages. Control Type description Some possible Communication Control types are,
Description This type indicates that the ECU shall enable reception and transmission of messages. This type indicates that the ECU shall enable reception of messages and disable transmission of messages.
The ECU shall perform the requested communication type control after sending the Communication Control positive response message to the diagnostic tool if a positive response is requested (Suppress Position Response Message Indication Bit = FALSE). In case no response is requested from the diagnostic tool (Suppress Position Response Message Indication Bit = TRUE) then the ECU shall perform the requested communication type control immediately after the successful evaluation of the request message. The Communication Control request message shall meet the format defined in the Table below.
Data Byte No. Parameter Name 1 Communication Control Request Service Id 2 Security Function / Sub function Enable Rx And Tx Positive Response Required Enable Rx And Disable Tx Positive Response Required Vehicle Manufacturer Specific Positive Response Required System Supplier Specific Positive Response Required 3 Communication Type Normal Communication Messages Network Management Communication Messages
Communication Control Responses If the response message is positive, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Communication Control Response Service Id 2 Control Type
Positive Response
And if the response message is negative, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Negative Response 2 Communication Control 3 sub-function Sub-Function Not Supported Incorrect Message Length Conditions Not Correct Request Sequence Error
Negative Response
3.9
The Write Data By Identifier service allows the diagnostic tool to write information into the ECU at an internal location specified by the provided data identifier.
Following table defines the possible request and response parameter types,
Data Identifier
Data Record
This parameter identifies the ECUs data record that, the diagnostic tool is requesting to write to. This parameter provides the data record associated with the Data Identifier that the diagnostic tool is requesting to write to.
The Write Data By Identifier request message shall meet the format defined in the Table below,
Parameter Name Write Data By Identifier Request Service Id Data Identifier[2] Data Record [2]
Write Data By Identifier Responses If the response message is positive, then response should meet the format, given in below table.
Positive Response
And if the response message is negative, then response should meet the format, given in below table. Data Byte No. Parameter Name 1 Negative Response 2 Write Data By Identifier 3 sub-function Security Access Denied Incorrect Message Length Conditions Not Correct Request Out Of Range Data Value 7F 2E 00-FF 33 13 22 31
The Input Output Control By Identifier service is used by the diagnostic tool to substitute a value for an input signal, internal ECU function and/or control an output (actuator) of an electronic system. The Input Output Control By Identifier request message shall meet the format defined in the Table below. Data Byte No. 1 2 3 Parameter Name Input Output Control By Identifier Request Service Id Data Identifier[2] Input Output Control Type Return Control To ECU Reset To Default Freeze Current State Short Term Adjustment Data Value 2F 00-FF 00-FF 00 01 02 03
Input Output Control By Identifier Responses The ECU shall send a positive response message if the requested control operation was successfully executed. After an ECU returns a positive response to this service, the diagnostic tool shall assume control over the inputs/outputs specified by the Input Output Data Identifier.
If the response message is positive, then the expected response is as given in the table below.
Parameter Name Input Output Control By Identifier Response Service Id Data Identifier[2] Input Output Control Type
Positive response
And if the response message is negative, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Negative Response 2 Input Output Control By Identifier 3 sub-function Incorrect Message Length Invalid Format
22 31 33
Negative response
3.11
The Write Memory By Address service allows the external diagnostic tool to write information into the ECU at one or more contiguous memory locations.
The Write Memory By Address request message shall meet the format defined in the Table below. Data Byte No. 1 2 3 4 5 Parameter Name Data Value Write Memory By Address 3D Request Service Id Address And Length Format 00-FF Identifier Memory Address[2] 00-FF Memory Size[2] 00-FF Data Record[2] 00-FF
Request Message Definition - Write Memory By Address Write Memory By Address Responses If the response message is positive, then response should meet the format, given in below table.
Data Value 7D
2 3 4
Positive Response
And if the response message is negative, then response should meet the format, given in below table.
Data Byte No. Parameter Name 1 Negative Response 2 Write Memory By Address 3 sub-function Incorrect Message Length Invalid Format Conditions Not Correct Request Out Of Range Security Access denied General Programming Failure
Negative Response
3.12
Tester Present
This service is used to indicate to an ECU or a group of ECUs that a diagnostic tool is still connected to the vehicle and that certain diagnostic services and/or communication that have been previously activated are to remain active. The Tester Present request message shall meet the format defined in the Table below.
Parameter Name Tester Present Request Service Id sub Function Positive Response Required No Positive Response Required
Data Value 3E XX 00 80
Tester Present Responses If the response message is positive, then response should meet the format, given in below table.
Data Value 7E 00
Positive Response
And if the response message is negative, then response should meet the format, given in below table.
Parameter Name Negative Response Tester Present sub-function Sub Function Not Supported Incorrect Message Length Invalid Format
The Control DTC setting service is used by a diagnostic tool to stop or resume the setting of DTCs in the ECU.
DTC setting type description The below table defines the possible DTC Setting types, DTC Setting Type On Off Description This type requires the ECU to enable setting of DTCs. This type requires the ECU to disable setting of DTCs.
The Control DTC Setting request message shall meet the format defined in the Table below.
Parameter Name Control DTC Setting Request Service Id Sub Function On Positive Response Required Off Positive Response Required
If an ECU responds positively to a Control DTC Setting request, the DTC Setting type in the response shall match the DTC Setting sent in the request
If the response message is positive, then response should meet the format, given in below table. Data Byte No. 1 2 Parameter Name Control DTC Setting Positive Response Service Id sub Function Data Value C5 XX
Positive Response
And if the response message is negative, then response should meet the format, given in below table.
Parameter Name Negative Response Control DTC Setting sub-function Sub Function Not Supported Incorrect Message Length Invalid Format Conditions Not Correct Request Out Of Range
Negative Response
Conclusion
Due to much technological advancement, todays cars are more complex than ever before and so the troubleshooting of car's problem has even become more complex and tedious job. Thanks to advanced diagnostic facilities within the car which assist in pin-pointing the exact cause of trouble in a car.
Reference
www.auto-diagnostics.info www.obddiagnostics.com
Comments
Sign in to write a comment
Anonymous Hi Hi thanks a lot for putting these details , its a lot simpler than reading the Standard.... keep up the nice work. Did u happen to do any Single ECU Diagnostics testing using Vector CANoe tool ? I am new to CAPL programming , wondering if you have ever used CDD file to write the CAPL code for automatic testing? Last edited Aug 5, 2011 5:51 AM Report abusive comment +1 View/post replies (1) to this comment Rasmi Ranjan Nayak Software Engineer Bangalore Your rating: No rating Moderated collaboration
Creative Commons Attribution 3.0 License Version: 4 Versions Last edited: Apr 28, 2009 4:19 AM.
Reviews
Be the first to review this knol
Automotive Embedded Question Pointer to an Array And Array of Pointer(s) The Stop Start or Idle Stop Mechanism or Functionality
Knol translations
Help translate this knol into your language. Search for uses of this page
Categories
Automotive Diagnostics Based on community consensus. Sign in to add or vote for categories Learn more about categories