DTC相关数据解析及Davinci配置

 DTC检测相关概念

运行周期(Operation Cycle, OC)

注意不要与检测周期(TestPeriod)混淆

常见的运行周期有以下几种:

操作循环的类型描述
DEM_OPCYC_IGNITIONKL15电on与off之间的循环,也叫点火循环
DEM_OPCYC_POWERKL30电on与off之间的循环,可以理解为ECU从完全断电到供电的过程。
DEM_OPCYC_OBD_DCYMaster ECU通过总线提供driving cycle的信息。Primary ECU不应当内部计算driving cycle。
DEM_OPCYC_WARMUPwarm-up是指发动机预热达到某个预设温度。warm-up循环一般是针对排放相关DTC 所设定的循环周期。

项目中采用了DEM_OPCYC_POWER类型的OC

在Dem模块中,可在Dem/DemGeneral/DemOperationCycle配置OC类型

检测运行条件(Test Run Criteria, TRC)

对某个DTC对应的故障进行检测的前提条件,如果不满足TRC条件,则不对其进行检测

在Dem模块中:

1.可在Dem/DemGeneral/DemEnableConditions中配置每条TRC条件。

2.在Dem/DemGeneral/DemEnableConditionGroups中将独立的条件组合成条件组,以便于绑定
DemEvent

3.在Dem/DemConfigSet/DemEventParameter/DemEventClass中,为DTC配置对应的TRC条件组

检测周期(Test Period)

即DTC对应故障的检测周期,在运行周期开始且检测条件满足后,相应的检测模块便开始按照指定周期。对DTC进行检测,将结果传递给Dem模块

Dem_SetEventStatus(Dem_EventIdType parg0, Dem_EventStatusType EventStatus)

// 传递事件到Dem的接口

周期检测逻辑为Swc代码实现,无Dem配置项

错误检测计数器(Fault Detection Counter, FDC)

  • FDC为DTC的错误检测计数器:

        当某个DTC故障被检测为存在时,FDC增加,步进值(Step up)可以设为特定值;

        当该故障被检测为不存在时,FDC减小,步减值(Step down)可以设为特定值。

  • FDC的计数范围一般为 -128~127,也可设置为特定值

        当FDC达到127时,触发TestFailed;

        当FDC达到-128时,触发TestPassed。

  • 调节步进值和检测周期可以更改DTC的滤波次数和时间,例如:

        当StepUp为9时,需要连续127 / 9 + 1 = 15个检测周期都检测出故障,才会判断为TestFailed

        若检测周期为20ms,则该故障持续存在15 × 20ms = 300ms才会触发DTC的TestFailed

  • 同时还可以设置Jump up/Jump down并且指定对应的JumpUpValue/JumpDownValue

        Jump up:如果一个DTC在FDC为负时检测到存在故障,则FDC应先跳转至JumpUpValue,再增加Step up

        Jump down:如果一个DTC在FDC为正时检测到故障消失,则FDC应先跳转至
JumpDownValue,再减少Step Down

UnconfirmedDTCLimit

注意不要与confirmedDTCLimit混淆

此值通常与冻结帧(快照)的记录时机相关联,是针对FDC的阈值,

即当FDC ≥ unconfirmedDTCLimit时,采样冻结帧数据(记录快照)

在Dem中,可通过DemEvent的Storage Threshold参数进行配置

配置Snapshot的记录时机时,对应选项为DEM_TRIGGER_ON_FDC_THRESHOLD。

需要将DemPrimaryMemory中的Event Memory Entry Storage Trigger也配置成
DEM_STORAGE_ON_FDC_THRESHOLD,一些在FDC达到confirmedDTCLimit时需要记录的数据才能及时更新

确认阈值(Confirmation Threshold)

常见的confirmedDTCLimit和confirmation Threshold含义相同

confirmedDTCLimit是针对于OCC(Operating Cycle Counter,运行周期计数器)的阈值。即当用于记录故障连续发生的OCC(项目为OCC6)计数值大于confirmedDTCLimit时,对应的DTC状态位bit3:Confirmed位置1。

注意:是故障连续发生而不是故障发生,也就是说故障发生后,在到达confirmedDTCLimit之前如果故障恢复,则在下一操作循环之后的下一循环开始时清除此OCC

在Dem中,可通过DemEventFailureCycleCounterThreshold来进行配置,但是要注意该配置项的值实际应配置为confirmedDTCLimit - 1,因为该配置项指定的是当前OC检测到Failed后,到
Confirmed还需的额外的连续故障OC数,而非总的OC值

当confirmedDTCLimit为1时,FailureCycleCounterThreshold应设置为0,因为此时一旦检测到故障就可触发Confirmed,不需要额外的OC
同理,当confirmedDTCLimit为3时,FailureCycleCounterThreshold应设置为2,因为当前OC检测到故障后,还需要连续2个OC检测到故障,才能触发Confirmed

