本文是基于CANdelaStudio12.0讲解
一.把DTC从Excel导入cdd的方法
问题一:当导入DTC的xxx.cdi文件报如下红色错误
可能原因:在设置具有下拉框的属性的内容时,输入的内容不在下拉框列表中
解决办法:在.cddt文件中更新“”Error Code Table“”内容,把新的选项更新进去,以下以“Corrective action”为例
DTC Export...导出的.cdi文件格式如下:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!-- -->
<!-- CANdelaStudio.exe 12.0 (12.0.100) -->
<!-- CdiExport.dll 12.0 (12.0.100) -->
<!-- -->
<CANDELAIMPORT dtdfilevers="1.5.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<IMPORTDOC>
<DTCCOLLECTION formatidentifier="ISO_14229_1">
<DTCPOOL type="normal"/>
<RECORDTEMPLATEMAPPING>
<ITEMMAPPING id="_1">DTC_SHORTNAME</ITEMMAPPING>
<ITEMMAPPING id="_2">SetCondition</ITEMMAPPING>
<ITEMMAPPING id="_3">ResetCondition</ITEMMAPPING>
<ITEMMAPPING id="_4">CorrectiveAction</ITEMMAPPING>
<ITEMMAPPING id="_5">SpecialInstruction</ITEMMAPPING>
<ITEMMAPPING id="_6">DTC_OPERATION_CYCLE</ITEMMAPPING>
<ITEMMAPPING id="_7">DTC_AGING_SUPPORTED</ITEMMAPPING>
<ITEMMAPPING id="_8">DTC_AGING_CYCLE</ITEMMAPPING>
<ITEMMAPPING id="_9">DTC_AGING_COUNTER</ITEMMAPPING>
<ITEMMAPPING id="_10">DTC_INIT_MONITOR_REQUIRED</ITEMMAPPING>
<ITEMMAPPING id="_11">DTC_PRIORITY_VALUE</ITEMMAPPING>
<ITEMMAPPING id="_12">DTC_SEVERITY_VALUE</ITEMMAPPING>
<ITEMMAPPING id="_13">DTC_DEBOUNCING_ALGORITHM</ITEMMAPPING>
<ITEMMAPPING id="_14">DTC_STEP_SIZE_PREFAILED</ITEMMAPPING>
<ITEMMAPPING id="_15">DTC_STEP_SIZE_PREPASSED</ITEMMAPPING>
<ITEMMAPPING id="_16">DTC_JUMP_UP_PREFAILED</ITEMMAPPING>
<ITEMMAPPING id="_17">DTC_JUMP_DOWN_PREPASSED</ITEMMAPPING>
<ITEMMAPPING id="_18">DTC_WARNING_INDICATOR_FLAG</ITEMMAPPING>
<ITEMMAPPING id="_19">DTC_FUNCTIONAL_UNIT_VALUE</ITEMMAPPING>
<ITEMMAPPING id="_20">DTC_PRECONFIRMED_THRESHOLD</ITEMMAPPING>
<ITEMMAPPING id="_21">DTC_FAILED_THRESHOLD</ITEMMAPPING>
<ITEMMAPPING id="_22">DTC_PASSED_THRESHOLD</ITEMMAPPING>
<ITEMMAPPING id="_23" type="A">Status</ITEMMAPPING>
<ITEMMAPPING id="_24" type="A">RequirementsId</ITEMMAPPING>
</RECORDTEMPLATEMAPPING>
<DTCS>
<DTC number="12687495">
<ERRORTEXT>与TBOX通信丢失</ERRORTEXT>
<RECORD>
<RECORDITEM itemmappingref="_1">TBOX节点丢失</RECORDITEM>
<RECORDITEM itemmappingref="_2">1. IG ON后1s
2.不处于bussoff状态
3. 蓄电池电压正常(9V~16V)或从蓄电池电压异常恢复1s后
4.85 02未被激活
5.接收的TBOX任意一帧周期报文连续丢失5帧</RECORDITEM>
<RECORDITEM itemmappingref="_3">所有周期报文接收到连续5帧</RECORDITEM>
<RECORDITEM itemmappingref="_4">TBOX通讯丢失</RECORDITEM>
<RECORDITEM itemmappingref="_5">引起故障可能的原因: 域控制器从MCU未正确检测到主MCU通讯数据</RECORDITEM>
<RECORDITEM itemmappingref="_6">DEM_POWER</RECORDITEM>
<RECORDITEM enumindex="1" itemmappingref="_7">not supported</RECORDITEM>
<RECORDITEM itemmappingref="_8">DEM_POWER</RECORDITEM>
<RECORDITEM itemmappingref="_9">0</RECORDITEM>
<RECORDITEM itemmappingref="_10">not required</RECORDITEM>
<RECORDITEM itemmappingref="_11">20</RECORDITEM>
<RECORDITEM enumindex="0" itemmappingref="_12">noSeverity</RECORDITEM>
<RECORDITEM enumindex="2" itemmappingref="_13">Application based</RECORDITEM>
<RECORDITEM itemmappingref="_14">0</RECORDITEM>
<RECORDITEM itemmappingref="_15">0</RECORDITEM>
<RECORDITEM enumindex="1" itemmappingref="_16">Yes</RECORDITEM>
<RECORDITEM enumindex="0" itemmappingref="_17">No</RECORDITEM>
<RECORDITEM enumindex="1" itemmappingref="_18">not supported</RECORDITEM>
<RECORDITEM itemmappingref="_19">0xFF</RECORDITEM>
<RECORDITEM itemmappingref="_20">0</RECORDITEM>
<RECORDITEM itemmappingref="_21">0</RECORDITEM>
<RECORDITEM itemmappingref="_22">0</RECORDITEM>
<RECORDITEM enumindex="0" itemmappingref="_23">in progress</RECORDITEM>
</RECORD>
</DTC>
</DTCS>
</DTCCOLLECTION>
</IMPORTDOC>
</CANDELAIMPORT>
诊断调查表, Available DTCs Fault Memory(24 Bit),cdi文件三者的对应关系如下:诊断调查表的表头黑色部分是原始内容,红色部分是Available DTCs Fault Memory(24 Bit)内容,绿色部分内容对应的是cdi文件内容
需要特别注意的是:cdi文件中的DTC号显示为十进制,Available DTCs Fault Memory(24 Bit)显示的是16进制,具体怎么转换可以参考文章:DTC标准故障码格式解析
16进制转10进制,Excel中可以用HEX2DEC函数转换!
完整的操作步骤是:
1.先把最新的cdd文件保存为cddt文件
2.在cddt文件中更新“”Error Code Table“”内容,并保存
3.File->New->选择刚刚更新好的cddt模版文件,并保存为cdd文件
4.在保存好的cdd文件里继续更新“Available DTCs Fault Memory(24 Bit)”
二.服务ID的定义(只能在cddt文件中定义)
比如sessions 对应的service ID是0x10,这个定义是在cddt文件中的Protocol Services里定义
1.新建service ID定义的方法
2.查看service ID定义的方法:
3.Diagnostic Class中类使用Protocol Services的方法