Skip to content

query_io_interfaceQueryIoInterfaceQueryIoInterfacequery_io_interfaceT_query_io_interface🔗

説明🔗

query_io_interfaceQueryIoInterfaceQueryIoInterfacequery_io_interfaceT_query_io_interface — 指定した I/O デバイスインターフェースに関する情報を照会する。

書式🔗

query_io_interface( string IOInterfaceName, string Query, out string Result )void QueryIoInterface( const HTuple& IOInterfaceName, const HTuple& Query, HTuple* Result )static void HOperatorSet.QueryIoInterface( HTuple IOInterfaceName, HTuple query, out HTuple result )def query_io_interface( iointerface_name: str, query: MaybeSequence[str] ) -> Sequence[Union[int, float, str]]

Herror T_query_io_interface( const Htuple IOInterfaceName, const Htuple Query, Htuple* Result )

static HTuple HIODevice::QueryIoInterface( const HString& IOInterfaceName, const HTuple& Query )

static HTuple HIODevice::QueryIoInterface( const HString& IOInterfaceName, const HString& Query )

static HTuple HIODevice::QueryIoInterface( const char* IOInterfaceName, const char* Query )

static HTuple HIODevice::QueryIoInterface( const wchar_t* IOInterfaceName, const wchar_t* Query ) (Windows only)

static HTuple HIODevice.QueryIoInterface( string IOInterfaceName, HTuple query )

static HTuple HIODevice.QueryIoInterface( string IOInterfaceName, string query )

説明🔗

オペレーター query_io_interfaceQueryIoInterface は、I/O デバイスインターフ ェース IOInterfaceNameIOInterfaceNameiointerface_nameに関する情報を返します。要求する情 報は、Queryqueryquery によって指定します。該当する項目があれば Resultresultresult にはサポートされた値のリストが入ります。

一般的に、Queryqueryquery に値 'interface_name'"interface_name" を渡すと、 すべての有効な I/O インターフェースが返されます。この場合、パラメー ター IOInterfaceNameIOInterfaceNameiointerface_name の値は無視されます。

特定の I/O デバイスインターフェースに関するドキュメントがあるかど うかディレクトリ doc/html/reference/io をチェックしてくだ さい。ここには、サポートされるすべてのインターフェース固有パラメー ターがリストされます。

注意🔗

Windows システムでは、インターフェースの依存モジュール見つからない 場合(対応する SDK がインストールされていなかったなど)、オペレー ティングシステムからエラーダイアログボックスが表示される可能性があ ります。エラーボックスの表示は、Windows のエラーモードを設定するこ とで制御できます。Windows MSDN ドキュメント内の SetErrorMode の説 明を参照してください。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

IOInterfaceNameIOInterfaceNameiointerface_name (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

HALCON I/O インターフェース名

初期値: [][]
推奨値: 'ADLINK-DAQPilot', 'ADLINK-EOS', 'Advantech', 'Contec', 'Hilscher-cifX', 'Interface', 'Linux-GPIO', 'NIDAQmx', 'OPC_Classic', 'OPC_UA'"ADLINK-DAQPilot", "ADLINK-EOS", "Advantech", "Contec", "Hilscher-cifX", "Interface", "Linux-GPIO", "NIDAQmx", "OPC_Classic", "OPC_UA"

Queryqueryquery (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

照会するパラメーター名

初期値: 'io_device_names'"io_device_names"
推奨値: 'interface_name', 'io_device_names', 'param_name', 'revision'"interface_name", "io_device_names", "param_name", "revision"

Resultresultresult (output_control) string-array → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)Sequence[Union[int, float, str]]Htuple (char* / Hlong / double)

(Queryqueryquery による)結果値のリスト

例🔗

(HDevelop)


* Select a suitable i/o device interface of name IOInterfaceName
query_io_interface (IOInterfaceName, 'io_device_names', DeviceNames)
open_io_device (IOInterfaceName, DeviceNames[0], [], [], IODeviceHandle)
query_io_device (IODeviceHandle, [], 'io_channel_names.digital_input', \
                 ChannelInputNames)
open_io_channel (IODeviceHandle, ChannelInputNames[0], [], [], \
                 IOChannelHandle)
read_io_channel (IOChannelHandle, Value, Status)

結果🔗

パラメーターが有効ならば、オペレーター query_io_interfaceQueryIoInterface は値 2 (H_MSG_TRUE) を返します。必要に応じて、例外が発生します。この場合は、 拡張エラー情報が設定され、オペレーター get_extended_error_infoGetExtendedErrorInfo を使用して照会できます。

他のオペレーターとの組み合わせ🔗

組み合わせ

後処理の候補

open_io_deviceOpenIoDevice

モジュール🔗

Foundation