功能
执行动作中的电机的速度或停止位置变更。
格式
Ret = SmcWMotionChange( Id , AxisNo )
参数
Id [ C, C++: short ] [ Python: ctypes.c_short ]
指定由函数SmcWInit获取的硬件设备ID。
AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]
指定轴号。
返回值
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
|
0 |
正常结束 |
|
0以外 |
异常结束 |
参照:错误代码列表
说明
本函数不可在轴停止期间实行。
停止位置变更仅可用于PTP动作。
在最终减速阶段,不能更改速度。
动作变更设置通过函数SmcWSetMotionChangeReady进行。
使用例
执行轴1的电机移动速度或停止位置变更。
C, C++
long Ret;
Ret = SmcWMotionChange( Id , 1);
Python
Ret = ctypes.c_long()
Ret.value = csmc.SmcWMotionChange( Id , 1)
相关函数
SmcWSetInitParam SmcWMotionStop