汽车诊断之UDS入门-0x19 0x01/0x02服务

DTCStatusMask

DTCStatusMask 包含8个 DTC status bit。 定义见下表所示。0x19 请求消息中使用此字节可使client 请求状态与 DTCStatusMask 匹配的 DTC 信息。 如果任何一个 DTC 的实际状态位设置为 ‘1 ’,并且 DTCStatusMask 中相应的状态位也设置为 ‘1 ’,则 DTC 状态与 DTCStatusMask 匹配  (即如果 DTCStatusMask 按bit与 DTC 实际状态进行"与"逻辑运算且结果为非零, 则双方匹配)。 如果client指定了一个状态掩码,其中包含ECU不支持的bits,则ECU应仅使用它支持的bits处理 DTC 信息。

表 1 DTC status bit definitionDTC状态位定义

bit

Bit field name

位的名称

Description

描述

Value

0

testFailed

This bit shall indicate the result of the most recently performed test.

指示最近一次测试的结果。

0=most recent result from DTC test indicated no failure detected. 最近的DTC测试中结果中没有故障。

1=most recent result from DTC test indicated a matured failing result. 最近的DTC测试中结果中有确认的故障。

1

testFailedThisOperationCycle

This bit shall indicate whether or not a diagnostic test has reported a testFailed result at any time during the current operation cycle (or that a testFailed result has been reported during the current operation cycle and after the last time a call was made to ClearDiagnosticInformation).

指示在当前的操作循环中1次诊断测试是否报告了testFailed的结果(或在当前操作循环中以及上次 ClearDiagnosticInformation 后指令后,报告了testFailed的结果)

0=testFailed: result has not been reported during the current operation cycle or after a call was made to ClearDiagnosticInformation during the current operation cycle. 在当前操作循环或在此期间清除了故障码操作后,没有故障报告出来

1=testFailed: result was reported at least once during the current operation cycle.it shall remain a '1' until a new operation cycle is started. 在当前操作循环,故障已至少报告了一次,该值应保持为1直至新操作循环开始。

2

pendingDTC

This bit shall indicate whether or not a diagnostic test has reported a testFailed result at any time during the current or last completed operation cycle. The status shall only be updated if the test runs and completes. The criteria to set the pendingDTC bit and the TestFailedThisOperationCycle bit are the same. The difference is that the testFailedThisOperationCycle is cleared at the beginning of each operation cycle and the pendingDTC bit is not cleared until an operation cycle has completed where the test has passed at least once and never failed.
If the test did not complete during the current operation cycle, the status bit shall not be changed. For example, if a monitor stops running after a confirmed DTC is set, the pendingDTC shall remain set = '1'. For an OBD DTC, a pending DTC is required to be stored after a malfunction is detected during the first driving cycle.

指示当前操作循环或上次操作循环中是否报告了testFailed,仅当测试操作完成后才能更新该状态位。

0=This bit shall be set to 0 after completing an operation cycle during which the test completed and a malfunction was not detected or upon a call to the ClearDiagnosticInformation service.  当完成了一个测试操作循环且没有检测到故障或者调用了故障清除后没有检测到故障。

1=This bit shall be set to 1 and latched if a malfunction is detected during the current operation cycle. 在当前操作循环中检测到故障,设该位为1。

在当前操作循环中,该bit应保持不变。

3

confirmedDTC

This bit shall indicate whether a malfunction was detected enough times to warrant that the DTC is desired to be stored in long-term memory.
A confirmedDTC does not always indicate that the malfunction is present at the time of the request. (testFailed can be used to determine if a malfunction is present at the time of the request).
Reset to logical '0' after a call to ClearDiagnosticInformation or after aging threshold has been satisfied (e.g. 40 engine warm-ups without another detected malfunction). Furthermore, this bit is reset when the fault record associated with this DTC is overwritten by a newer DTC based upon vehicle manufacturer specific fault memory overflow requirements.
DTC confirmation threshold and aging threshold are defined by the vehicle manufacturer or mandated by On Board Diagnostic regulations. 

表示故障是否被检测到足够多的次数来将其存储到long-term memory, 故障被检测到并不意味着请求时故障存在(testFailed可以表示请求时故障存在);

发送清除故障码或达到老化阈值(40个暖机循环里未检测到故障)则置"0";

