![This image has an empty alt attribute; its file name is 图片1.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%871.png)
建立一个诊断任务。
输入要读取的ECU 内存地址,点击Copy to Tranmit Table.
![This image has an empty alt attribute; its file name is 图片2.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%872.png)
![This image has an empty alt attribute; its file name is 图片3.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%873.png)
对于要进行程序控制或自动生成的部分,如上图中的 B3 – Address, 定义一个signal 与其相关联:
![This image has an empty alt attribute; its file name is 图片4.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%874.png)
然后进入 function block 编程:
![This image has an empty alt attribute; its file name is 图片5.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%875.png)
Start writing or type / to choose a block
![This image has an empty alt attribute; its file name is 图片6.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%876.png)
Start writing or type / to choose a block
![This image has an empty alt attribute; its file name is 图片7-1024x611.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%877-1024x611.png)
![This image has an empty alt attribute; its file name is 图片8.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%878.png)
选择开始条件 为手动控制:
![This image has an empty alt attribute; its file name is 图片9.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%879.png)
![This image has an empty alt attribute; its file name is 图片10.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%8710.png)
开始和停止按钮。 运行结果,每隔 3 秒发送一个 $23 诊断命令,其中的 Address 是程序控制的。
![This image has an empty alt attribute; its file name is 图片11-1024x488.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%8711-1024x488.png)
对于ECU 返回的响应,也可以去解析,在 Receive 中定义 Signal, 方法和在 TX 中定义 Signal 一样。在Receive 中,Arb ID, B1 – B8 里填的是ECU 返回的响应的报文的特征,比如 7E0 诊断指令的响应必定是 7E8,那么可以把 7E8 填入ArbID.
又比如,某些响应的第一字节B1 必定是 45, 也可以填进去作为特征。
填好特征以后,Message view 中遇到满足特征条件的接收到的消息就按照其定义的 Signal来解析Image
![This image has an empty alt attribute; its file name is 图片12.png](https://www.intrepidcs.net.cn/wp-content/uploads/2019/02/%E5%9B%BE%E7%89%8712.png)