- 使用串口转CAN模块,波特率460800(可以软件或者硬件进行设置)
选择指令模式进行命令的发送
USB2CAN抓包结果为
[06/07/2020 18:45:48] Written data
41 54 00 00 18 04 08 00 00 13 88 00 00 00 00 0d AT........?.....
0a .
[06/07/2020 18:45:49] Written data
41 54 00 00 18 04 08 00 00 13 88 00 00 00 00 0d AT........?.....
0a .
[06/07/2020 18:46:00] Written data
41 54 00 00 18 04 08 00 00 13 88 00 00 00 00 0d AT........?.....
0a .
[06/07/2020 18:46:05] Written data
41 54 00 00 18 04 08 00 00 13 88 00 00 00 00 0d AT........?.....
0a .
[06/07/2020 18:46:06] Written data
41 54 00 00 18 04 08 00 00 13 88 00 00 00 00 0d AT........?.....
0a .
[06/07/2020 18:46:07] Written data
41 54 00 00 18 04 08 00 00 13 88 00 00 00 00 0d AT........?.....
0a .
位置是绝对位置
选择指令模式: 帧格式为扩展帧 帧类型为数据帧
一、位置控制45度发送的报文 :41 54 00 00 20 04 04 02 AE A5 40 0D 0A
指令ID 地址 : 04 00
计算方式 45*1 000 000 转为16进制 02 AE A5 40
二、转速5000rpm发送的报文:41 54 00 00 18 04 04 00 00 13 88 0D 0A
指令ID 地址 : 03 00
三、占空比50%发送的报文:41 54 00 00 00 04 04 00 00 13 88 0D 0A
指令ID 地址 : 00 00
1*1e3 --> 1%
50 *1e3 -- > 50%
100*1e3 -- > 100%
- 串口发送设置转速5000rpm 电机保持运行
[06/07/2020 13:45:00] Written data
02 05 08 00 00 13 88 44 8d 03 ......圖?..
[06/07/2020 13:45:00] Written data
02 01 1e f3 ff 03 ...?.
[06/07/2020 13:45:00] Written data
02 01 1e f3 ff 03 ...?.
[06/07/2020 13:45:01] Written data
02 01 1e f3 ff 03 ...?.
[06/07/2020 13:45:01] Written data
02 01 1e f3 ff 03 ...?.
[06/07/2020 13:45:01] Written data
02 01 1e f3 ff 03 ...?.
[06/07/2020 13:45:02] Written data
02 01 1e f3 ff 03 ...?.