0=DTC has never been confirmed since the last call to ClearDiagnosticInformation or after the aging criteria have been satisfied for the DTC (or DTC has been erased due to fault memory overflow). 自从上次清故障指令或满足DTC老化标准后没有确认的故障码(或由于故障记录内存溢出),该位设为0。

1= DTC confirmed at least once since the last call to ClearDiagnosticInformation and aging criteria have not yet been satisfied. 自从上次清除故障后且还未达老化条件,故障码至少被确认了一次,该位设为1。

4

testNotCompletedSinceLastClear

This bit shall indicate whether a DTC test has ever run and completed since the last time a call was made to ClearDiagnosticInformation. One ('1') shall indicate that the DTC test has not run to completion. If the test runs and passes or if the test runs and fails (e.g. testFailedThisOperationCycle = '1') then the bit shall be set to a '0' (and latched).

表示自上次诊断信息被清除后DTC测试是否运行完成。

0=DTC test has returned either a passed or failed test result at least one time since the last time diagnostic information was cleared. 在诊断信息被清除后,故障码测试至少返回一次成功或失败的结果

1=DTC test has not run to completion since the last time diagnostic information was cleared. 诊断信息被清除后,故障码测试没有完成

5

testFailedSinceLastClear

This bit shall indicate whether a DTC test has completed with a failed result since the last time a call was made to ClearDiagnosticInformation (i.e. this is a latched testFailedThisOperationCycle = '1').

表示自上次诊断信息被清除后DTC测试是否运行完成并返回1个失败的结果(即testFailedThisOperationCycle = '1')。
Zero ('0') shall indicate that the test has not run or that the DTC test ran and passed (but never failed). If the test runs and fails then the bit shall remain latched at a '1'. It is the responsibility of the vehicle manufacturer to specify whether or not this bit is reset by aging-criteria or reset due to an overflow of the fault memory.

“0”表示测试未运行或测试已运行并且通过(没有故障发生)。如果测试运行且检测到故障,该参数值保持在“1”。

整车厂应负责定义是否通过老化准则或者故障内存溢出来重置该bit。

0=DTC test has not indicated a failed result since the last time diagnostic information was cleared. 在最近一次清除故障信息后,故障码测试没指示有故障。

1=DTC test returned a failed result at least once since the last time diagnostic information was cleared. 在最近一次清除故障信息后,测试返回至少1次故障。

6

testNotCompletedThisOperationCycle

This bit shall indicate whether a DTC test has ever run and completed during the current operation cycle (or completed during the current operation cycle after the last time a call was made to ClearDiagnosticInformation).
A logical '1' shall indicate that the DTC test has not run to completion during the current operation cycle. If the test runs and passes or fails then the bit shall be set (and latched) to '0' until a new operation cycle is started.

表示当前操作循环是否有DTC测试运行完成(或者自上次故障清除后,当前操作循环否有DTC测试运行完成)

0=DTC test has returned either a passed or testFailedThisOperationCycle = '1' result during the current drive cycle (or since the last time diagnostic information was cleared during the current operation cycle).

在当前驾驶循环中(或当前驾驶循环中自最近的一次故障清除后),故障码测试返回1个通过或者testFailedThisOperationCycle = '1' 的结果。

'1' = DTC test has not run to completion this operation cycle (or since the last time diagnostic information was cleared this operation cycle). 在当前驾驶循环中(或当前驾驶循环中自最近的一次故障清除后),测试没有完成本次操作循环。

7

warningIndicatorRequested

This bit shall report the status of any warning indicators associated with a particular DTC. Warning outputs may consist of indicator lamp(s), displayed text information, etc. If no warning indicators exist for a particular DTC, this status shall default to a logic '0' state.
Conditions for activating the warning indicator shall be defined by the vehicle manufacturer/implementation, but if the warning indicator is on for a given DTC, then confirmedDTC shall also be set to '1' (with the exception described below).

报告与某个具体DTC相关的任何警告指示状态。输出的警告可能包含指示灯、显示的文本信息等。如果某个具体DTC没有相关的警告指示,该bit置“0”。

警告指示的激活条件应由整车厂或者实施方来定义,但是如果某个给定的DTC相关的警告指示已开启,ConfirmedDTC应该同步置“1”(下方failsafe策略情况除外)。

0=Server is not requesting warningIndicator to be active ECU没有请求警告指示激活