DTC老化(DTC Aging)

当某个DTC在一定次数的操作循环内不在出现时,将存储中关于这个DTC的信息从内存中清除的行为称为老化

  • 老化计数(Aging Counter):连续报告没有故障的Operation Cycle数。
  • Aging Counter开始计数的条件是DTC状态位中:

        testFailed=0

        PendingDTC=0

        ConfirmedDTC=1

  • 老化条件:

        诊断故障已经存在在primary memory中

        在连续的aging cycle中,诊断故障结果都为Passed

        当Aging counter大于等于DemAgingCycleThreshold(老化阈值)时,该故障便老化

假设一个DTC的aged DTC Limit = 1,当前OC成为ConfirmedDTC后,又持续检测成功步长到-128,当前OC该DTC仍为ConfirmedDTC,只有到下一个OC,该ConfirmedDTC才会消失

DemClearDTCNotification

清除完DTC后会有一个callback函数

ExtendData(拓展数据)

OCC1:Operation cycle counter #1

对于ECU支持的所有DTC,DTCExtendedDataRecordNumber=1标识的计数器:

CYCLES_SINCE_LAST_FAILED: (1 Byte) Number of completed operation cycles, since the last transition of the TestFailed Bit from 0 to 1 of the DTC. The value is reset at the first failed result in the operation cycle, latches at 255. The counter is processed and readable only for currently stored events.

Number of operation cycles (including the current operation cycle) since the DTC fault
detection counter 10 last reached the value +127 (since DTC information was last cleared).
All operation cycles, including those during which the test was not passed shall be included.

  • 定义:

        自上次清除DTC信息以来,DTC的FDC10首次达到127后的下个操作循环到当前操作循环的操作循环数。包括测试通过(Passed)的操作循环。

  • 自增/清零标准:

        计数器应在每个操作循环开始时递增。
        一旦FDC10达到值+127,应立即清除计数器(清零)。
        如果发生任何计数操作,导致计数器滚动超过0xFF,则计数值应保持在0xFF。

  • 上报:1字节无符号数(U8)

OCC2:Operation cycle counter #2

对于ECU支持的所有DTC,DTCExtendedDataRecordNumber=2标识的计数器:

CYCLES_TESTED_SINCE_LAST_FAILED: (1 Byte) Number of completed and tested operation cycles, since the last transition of the TestFailed Bit from 0 to 1 of the DTC (Healing  Counter). The value is reset at the first failed result in the operation cycle, latches at 255. The value is always available.

Number of operation cycles (including the current operation cycle) since the DTC fault
detection counter 10 last reached the value +127 (since DTC information was last cleared).
The operation cycles during which the test was not passed shall be excluded.

  • 定义:

        自上次清除DTC信息以来,DTC的FDC10首次达到127后的下个操作循环到当前操作循环的操作循环数。应排除测试未完成的操作循环。其中测试未完成的操作循环包括not passed和not failed.

  • 自增/清零标准:

        在完成FDC10达到127的运行周期后,在下个运行周期开始时,遇到test passed计数器应自增。
        一旦FDC10达到值+127,应立即清除计数器(清零)。
        如果发生任何计数操作,导致计数器滚动超过0xFF,则计数值应保持在0xFF。

  • 上报:1字节无符号数(U8)

OCC3:Operation cycle counter #3

对于ECU支持的所有DTC,DTCExtendedDataRecordNumber=3标识的计数器:

CYCLES_TESTED_SINCE_FIRST_FAILED: (1 Byte) Number of completed and tested operation cycles since the cycle of the first transition of the TestFailed Bit from 0 to 1 of the DTC. The value latches at 255. The counter is processed and readable only for currently stored events.

Number of operation cycles (including the current operation cycle) since the DTC fault
detection counter 10 first reached the value +127 (since DTC information was last cleared).
All operation cycles, including those in which the test has not been passed or the DTC fault
detection counter 10 has not reached the value +127 shall be included.

  • 定义:

        自DTC故障检测计数器10(FDC10)首次达到值+127(自上次清除DTC信息以来)以来的操作循环数(包括当前操作循环)。应包括所有操作循环,包括未通过测试或FDC10未达到值+127的操作循环。

  • 自增/清零标准:

       在FDC10首次达到值+127的操作循环之后的每个操作循环开始时,计数器应自增。如果发生任何计数操作,导致计数器滚动超过0xFF,则计数值应保持在0xFF。

        如果发生任何计数操作,导致计数器滚动超过0xFF,则计数值应保持在0xFF。

  • 上报:1字节无符号数(U8)

OCC4:Operation cycle counter #4

