機能
パルス出力状態を取得します。
書式
Ret = SmcWGetPulseStatus( Id , AxisNo , PulseSts )
引数
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
]
軸番号を指定します。
PulseSts
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short)
]
パルス出力状態を格納する変数のアドレスを指定します。
0 |
パルス出力停止中 |
1 |
開始速度(FL速度)で定速動作中 |
2 |
目標速度(FH速度)で定速動作中 |
3 |
同期スタート待ち |
4 |
ERCタイマ完了待ち |
5 |
方向変化タイマ完了待ち |
6 |
加速動作中 |
7 |
減速動作中 |
8 |
INP入力待ち状態 |
戻り値
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
0 |
正常終了 |
0以外 |
異常終了 |
参照:エラーコード詳細
説明
この関数は軸が動作中の場合も実行可能です。
使用例
軸番号1のパルス出力状態を取得します。
VB.NET
Dim Ret As Integer
Dim PulseSts As Short
Ret = SmcWGetPulseStatus( Id , 1, PulseSts )
C, C++
long Ret;
short PulseSts ;
Ret = SmcWGetPulseStatus( Id , 1, &PulseSts );
C#
int Ret;
short PulseSts ;
Ret = Smc.WGetPulseStatus( Id , 1, out PulseSts );
Python
Ret = ctypes.c_long()
PulseSts = ctypes.c_short()
Ret.value = csmc.SmcWGetPulseStatus( Id , 1, ctypes.byref(PulseSts) )