機能
モータの停止要因を取得します。
書式
Ret = SmcWGetStopStatus( Id , AxisNo , StopSts )
引数
Id
[ 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
]
軸番号を指定します。
StopSts
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short)
]
モータの停止要因を格納する変数のアドレスを指定します。
0 (H) |
動作中 |
1 (H) |
停止コマンド |
2 (H) |
減速停止コマンド |
3 (H) |
他軸の停止 |
4 (H) |
アラーム/緊急停止信号 |
5 (H) |
正方向リミット停止信号 |
6 (H) |
負方向リミット停止信号 |
7 (H) |
減速停止信号 |
FF (H) |
動作関数の終了 |
戻り値
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
0 |
正常終了 |
0以外 |
異常終了 |
参照:エラーコード詳細
説明
この関数は軸が動作中の場合も実行可能です。
使用例
軸番号1のモータの停止要因を取得します。
VB.NET
Dim Ret As Integer
Dim StopSts As Short
Ret = SmcWGetStopStatus( Id , 1, StopSts )
C, C++
long Ret;
short StopSts ;
Ret = SmcWGetStopStatus( Id , 1, &StopSts );
C#
int Ret;
short StopSts ;
Ret = Smc.WGetStopStatus( Id , 1, out StopSts );
Python
Ret = ctypes.c_long()
StopSts = ctypes.c_short()
Ret.value = csmc.SmcWGetStopStatus( Id , 1, ctypes.byref(StopSts) )