对于ECU支持的所有DTC,DTCExtendedDataRecordNumber=4标识的计数器:

FAILED_CYCLES: (1 Byte) Number of operation cycles, since last DTC clear in which the DTC was tested 'failed', including the current cycle. The value is incremented at the first failed result in the operation cycle, latches at 255.
If Dem/DemGeneral/DemSupportStorageIndependentCycleCounters is not enabled the counter is processed and readable only for currently stored events. Otherwise the counter is processed and readable at all times (see also Dem/DemGeneral/DemExtendedDataVisibility).

Number of operation cycles (including the current operation cycle) during which the DTC fault detection counter 10 reached the value +127 (since DTC information was last cleared).

  • 定义:

        故障诊断码FDC10自上次清除故障诊断码信息以来达到值+127的运行周期数(包括当前运行
周期)。

  • 自增/清零标准:

        在每个操作循环中,FDC10第一次达到值+127时,计数器应立即自增。

        如果发生任何计数操作,导致计数器滚动超过0xFF,则计数值应保持在0xFF。

  • 上报:1字节无符号数(U8)

OCC6:Operation cycle counter #6

对于ECU支持的所有DTC,DTCExtendedDataRecordNumber=6标识的计数器:

CONSECUTIVE_FAILED_CYCLES: (1 Byte): Number of consecutive operation cycles in which the DTC was tested 'failed', including the current cycle. The value is incremented at the first failed result in the operation cycle and reset at the end of an operation cycle that was tested and not tested 'failed'.The value latches at 255. The counter is processed and readable only for currently stored events.

The number of consecutive operation cycles (including the current operation cycle) during
which the DTC fault detection counter 10 reached the value of +127 (since DTC information
was last cleared).
The operation cycles during which the test was not completed shall be excluded. The
minimum range of the counter is 0-15.

  • 定义:

       DTC的FDC10达到+127值(自上次清除DTC信息以来)的连续运行周期数(包括当前运行周
期)。

        应排除测试未完成(completed)的操作循环。

        计数器的最小范围为0-15。

  • 自增/清零标准:

        在每个操作循环中,FDC10第一次达到值+127(0x7F)时,计数器应立即递增。
        在FDC10在没有达到值+127,而是-128(0x80)的操作循环之后的下一循环开始时,应清除计数器(如果FDC10也没有达到值-128,则计数器应保持其值)
        当达到confirmedDTCLimit时,计数器也可以被清除。
        如果发生任何计数操作,导致计数器滚动超过0xFF,则计数值应保持在0xFF。

  • 上报:1字节无符号数(U8)

图解项目OCC

FDC10:DTC fault detection counter

对于ECU支持的所有DTC,应实现一个由DTCExtendedDataRecordNumber=10标识的计数器,并根据以下附加定义进行:

  • 定义:

        a. 在新的运行周期开始时,计数值应为0。
        b. 在同一运行周期内的测试运行之间,即使测试运行由于测试运行条件不满足而被阻塞,计数值也应保持。
        c. 在FDC10达到+127或-128之前,DTC测试可以完成(即DTC状态位4和6设置为0),并在FDC10达到-128之前通过(即DTC状态位0设置为0),前提是这得到了OEM指定的负责机构的批准。
        d. 计数器的最大值可以设置为+126(这意味着DTC状态位(除了位4和6)的值永远不会被设置,它们将保持不变),前提是这得到了OEM指定的负责机构的批准,或者如果本文档规定了,应设置为+126。
        e. 每次DTC测试运行并产生测试样本失败或通过结果时,计数值应更新(增加或减少)。
                i. 如果连续测试样本失败结果的次数超过127以达到testFailedLimit +127(从起始值0开
始),
                ii. 或者如果连续测试样本通过结果的次数超过128以达到testPassedLimit -128(从起始值0开始),
计数值将无法更新(增加或减少)。
        f. 如果一个测试样本在计数值为负时返回失败结果,新的计数值应设置为如果当前计数值为0时的结果(代表失败结果的测试样本总是会导致故障检测计数器增加到0以上)(即启用JumpUp且JumpUpValue为0)。
        g. 如果一个测试样本在计数值为正时返回通过结果,新的计数值应设置为如果当前计数值为0时的结果(代表通过结果的测试样本总是会导致故障检测计数器减少到0以下)(即启用
JumpDown且JumpDownValue为0)。

  • 上报:1字节有符号数(S8),范围在-128到+127。

FDC12:Maximum DTC fault detection counter since last clear

对于ECU支持的所有DTC,应根据以下定义实现一个由DTCExtendedDataRecordNumber=12标识的计数器:

  • 定义:计数值应等于自上次清除DTC信息以来FDC10达到unconfirmedDTCLimit后的最大值。
  • 上报:1字节有符号数(S8)

