快使用Ctrl+D收藏本站!本站早已不再维护,择期将关闭本站!!本站资源已全部失效,请勿打赏!!PLC培训创业官网 苏州实操派科技-点击访问-

EtherCAT通信状态判断Axis.wCommunicationState

AM600 π³朱子文 15681℃ 0评论

EtherCAT通信状态的获取,

NO SMC_CommunicationState Axis.wCommunicationState
0 SMC_COMSTATE_NOT_STARTED 0
1 SMC_COMSTATE_VARIABLE_INITIALIZATION, 1~8
2 SMC_COMSTATE_BASE_COM_INITIALIZATION 10
3 SMC_COMSTATE_DRIVE_INITIALIZATION 20~29
4 SMC_COMSTATE_DRIVE_WAITING_FOR_SYNC 80
5 SMC_COMSTATE_INITIALIZATION_DONE 90~91
6 SMC_COMSTATE_OPERATIONAL 100
7 SMC_COMSTATE_REINITIALIZATION 200~210
8 SMC_COMSTATE_ERROR 1000~1999(其值就是为1~7 状态对应值加 1000 ,在1~7 状态下故障后对应状态加 1000
9 SMC_COMSTATE_UNKNOWN 未知状态


一般状态为 SMC_COMSTATE_OPERATIONAL 100 )后可以开始使能 (MC_ 。 通讯原因到时轴异常后该变量一般会为 SMC_COMSTATE_ERROR 1100 )。其他参数:

Bool类型 bCommunication 为 TRUE 表示该轴通讯正常, False 则反之;
测试测试bCommunicationbCommunication、、wCommunicationStatewCommunicationState、、Ethercat.xDistributedClockInSyncEthercat.xDistributedClockInSync三者之间三者之间的关系。的关系。下图为下图为PLCPLC上电总线初始化时上电总线初始化时
1.SMC_COMSTATE_DRIVE_WAITING_FOR_SYNC=80SMC_COMSTATE_DRIVE_WAITING_FOR_SYNC=80时时bCommunication=TRUEbCommunication=TRUE;;
2. 同步一段时间后同步一段时间Ethercat.xDistributedClockInSync=TRUEEthercat.xDistributedClockInSync=TRUE;
3. wCommunicationState =100wCommunicationState =100时时

下图为运行中 DC 同步丢失后三者关系:
1. Ethercat.xDistributedClockInSync=false 时 bCommunication 在同一个周期为 False
2. wCommunicatio nState 一直为 100


下图为运行中 DC 再次同步上三者关系:
1.Ethercat.xDistributedClockInSync=TRUE时 bCommunication 在同一个周期为 TRUE
2.wCommunicationState一直为 100


PLC上电总线初始化完成同步丢失 wCommunicationState 一直为 100

转载请注明:燕骏博客 » EtherCAT通信状态判断Axis.wCommunicationState

赞赏作者

微信赞赏支付宝赞赏

喜欢 (16)or分享 (0)

如果您喜欢本站文章,感觉本站的资源对您有帮助,请狠狠点击下面

每累计赞助40元,即可让本站按最低配置运行一个月,感谢您的支持!

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址