SmcWMotionStop


機能

軸のモータ動作を停止します。

書式

Ret = SmcWMotionStop( Id , AxisNo )

引数

Id [ VB: Integer ] [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
SmcWInit 関数で取得したデバイスIDを指定します。

AxisNo [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
軸番号を指定します。

戻り値

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

0

正常終了

0以外

異常終了

参照:エラーコード詳細

説明

モータ停止中は実行できません。

関数を実行すると、同期動作対象軸も同時に停止します。これにより同時停止が可能です。

本関数実行後の停止に要する時間は、関数実行からLSIへのアクセス時間に加え
最長で「動作速度の1周期」のばらつきが生じます。
これは使用LSIの仕様です。

上記ばらつきに追従し、各種ステータスの「動作停止」状態を示すステータスも、上記時間分のばらつきが生じます。

例:
     動作速度 100[pps] の場合、その1周期は、10[ms] となります。

使用例

軸番号1のモータ動作を停止します。

VB.NET
Dim Ret As Integer
Ret = SmcWMotionStop( Id , 1)

C, C++
long Ret;
Ret = SmcWMotionStop( Id , 1);

C#
int Ret;
Ret = Smc.WMotionStop( Id , 1);

Python
Ret = ctypes.c_long()
Ret.value = csmc.SmcWMotionStop( Id , 1)

関連項目

SmcWMotionStart SmcWMotionDecStop