EtherCAT xml配置文件编写和DSP程序适配,以 ET1100与DSP28335为例(4)

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 更改完毕!

  • 1
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值