1=Server is requesting warningIndicator to be active

ECU请求警告指示激活

下方以排放相关OBD DTC 的2个操作循环DTC status bit 概览为例,非排放相关OBD DTC同理。

Figure D.9 defines an example of a two operation cycle emissions-related OBD DTC.

 Key

0 ClearDiagnosticInformation received → initialization of DTC status byte.清除收到的故障信息→初始化DTCstatus byte
1, 2  the related diagnostic monitor reported a sufficient number of passed test samples fulfilling the DTC pass criteria → testNotCompleted bits (4 and 6) change from 1 to 0, indicating the monitor has run to completion and the DTC readiness has been reached since last clear and for operation cycle 1

相关的诊断监测报告足够多次测试通过样本满足DTC通过准则→testNotCompleted bits (4 and 6) 从 1 改成 0,表示监测完成,对于操作循环1自上次清除后已达到 DTC 就绪状态
3,4,5,6
the related diagnostic monitor reported a sufficient number of failed test samples fulfilling DTC failed criteria → testFailed, testFailedThisMonitoringCycle, pendingDTC and testFailedSinceLastClear bits change from 0 to 1 indicating a malfunction has been detected but the malfunction has not been confirmed over 2 operation cycles

相关的诊断监测报告足够多次测试fail样本满足DTCfail准则→ testFailed,testFailedThisMonitoringCycle,pendingDTC,testFailedSinceLastClear从 0改成 1表示已检测到故障但在2个操作循环中未确认故障。
7
the related diagnostic monitor reported a sufficient number of passed test samples fulfilling DTC passed criteria → testFailed bit changes from 1 to 0 indicating the malfunction is currently not active

相关的诊断监测报告足够多次测试通过样本满足DTC通过准则→testFailed从 1改成 0表示故

障当前未发生。
8
the related diagnostic monitor reported a sufficient number of failed test samples fulfilling DTC failed criteria → testFailed bit changes from 0 to 1 indicating a malfunction has been detected repeatedly in operation cycle 1

相关的诊断监测报告足够多次测试fail样本满足DTCfail准则→testFailed从 0改成 1表示在操作循环1中故障多次被检测到。
9, 10
operation cycle 1 ends and operation cycle 2 starts, testFailedthisOperationCycle changes from 1 to 0 and testNotCompleteThisOperationCycle changes from 0 to 1; it is manufacturer specific if this reset is executed at the very end of the operation cycle or at the immediately after starting the new cycle

操作循环 1结束,操作循环2开始,testFailedthisOperationCycle从1改到0,

testNotCompleteThisOperationCycle从0改到1,整车厂定义是否在操作循环结尾重启或者在新操作循环开始后离开重启。
11
After a new operation cycle has started the state of Bit 0 is retained from the previous operation cycle.

在新操作循环开启后,该bit保持上个操作循环时的值“0”。
12
after a new operation cycle has started the related diagnostic monitor reported a sufficient number of passed

新操作循环开始后,相关的诊断监测报告足够多次通过。

DTCStatusAvailabilityMask

A byte whose bits are defined the same as statusOfDTC and represents the status bits that are supported by the server. Bits that are not supported by the server shall be set to '0'. Each supported bit (indicated by a value of '1') shall be implemented for every DTC supported by the server.

表示ECU支持的DTC status bit,不支持的bits将会被置0,每个支持的bit(置1)应被ECU的所有DTC支持。

DTCFormatIdentifier

This 1-byte parameter value specifies the format of a DTC reported by the server.A given server shall support only one DTCFormatIdentifier.

1个字节表示ECU报告的DTC格式按照哪个规范的定义。某个给定的ECU应仅支持1种DTC格式。

DTCCount

This 2-byte parameter refers collectively to the DTCCountHighByte and DTCCountLowByte parameters that are sent in response to a reportNumberOfDTCByStatusMask request. DTCCount provides a count of the number of DTCs that match the DTCStatusMask defined in the client’s request.

2个字节参数包含DTCCountHighByte 和DTCCountLowByte,用于0x19 0x01 reportNumberOfDTCByStatusMask请求响应,提供与请求中DTCStatusMask匹配的DTC总数。

DTCAndStatusRecord

