カウンタのカウント方向を取得します。
Ret = AioGetCntDirection ( Id , CntChannel , CntDirection )
Id [ VB:Integer C:short Delphi:Smallint ]
AioInit 関数で取得したデバイスIDを指定します。
CntChannel [ VB:Integer C:short Delphi:Smallint ]
カウンタのチャネルを設定します。現在は0固定です。
CntDirection [ VB:Integer C:short * Delphi:PSmallint ]
カウンタのカウント方向を格納する変数のアドレスを指定します。
|
0 |
アップカウント |
|
1 |
ダウンカウント |
|
2 |
アップカウント、ダウンカウント両方 |
Ret [ VB:Long C:long Delphi:Longint ]
|
0 |
正常終了 |
|
10001 |
無効なIDが指定されました |
|
10002 |
ドライバを呼び出せません |
|
1---- |
CntChannelの値が関数の指定範囲外です |
|
1---- |
CntDirectionのポインタがNULLです |
|
20001 |
使用しているデバイスではこの関数を使用することができません |
|
20002 |
デバイスが動作中のため実行できません |
|
20003 |
他のプロセスがデバイスを使用しているため、実行できません |
|
2---- |
CntChannelの値がデバイスの指定範囲外です |
全てのデバイスでアップカウント
カウンタ機能を持たないデバイスでは使用できません。
デバイスが動作中の場合、この関数は実行できません。
|
VB |
Ret = AioGetCntDirection ( Id , 0 , CntDirection ) |
|
C |
Ret = AioGetCntDirection ( Id , 0 , &CntDirection ); |
|
Delphi |
Ret := AioGetCntDirection ( Id , 0 , @CntDirection ); |
AioSetCntDirection