功能
读取输出脉冲的目标速度。
格式
Ret = SmcWGetTargetSpeed( Id , AxisNo , TargetSpeed )
参数
Id [ C, C++: short ] [ Python: ctypes.c_short ]
指定由函数SmcWInit获取的硬件设备ID。
AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]
指定轴号。
TargetSpeed [ C, C++: double * ] [ Python: ctypes.POINTER(ctypes.c_double) ]
指定保存目标速度的变量地址。単位为[pps]。
返回值
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
|
0 |
正常结束 |
|
0以外 |
异常结束 |
参照:错误代码列表
说明
本函数可在轴移动期间实行。
使用例
读取轴1的输出脉冲的目标速度。
C, C++
long Ret;
double TargetSpeed
Ret = SmcWGetTargetSpeed( Id , 1, &TargetSpeed );
Python
Ret = ctypes.c_long()
TargetSpeed = ctypes.c_double()
Ret.value = csmc.SmcWGetTargetSpeed( Id , 1, ctypes.byref(TargetSpeed) )
相关函数