query_io_device — 查询指定输入/输出设备的通道信息。
query_io_device( : : IODeviceHandle, IOChannelName, Query : Result)
算子 query_io_device returns information about
transmission channels of a specified I/O device. The handle to the
I/O device is passed to in IODeviceHandle, whereas the
channels are addressed by IOChannelName. The desired
information about the I/O channels is specified via Query.
A list of all supported channel names is usually returned when passing
'io_channel_name' to Query while the input
parameter IOChannelName is ignored.
Please check the directory doc/html/reference/io
for documentation about your specific I/O device interface, where
all supported channel-specific parameters are listed.
IODeviceHandle (输入控制) io_device → (handle)
Handle of the opened I/O device.
IOChannelName (输入控制) string(-array) → (string)
Channel names to query.
Query (输入控制) string-array → (string)
Name of the query.
默认值: 'param_name'
值列表: 'io_channel_names', 'param_name'
Result (输出控制) string-array → (string / integer / real)
List of values (according to Query).
* 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_device 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。在这种情况下,可以设置扩展错误信息,并可进行查询通过算子 get_extended_error_info。
基础