SmcWGetCtrlInOutStatus


機能

制御入出力信号状態を取得します。

書式

Ret = SmcWGetCtrlInOutStatus( Id , AxisNo , CtrlSts )

引数

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 ]
軸番号を指定します。

CtrlSts [ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short) ]
制御入出力状態を格納する変数のアドレスを指定します。

bit7 [ DIRCCW | INP | SD | LTC | CLR | EZ | ERC | PCS ] bit0

PCS

PCS 入力信号

ERC

ERC 出力信号

EZ

EZ 入力信号

CLR

CLR 入力信号

LTC

LTC 入力信号

SD

SD 入力信号

INP

INP 入力信号

DIRCCW

動作方向CCW方向(-方向)

0 信号OFF (DIRCCWの場合、CW方向(+方向))
1 信号ON  (DIRCCWの場合、CCW方向(-方向))

戻り値

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

0

正常終了

0以外

異常終了

参照:エラーコード詳細

説明

この関数は軸が動作中の場合も実行可能です。

使用例

軸番号1の制御入出力信号状態を取得します。

VB.NET
Dim Ret As Integer
Dim CtrlSts As Short
Ret = SmcWGetCtrlInOutStatus( Id , 1, CtrlSts )

C, C++
long Ret;
short CtrlSts;
Ret = SmcWGetCtrlInOutStatus( Id , 1, &CtrlSts );

C#
int Ret;
short CtrlSts;
Ret = Smc.WGetCtrlInOutStatus( Id , 1, out CtrlSts );

Python
Ret = ctypes.c_long()
CtrlSts = ctypes.c_short()
Ret.value = csmc.SmcWGetCtrlInOutStatus( Id , 1, ctypes.byref(CtrlSts) )