Friday, 13 May 2022 16:01

CAN 报文编码学习笔记:汽车CAN协议测试——发送与接收

工具:1、车厂协议,2、CAN盒模拟器+CANTest软件,3、CAN接收终端(GSM+GPS),4、平台

一、确定要模拟数据在CAN1或CAN2:
Can study test 1

二、波特率、报文格式:
Can study test 2

三、需要模拟CAN协议部分:
Can study test 3

四、公式:物理值(实际值)=总线值*分辨率+偏移量--------一道数学题

假设要模拟的总电流=87.5A,求总线值是多少?结果转换为十六进制?

解:87.5=总线值×0.1+(-1000)

总线值N=10875(十进制)——转换二进制N=0010 1010 0111 1011——转换十六进制2A7B

五、填入CAN报文:

由第二步知道Intel格式:

            0   1   2   3   4   5   6    7

报文:00 00 00 00 00 7B 2A 00    

由三得ID=0x1CFF1627 

波特率250K

通道CAN1

**************************持续更新中****************************

六、CANtest工具发送及接收
Can study test 4

七、通过平台解析或串口打印显示87.5A:
Can study test 5

Read 22891 times

GPS singal acquisition,replay and test equipment

Portable singal acquisition and replay

AI intelligent tongue imager

Tongue imager rafavi
 
Please support our site by viewing this advertisement.

Please support our site by viewing this advertisement

Free Content