Skip to content

query_io_interfaceQueryIoInterfaceQueryIoInterfacequery_io_interfaceT_query_io_interfaceπŸ”—

Short descriptionπŸ”—

query_io_interfaceQueryIoInterfaceQueryIoInterfacequery_io_interfaceT_query_io_interface β€” Query information about the specified I/O device interface.

SignatureπŸ”—

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 )

DescriptionπŸ”—

The operator query_io_interfaceQueryIoInterface returns information about the I/O device interface IOInterfaceNameIOInterfaceNameiointerface_name. The desired information is specified via Queryqueryquery. If applicable, Resultresultresult contains a list of supported values.

Generally, when passing the value 'interface_name'"interface_name" for Queryqueryquery, all available I/O interfaces are returned. The value of the parameter IOInterfaceNameIOInterfaceNameiointerface_name is ignored in this case.

Please check the directory doc/html/reference/io for documentation about your specific I/O device interface, where all supported interface specific parameters are listed.

AttentionπŸ”—

On Windows Systems, error dialog boxes from the operating system can occur when dependency modules of the interface are not found, e.g., the according SDK was not installed. The occurrence of the error boxes can be controlled by setting Windows’ Error Mode. Please refer to the description of SetErrorMode within the Windows MSDN documentation.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

IOInterfaceNameIOInterfaceNameiointerface_name (input_control) string β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

HALCON I/O interface name.

Default: [][]
Suggested values: '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*)

Parameter name of the query.

Default: 'io_device_names'"io_device_names"
Suggested values: '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)

List of result values (according to Queryqueryquery).

ExampleπŸ”—

(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)

ResultπŸ”—

If the parameters are valid, the operator query_io_interfaceQueryIoInterface returns the value 2 (H_MSG_TRUE). If necessary an exception is raised. In this case, an extended error information may be set and can be queried with the operator get_extended_error_infoGetExtendedErrorInfo.

Combinations with other operatorsπŸ”—

Combinations

Possible successors

open_io_deviceOpenIoDevice

ModuleπŸ”—

Foundation