TxPdo 部分
目的:
TwinCAT3 主站接收(28335发送 )
2个模拟量:
F_V input :反馈电压值
F_A input :反馈电流值
F_Speed input :反馈速度值
位置
ethercatinfo --> descriptions --> devices --> device --> TxPdo
更改xml中 TxPdo 模拟量部分 (左图,上图为 未改前;右图,下图为 改后图)
绿色箭头 对齐位
绿圈:重新排序号
红圈 所需变量。
位置 1:
ethercatinfo --> descriptions --> devices --> device --> profile --> dictionary --> datatypes --> datatype --> DT1A02
红箭头 因为增加2个 16bit的模拟量,所以变动。
绿箭头为增加量
程序1
TOBJ1A02 :对应ethercatinfo --> descriptions --> devices --> device --> profile --> dictionary --> datatypes --> datatype --> DT1A02
10:对应ethercatinfo --> descriptions --> devices --> device --> TxPdo 中 10个变量(包含对齐位)
程序2
位置 2:
ethercatinfo --> descriptions --> devices --> device --> profile --> dictionary --> objectss --> object --> #x1a02
绿箭头与DT1a02 相同
红箭头 更改
红圈 对齐位
绿圈:10090206
含义
10: 16进制,标识 16bit
09: 序号
0206: 6020反写。
程序3
程序4
至此,#x1a02 xml dsp 程序更改完毕
改 #x6020
位置 1:
ethercatinfo --> descriptions --> devices --> device --> profile --> dictionary --> datatypes --> datatype --> DT6020
标识位置需要更改。
程序1:
程序2
程序3
两个位置
位置 2:
ethercatinfo --> descriptions --> devices --> device --> profile --> dictionary --> objects --> object --> #x6020
照图更改。
更改 sm
红圈16+绿圈16+16+16+16=80bit,80/8=10byte
程序4
main.c 中 更改
TxPdo xml dsp 更改完毕!