Introduction To Report Number Of DTC By Status Mask
The main purpose of the report the number of DTC by the status mask is to know the number of DTC stored in the server memory that will send the DTC count as per the status byte sent b
y the client. If you remember the DTC status byte of a DTC then it will be easy for you to understand it. Basically, the client will send this sub-function with a status byte mask to get to know that how many numbers DTC is having that status byte. The reportNumberOfDTCByStatusMask is an important sub-function of the Read DTC Information in UDS Protocol.Let me explain you with an example. Suppose you are the diagnostic engineer. You received a vehicle from your customer. You need to fix all the issues, service it, and deliver the vehicle. So first you need to know that what are the faults or DTC in this vehicle. The main objective of the Report Number Of DTC By Status Mask sub-function is to get this information from the vehicle. It will tell you exactly how many faults are there.
Role Of Status Mask In 0x19 Service
I hope you already know about the DTC status byte. If you don’t know please go through my Fault Code Status Byte Tutorial. This status byte is generally used by both client and server. It is categorized into two types, such as:
- The client requests a DTC to the server to know the status of a DTC.
- It also sends the status byte by masking any bit of it to know the DTC.
So here in Report Number Of DTC By Status Mask sub-function Identifier, the second point is valid. Generally, you will be expecting the confirmed DTC (0x08). But in the service center, so many difficult issues will be there. That is why they will be masking those bits as per their requirement. So that they will get to know the number of faults or DTC is there in the server.
Because of this reason, the status mask byte plays a vital role in the Report Number Of DTC By Status Mask sub-function Identifier. Let us discuss with a real-time example having request and response frame format.
Request Message For Report Number Of DTC By Status Mask
This below table explains how a client requests to server for Report Number Of DTC By Status Mask.
PCI | Client Request SID | SBF ID | DTC Status Mask Byte (Confirmed DTC) | NULL | NULL | NULL | NULL |
---|---|---|---|---|---|---|---|
0x03 | 0x19 | 0x01 | 0x08 | 0x00 | 0x00 | 0x00 | 0x00 |
In the above table, it is a single frame whereas the PCI byte is 0x03. LSB 4-bit defining the data length is 3 and MSB 4-bit defining the single frame is 0. Service Identifier is 0x19 is fixed for reading DTC. The first sub-function 0x01 is used to read the number of DTC count available in ECU fault memory which status byte masked with 0x08.
Positive Response Message For Report Number Of DTC By Status Mask
PCI | +Ve Response SID | SBF ID | Status Availability Mask | DTCFI | DTCC-1 | DTCC-2 | B7 |
---|---|---|---|---|---|---|---|
0x06 | 0x59 | 0x01 | 0x0F | 0x01 | 0x00 | 0x0A | 0x00 |
In the above table, you would have understood up to sub-function. The next bit is 0xFF is called a Status availability mask. basically, this byte sent by the server to the client.
But now you would have thought why and how. Yes before doing any diagnostic, you should know that what is the fault status is supported by this server or ECU.
The next Bit (0xB4) is 0x0A is the Number of DTC count. That means the status byte requested by the client was 0x08 (b00001000) is nothing but the confirmed DTC. So there are 10 (0x0A) DTCs are available in this vehicle or ECU.
PCI (0x06): PCI Header with 0 defines single frame and 6 defines the 6 bytes of diagnostic data.
PRSID (0x59): 2nd byte defines the Positive response service identifier and 0x19 + 0x40 is 0x59, that means it is a positive response service identifier.
SBF-ID (0X01): 3rd byte is the Sub-function identifier is oxo1 means it is for report number of DCT by status mask.
SAM (0x0F): 4th byte is 0x0F byte is called the Status availability mask.
DTCFI (0x01): 5th byte is the DTC format Identifier. the DTC (Diagnostic Trouble Code) Format Identifier is used to specify the format and structure of the DTCs that are being reported. This identifier is part of the 0x19 service (ReadDTCInformation), which is used to read information related to DTCs stored in an ECU (Electronic Control Unit). here, 0x01 means it is as per the ISO-14229 standard for mat DTC and it is 3 byte DTC.
DTCC (0x0A): A 2-byte value indicating the number of DTCs matching the status mask. Here, the value 0x0A indicating that there are 10 DTCs matching the status mask.
Status Availability Mask In 0x19 Service
The Status Availability Mask is nothing like that the DTC status is 1-byte data. Each bit is having a specific status definition, so all the status bits will be used. It depends upon the OEM what are the status bits will be implemented for this ECU as per the requirement. So before doing any diagnostic, the server will send the supported DTC status byte to the client in this sub-function.
The Status Availability Mask is an 8-bit field that is part of the response message in the 0x19 service. Each bit in this mask represents a specific DTC status bit, indicating whether the corresponding status is supported by the ECU.
You can look above the response message from the server. In Bit-3, the 0xFF is the status availability mask byte. This byte defines that all the status bits are supporting in this server.
Negative Response Message For Report Number Of DTC By Status Mask
PCI (B0) | -Ve Response SID (B1) | Requested SID (B2) | NRC | B4 | B5 | B6 | B7 |
---|---|---|---|---|---|---|---|
0x03 | 0x7F | 0x19 | 0x12 | 0x00 | 0x00 | 0x00 | 0x00 |
In the above table, The byte-0 is 0x03 is the data length of this single frame. The negative response message identifier is 0x7F in byte-1. The byte-2 is the service identifier having 0x19
Supported NRC for Report Number Of DTC By Status Mask
The reportNumberOfDTCByStatusMask sub-function of the Read DTC information Service Identifier is supporting 3 negative response codes.
Negative Response Code (NRC) Value | NRC Name | Description |
---|---|---|
0x12 | Sub-function Not supported | This will be sent by the server if the sub-function is not supported in this server. |
0x13 | Incorrect Message Length or Invalid Format | This will be sent by the server if the message is wrong |
0x31 | Request Out of range | if the DTC mask byte requested by the client is not supported or recognized by the server. If the client specified an invalid DTC Snapshot Record Number or DTC Extended Data Record Number. If the Client defined a Functional Group Identifier that is not recognized by the server. If the Memory selection Identifier is not recognized by the server. |
The above-explained negative response codes are the same for the Read DTC information service. But for each sub-function, will be having a different scenario. This depends on the system engineer, how they are defining it for that particular ECU.
Dear Automotive Engineers!
If you feel that this article helping you sharpen your knowledge in diagnostic, please do like, follow, and review, SO That you are an engineer, yes I am saying to you. please share it with your friends.
Discover more from PiEmbSysTech
Subscribe to get the latest posts sent to your email.
Best Embedded System Website is PiEmbSysTech who provides deep knowledge in free of cost.
Thank you PiEmbSysTech
Thank You Saswat