DioGetPatternEventStatus


機能

フェイルセーフ機能のイベント動作の状態を取得します。

書式

Ret = DioGetPatternEventStatus( Id, Status )

引数

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

Status [ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short) ]
イベント動作の状態を返します。

[Dec]

意味

0

イベント未発生

1

イベント動作中

戻り値

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

定義

[Dec]

意味

DIO_ERR_SUCCESS

0

正常終了

DIO_ERR_DLL_INVALID_ID

10001

無効なIDが指定されました。

その他のエラー(参照:エラーコード詳細

初期値

なし

説明

フェイルセーフ機能のイベント動作の状態を取得します。関数の第2引数にはイベント発生状態が格納されます。

使用例

デバイスのイベント動作の状態を取得します。

VB.NET

Dim Ret As Integer
Dim Status As Short
Ret = DioGetPatternEventStatus ( Id , Status )
 

C, C++

long Ret;
short Staus;
Ret = DioGetPatternEventStaus ( Id , &Status );
 

C#

int Ret;
short Status;
Ret = dio.GetPatternEventStatus ( Id , out Status );
 

Python

Ret = ctypes.c_long()
Staus = ctypes.c_short()
Ret.value = cdio.DioGetPatternEventStaus ( Id , ctypes.byref(Status) )
 

関連項目

DioResetPatternEvent