跳到主要内容

MC_ReadMotionState(读取运动状态)

功能

通过共享前端快照读取轴运动状态

输入参数与返回值

参数类别数据类型功能
Enable输入BOOL启用时连续读取
Source输入MC_SOURCE选择运动状态评估的数据源
Valid输出BOOL一组有效输出可用
Busy输出BOOL功能块正在处理请求
Error输出BOOL功能块错误
ErrorID输出WORD功能块错误代码
ConstantVelocity输出BOOL轴处于匀速状态
Accelerating输出BOOL轴正在加速
Decelerating输出BOOL轴正在减速
DirectionPositive输出BOOL运动方向为正向
DirectionNegative输出BOOL运动方向为负向
Axis输入输出AXIS_REF轴引用
信息

MC_SOURCE:

  • mcNullValue(0)
  • mcSetValue(1)
  • mcActualValue(2)
  • mcCommandedValue(3)

用法示例

MC_ReadMotionState_0(
Enable := Enable,
Source := Source,
Valid => Valid,
Busy => Busy,
Error => Error,
ErrorID => ErrorID,
ConstantVelocity => ConstantVelocity,
Accelerating => Accelerating,
Decelerating => Decelerating,
DirectionPositive => DirectionPositive,
DirectionNegative => DirectionNegative,
Axis := Axis
);