This parameter record contains one or more groupings of DTCHighByte, DTCMiddleByte, DTCLowByte and statusOfDTC if of ISO_14229-1_DTCFormat, SAE_J2012-DA_DTCFormat_00, SAE_J1939-73_DTCFormat, SAE_J2012-DA_DTCFormat_04 or ISO_11992-4_DTCFormat. The SAE_J1939-73_DTCFormat supports the SPN (Suspect Parameter Number), FMI (Failure Mode Identifier), and OC (Occurrence Counter) parameters. The SPN, FMI, and OC are defined in SAE J1939.

DTCHighByte, DTCMiddleByte and DTCLowByte together represent a unique identification number for a specific diagnostic trouble code supported by a server.

该参数包含满足ISO_14229-1_DTCFormat, SAE_J2012-DA_DTCFormat_00, SAE_J1939-73_DTCFormat, SAE_J2012-DA_DTCFormat_04 或ISO_11992-4_DTCFormat格式的1组或多组DTCHighByte, DTCMiddleByte, DTCLowByte and statusOfDTC。如果满足SAE_J1939-73_DTCFormat,支持SPN (Suspect Parameter Number), FMI (Failure Mode Identifier), and OC (Occurrence Counter)参数,上述参数在SAE J1939有定义。

DTCHighByte, DTCMiddleByte 和 DTCLowByte代表了ECU支持的某个DTC的独有的ID。

0x19 0x01 通过检索client定义的DTC状态掩码(status mask)获取对应的DTC数量

Subfunction=01 reportNumberOfDTCByStatusMask

Response:

DTCStatusAvailabilityMask: ECU支持的DTC status bits indication

DTCFormatIdentifier:DTC 格式和编码

DTCCount:2个字节的无符号数,基于client提供的状态掩码,ECU内存中可用的DTC数量。

0x19 0x02 通过检索client定义的DTC状态掩码(status mask)获取对应的DTC列表

Subfunction=02 reportDTCByStatusMask

ECU应将client端请求中定义的掩码和ECU支持的每个DTC相关的实际的状态按位进行逻辑“与”运算。如果运算结果不是0(即statusOfDTC&DTCStatusMask)!=0),除DTCStatusAvailabilityMask之外,ECU应返回所有DTC。

如果client定义的状态掩码包含ECU不支持的位,ECU应只使用字节支持的位来处理DTC信息。如果ECU内部没有和client请求中定义的掩码规则匹配的DTC,则在肯定响应中,应没有DTC或状态信息在DTCStatusAvailabilityMask字节后被提供。

当成功收到client端发送的清除诊断信息ClearDiagnosticInformation的请求时,DTC状态信息应被清除。

请求格式

响应格式

0x19 0x01举例

 该例子展示了确认的DTC(status mask 为0x08),subfunction=reportNumberOfDTCByStatusMask的用例,ECU端DTCStatusAvailabilityMask  = 0x2F.

ECU支持一共3个DTC,在client发出请求时,DTC状态如下:

 

 

仅有1个DTC返回给client,因为仅有DTC P2522-1F A/C Request “B” - circuit intermittent (0x25221F),的DTC status bit 0x2F (0010 1111)与client端请求中的DTCStatusMask0x08(0000 1000)进行“与”运算结果不为0.

 0x19 0x02返回DTC举例

该例子展示了subfunction=reportDTCByStatusMask SubFunction的用例,ECU支持除了bit7 “warningIndicatorRequested”以外的其它所有DTC status bit,共3个DTC,在client发出请求时,DTC状态如下:

ECU向client 响应返回了2个DTC,分别为 DTC P0A9B-17 (0x0A9B17)(statusOfDTC of 0x24(0010 0100) )和 P0805-11 (0x080511) (statusOfDTC of 0x2F(0010 1111) ),由于 DTC P2522-1F (0x25221F) 的 status 是 0x00, 与client请求中的DTCStatusMask of 0x84(1000 0100)进行“与”运算为0,所以该DTC未在响应中返回. 

0x19 0x02不返回DTC举例

该例子展示了subfunction=reportDTCByStatusMask SubFunction的用例,此时没有DTC与client端定义的DTCStatusMask匹配(“与”运算结果为0)。

ECU支持除了bit7 “warningIndicatorRequested”以外的其它所有DTC status bit,共2个DTC,在client发出请求时,DTC状态如下:

上述ECU均不返回client请求,因为在请求时没有DTC failed.

  • 5
    点赞
  • 44
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值