エンコーダパラメータの設定

Namespace: FVIL.Video
Assembly: FVILdevice (in FVILdevice.dll) Version: 3.1.0.0 (3.1.0.5)

Syntax

C#
public virtual void SetEncoderParam(
	uint mode,
	uint start,
	uint phase,
	uint direction,
	uint zenable,
	uint comp1,
	uint comp2
)
Visual Basic
Public Overridable Sub SetEncoderParam ( 
	mode As UInteger,
	start As UInteger,
	phase As UInteger,
	direction As UInteger,
	zenable As UInteger,
	comp1 As UInteger,
	comp2 As UInteger
)

Parameters

mode
Type: System..::..UInt32
エンコーダモード設定( 0:エンコーダスキャンモード 1:エンコーダライン選択モード )
start
Type: System..::..UInt32
エンコーダ起動 ( 0:CPU 1:エンコーダ外部トリガ )
phase
Type: System..::..UInt32
エンコーダパルス( 0:AB相 1:A相 )
direction
Type: System..::..UInt32
エンコーダ回転方向 ( 0:CW 1:CCW )
zenable
Type: System..::..UInt32
Z相使用設定 ( 0:使用しない 1:使用する )
comp1
Type: System..::..UInt32
比較レジスタ1
comp2
Type: System..::..UInt32
比較レジスタ2

Remarks

エンコーダのパラメータを設定します。

modeエンコーダモード設定:
意味
0エンコーダスキャンモード(一致パルス間が露光周期となるモード)
1エンコーダライン選択モード(一致パルスが取込のトリガとなるモード 露光を一定に保ちたい場合などに使用します。)
startエンコーダ起動:
意味
0CPU
1エンコーダ外部トリガ
phaseエンコーダパルス:
意味
0AB相
1A相
directionエンコーダ回転方向:
意味
0CW
1CCW
zenableZ相使用設定:
意味
0使用しない
1使用する
comp1比較レジスタ1:
意味
任意に設定エンコーダカウントをcomp1の設定分、待機しトリガ出力
comp2比較レジスタ2:
意味
任意に設定エンコーダカウントをcomp2の設定の倍数のとき、トリガ出力

処理に失敗した場合は例外を発行します。 例外の原因と発生位置を特定するには、発行された例外クラスの ErrorCode メンバと Function メンバを参照してください。

エラーコード:

ErrorCode メンバ内容
25FVIL.ErrorCode.NOT_OPENEDデバイスがオープンされていません。
11FVIL.ErrorCode.INVALID_PARAMETER引数に指定された値が不正です。
31078FVIL.Video.ErrorCode.SET_PARAMETERパラメータの設定に失敗しました。
31079FVIL.Video.ErrorCode.GET_PARAMETERパラメータの取得に失敗しました。

Exceptions

ExceptionCondition
FVIL..::..CFviExceptionこの例外の原因については、上記のエラーコード表をご参照ください。

See Also