SmcWGetDecelTime


 

功能

读取减速时间。

 

格式

Ret = SmcWGetDecelTime( Id , AxisNo , DecelTime )

 

参数

Id  [ C, C++: short ] [ Python: ctypes.c_short ]

指定由函数SmcWInit获取的硬件设备ID。

 

AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]

指定轴号。

 

DecelTime [ C, C++: double * ] [ Python: ctypes.POINTER(ctypes.c_double) ]

指定保存减速时间的变量地址。単位为[ms]。

 

返回值

Ret [ C, C++: long ] [ Python: ctypes.c_long ]

 

0

正常结束

0以外

异常结束

 

参照:错误代码列表

 

说明

本函数可在轴移动期间实行。

 

使用例

读取轴1的减速时间。

 

C, C++

long Ret;

double DecelTime ;

Ret = SmcWGetDecelTime( Id , 1, &DecelTime );

 

Python

Ret = ctypes.c_long()

DecelTime = ctypes.c_double()

Ret.value = csmc.SmcWGetDecelTime( Id , 1, ctypes.byref(DecelTime) )

 

相关函数

SmcWSetDecelTime