GetAxisVelocity

获取轴之当前速度,此速度可为设定速度或实际速度。

语法

KsError GetAxisVelocity(
     int Index,
     McSource Source,
     double* Velocity
);

参数

Index:轴的索引。索引以零为起点;别名将影响此参数。

Source:选择欲读取的速度值,请见 McSource 类型。

Velocity:接收速度的值指标。

回传值

如果此函式执行成功,会回传 errNoError,否则会传回错误码。如需更多有关错误码的资讯,请参阅 KsError 清单。

范例

复制
double axisVel = 0.0;
KsError nRet = GetAxisVelocity(0, McSource::mcSetValue, &axisVel);

使用需求

  RT Win32
最低支援版本 4.0 4.0
标头档 ksmotion.h ksmotion.h
程式库 KsApi_Rtss.lib KsApi.lib

参见

GetAxisFollowingError

GetAxisPosition

GetAxisTorque

SetAxisVelocity