set_image_source_param🔗
説明🔗
set_image_source_param — 画像ソースのパラメータを設定する。
書式🔗
set_image_source_param( image_source ImageSourceHandle, string Param, attribute.name GenParamName, attribute.value GenParamValue, string Value )
説明🔗
オペレータ set_image_source_param は、
画像ソースハンドル ImageSourceHandle の Value にパラメータ値を設定します。
画像ソースの概念に関する詳細は、Image Source を参照してください。
パラメータは Param を使用して指定します。
パラメータグループは汎用パラメータを使って指定できます。
GenParamName には以下のオプションを使用できます:
-
'group'
GenParamValueに以下のいずれかを設定することで、パラメータが属するグループを指定します:-
'image_source'
-
'plugin'
-
'interface'
-
'local_device'
-
'device'
-
'stream'
汎用パラメータが指定されていない場合は、デフォルトで
GenParamName= 'group'、GenParamValue= 'device' が設定されます。 -
-
'command_wait' コマンドの実行完了を待機するかどうかを指定します(ブロッキング操作)。
値のリスト 'false'、 'true'
デフォルト値 'true'
制限:
Paramが 'command' 型の場合にのみ有効です。 -
'command_wait_interval' コマンドの実行完了を確認するためのポーリング間隔 [ms]。
デフォルト値 100
制限:
Paramが 'command' 型の場合にのみ有効です。 -
'command_wait_timeout' コマンドの実行完了を待機する最大時間 [ms]。
デフォルト値 5000
制限:
Paramが 'command' 型の場合にのみ有効です。
どのパラメータ Param が設定可能かは、画像ソースおよびその状態に依存します。
一部のパラメータはハードウェアまたはソフトウェアの提供元に依存し、
また一部のパラメータは画像ソースが接続されているかどうかに依存します。
ただし、 'image_source' グループのパラメータは常に使用可能です。
以下は set_image_source_param を使って設定可能なパラメータの一覧です。
各パラメータの詳細は get_image_source_param を参照してください:
-
'device_access_flags'
-
'device_id'
-
'device_query_timeout'
-
'device_user_name'
-
'device_serial_number'
-
'fetch_timeout'
-
'interface_id'
-
'interface_query_timeout'
-
'num_buffers'
-
'plugin_name'
-
'plugin_path'
-
'stream_id'
MVTecが提供するプラグインについては、 MVTec Interfaces Reference Documentationにすべてのプラグイン固有のパラメータが記載されています。
設定対象のパラメータは Param で指定します。
パラメータに設定する値は Value に渡す必要があります。
'command' 型のパラメータは、Value に 'execute' を設定することで実行されます。
実行情報🔗
実行情報
-
マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)
-
マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)
-
並列演算処理には未対応
パラメーター🔗
ImageSourceHandle (input_control) image_source → (handle)
画像ソースのハンドル
Param (input_control) string → (string)
値を設定する対象のパラメータ
GenParamName (input_control) attribute.name-array → (string)
汎用パラメータ名
初期値: []
推奨値: 'group', 'command_wait', 'command_wait_timeout', 'command_wait_interval'
GenParamValue (input_control) attribute.value-array → (integer / real / string)
汎用パラメータ値
初期値: []
推奨値: 'image_source', 'plugin', 'interface', 'local_device', 'device', 'stream', 1, 5000, 100
Value (input_control) string-array → (string / real / integer)
パラメータに設定する値
例🔗
(HDevelop)
* Configure or change the 'device_id' of the ImageSource (before the connect).
set_image_source_param (ImageSourceHandle,'device_id', 'group', 'image_source', '<desired_device_id>')
* Configure the ExposureTime of the connected camera (notice per default 'group'='device').
set_image_source_param (ImageSourceHandle, 'ExposureTime', [], [], 50000)
* Execute a software trigger (notice per default 'group'='device') without waiting for the end of the execution.
set_image_source_param (ImageSourceHandle, 'TriggerSoftware', 'command_wait', 0,'execute')
* Configure the handling of image buffers in the stream module.
set_image_source_param (ImageSourceHandle, 'StreamBufferHandlingMode', 'group', 'stream', 'NewestOnly')
結果🔗
パラメータ値が正しければ、set_image_source_param は 2 (H_MSG_TRUE) を返します。
さもなければ、例外処理が発生します。
他のオペレーターとの組み合わせ🔗
組み合わせ
前処理の候補
query_image_sources, create_image_source, connect_image_source
後処理の候補
get_image_source_param, disconnect_image_source
関連項目
モジュール🔗
Foundation