DTC Time Stamp 20

对于ECU支持的所有DTC,应根据以下定义执行DTCExtendedDataRecordNumber=20识别的数据记录:

  • 定义:记录值应等于自上次清除DTC信息以来,FDC10首次达到unconfirmedDTCLimit的值时所取的全局实时(DID:0xDD00)。
  • 上报:4字节无符号数(U8[4])。

DTC Time Stamp 21

对于ECU支持的所有DTC,DTCExtendedDataRecordNumber=21识别的数据记录:

  • 定义:

        记录值应等于自上次清除DTC信息以来,FDC10最近一次达到unconfirmedDTCLimit的值时所用的全局真实时间(DID:0xDD00)。

        如果FDC10在一个运行周期内多次达到unconfirmedDTCLimit的值,则应仅使用第一次的时间
戳。

  • 上报:4字节数组。

DTC Time Stamp 22

对于ECU支持的所有DTC,DTCExtendedDataRecordNumber=22标识的数据:

  • 定义:数据值应等于自上次清除DTC信息以来,FDC10首次达到等于或大于unconfirmedDTCLimit的值时所用的GNSS时间(DID:0xDD07)。
  • 上报:6字节数组。

DTC Time Stamp 23

对于ECU支持的所有DTC,DTCExtendedDataRecordNumber=23标识的数据:

  • 定义:

        记录值应等于FDC10最近一次达到unconfirmedDTCLimit的值时所用的GNSS时间(DID:0xDD07)。

        如果FDC10在一个运行周期内多次达到unconfirmedDTCLimit的值,则应仅在第一次记录该时
间戳。

  • 上报:6字节数组。

DTC Status indicator 30(SI30)

对于ECU支持的所有DTC,应执行DTCExtendedDataRecordNumber=30(SI30)标识的状态指示器记录,但前提是至少有一个状态指示器位正在执行。

• 定义:
        ◦ Bit 0:UnconfirmedDTC
                ▪ 当FDC10达到范围[unconfirmedDTCLimit,+127]中的值时,该位应设置为1
                ▪ 当FDC10达到值-128时,该位应重置为0。
                ▪ unconfirmedDTCLimit的值由实施者根据DTC校准通用要求一节中规定的要求指定。
                ▪ 该值应在[+1,+127]的范围内。
        ◦ Bit 1:unconfirmedDTCThisOperationCyle
                ▪ 当FDC10达到范围[unconfirmedDTCLimit,+127]中的值时,该位被设置为1。
                ▪ 该位应在操作循环开始时重置为0。
        ◦ Bit 2:UnconfirmedDTCsineLastClear
                ▪ 当FDC10达到范围[unconfirmedDTCLimit,+127]中的值时,该位被设置为1。
        ◦ Bit 3:AgedDTC
                ▪ 当DTC老化时,该位设置为1。
                ▪ 当老化的DTC再次出现时,该位将重置为0。
        ◦ Bit 4:SymptomSinceLastClear
                ▪ 当FDC10在[unconfirmedDTCLimit,+127]的范围内,并且满足实施者指定的客户症状所需满足的特定条件时,该位应设置为1。
        ◦ Bit 5:WarningIndicatorRequestedSinceLastClear
                ▪ 当DTC状态位第7位设置为1时,该位应设置为1
                ▪ 然而,即使DTC状态位第7位——warningIndicatorRequested没有设置为1,该位也可能被设置为1:
                ▪ 该位也可能在DTC状态位第3位——confirmed DTC置为1之前被设置为1,并且可能会请求警告指示。
                ▪ 需要注意的是,在设置该位为1并请求警告指示之前,无论何时,自DTC信息最后一次被清除以来,FDC10必须已经达到+127的值(除非本文档中另有说明)
                ▪ 此位仅对支持DTC状态位7——warningIndicatorRequested的ECU是强制性的

        ◦ Bit 6:EmissionRelatedDTC
                ▪ 当DTC与排放相关时,该位应设置为1。
                ▪ 此位仅对支持EmissionRelatedDTC的ECU是强制性的。
        ◦ Bit 7:testFailedSinceLastClear/Aged
                ▪ 当DTC测试失败时,即当FDC10达到值+127时,该位设置为1。
                ▪ 当DTC老化时,即SI30:3设置为1时,该位重置为0。
                • 上报:1字节无符号数(U8)。

相关Dem配置

1. 在/Dem/DemGeneral/DemDataClass配置出基本数据

2. 在/Dem/DemGeneral/DemExtendedDataRecordClass中配置ExtendData的相关属性

3. 在/Dem/DemGeneral/DemExtendedDataClass中配置出完整的ExtendData数据组,以便于绑定
DemEvent

4. 在Dem/DemConfigSet/DemEventParameter中为DTC绑定ExtendData

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值