如何在T-CPU中激活挂在DP总线的第二套编码器作为测量系编码器
图3
7.完成编码器参数设定后,保存编译。
三、关于"MC_ChangeDataset"功能块的应用体会
1.编码器变换发生的时间,有四种选择。
①NEVER:
Data record changeover not allowed. "MC_ChangeDataset" is terminated with
error (ErrorID = 8045).
②IN_POSITION:
(Default setting in S7T Config after an axis was inserted)
Changeover of the data record takes place when the active motion has
reached the programmed positioning window. Position control must be enabled
at the axis. If the axis is disabled, the data record is changed over immediately
after the axis is enabled.
The data records are not changed at following axes which are in synchronism
(InSync = TRUE or InGear = TRUE) Use the value IN_STANDSTILL or
IMMEDIATELY for following axes
③IN_STANDSTILL:
The data record is changed over when the standstill signal of the relevant axis
is output The data record is changed immediately after the axis has stopped
④?IMMEDIATELY:
The data record is changed over immediately
这四种方式可以通过轴属性下的专家参数设定,也可以通过"MC_WriteParameter"功能块切换,主要根据工艺。默认为"IN_POSITION:",图4给出在专家参数下设定为"IMMEDIATELY",主要为调试方便。 图4.1
图4.2
2.功能块执行的有效期
当测量从第一套编码器切换到第二套编码器后,不管"MC_ChangeDataset"功能块中的"Execute"信号处于什么状态,上次执行的切换一直有效。
评论