ClassesClassesClassesClasses | | | | Operators

open_io_channelT_open_io_channelOpenIoChannelopen_io_channelOpenIoChannelOpenIoChannel (Operator)

Name

open_io_channelT_open_io_channelOpenIoChannelopen_io_channelOpenIoChannelOpenIoChannel — Open and configure I/O channels.

Signature

open_io_channel( : : IODeviceHandle, IOChannelName, GenParamName, GenParamValue : IOChannelHandle)

Herror T_open_io_channel(const Htuple IODeviceHandle, const Htuple IOChannelName, const Htuple GenParamName, const Htuple GenParamValue, Htuple* IOChannelHandle)

Herror open_io_channel(const HTuple& IODeviceHandle, const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue, Hlong* IOChannelHandle)

Herror open_io_channel(const HTuple& IODeviceHandle, const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* IOChannelHandle)

HTuple HIODevice::OpenIoChannel(const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HIOChannel::OpenIoChannel(const HIODevice& IODeviceHandle, const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue)

void OpenIoChannel(const HTuple& IODeviceHandle, const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* IOChannelHandle)

HIOChannelArray HIODevice::OpenIoChannel(const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue) const

HIOChannel HIODevice::OpenIoChannel(const HString& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue) const

HIOChannel HIODevice::OpenIoChannel(const char* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HIOChannel::HIOChannel(const HIODevice& IODeviceHandle, const HString& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue)

void HIOChannel::HIOChannel(const HIODevice& IODeviceHandle, const char* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue)

static HIOChannelArray HIOChannel::OpenIoChannel(const HIODevice& IODeviceHandle, const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue)

void HIOChannel::OpenIoChannel(const HIODevice& IODeviceHandle, const HString& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue)

void HIOChannel::OpenIoChannel(const HIODevice& IODeviceHandle, const char* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue)

void HOperatorSetX.OpenIoChannel(
[in] VARIANT IODeviceHandle, [in] VARIANT IOChannelName, [in] VARIANT GenParamName, [in] VARIANT GenParamValue, [out] VARIANT* IOChannelHandle)

IHIOChannelX* HIODeviceX.OpenIoChannel(
[in] VARIANT IOChannelName, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

void HIOChannelX.OpenIoChannel(
[in] IHIODeviceX* IODeviceHandle, [in] VARIANT IOChannelName, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

static void HOperatorSet.OpenIoChannel(HTuple IODeviceHandle, HTuple IOChannelName, HTuple genParamName, HTuple genParamValue, out HTuple IOChannelHandle)

HIOChannel[] HIODevice.OpenIoChannel(HTuple IOChannelName, HTuple genParamName, HTuple genParamValue)

HIOChannel HIODevice.OpenIoChannel(string IOChannelName, HTuple genParamName, HTuple genParamValue)

public HIOChannel(HIODevice IODeviceHandle, string IOChannelName, HTuple genParamName, HTuple genParamValue)

static HIOChannel[] HIOChannel.OpenIoChannel(HIODevice IODeviceHandle, HTuple IOChannelName, HTuple genParamName, HTuple genParamValue)

void HIOChannel.OpenIoChannel(HIODevice IODeviceHandle, string IOChannelName, HTuple genParamName, HTuple genParamValue)

Description

The operator open_io_channelopen_io_channelOpenIoChannelopen_io_channelOpenIoChannelOpenIoChannel opens and configures transmission channels of an opened I/O device instance. The device instance must have been opened by open_io_deviceopen_io_deviceOpenIoDeviceopen_io_deviceOpenIoDeviceOpenIoDevice before and is passed to IODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandle. The transmission channels themselves are addressed by their names passed to IOChannelNameIOChannelNameIOChannelNameIOChannelNameIOChannelNameIOChannelName. Available names can be queried using query_io_devicequery_io_deviceQueryIoDevicequery_io_deviceQueryIoDeviceQueryIoDevice with query parameter 'io_channel_name'"io_channel_name""io_channel_name""io_channel_name""io_channel_name""io_channel_name". The channels can be configured by the parameters GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue. A reference to each transmission channel is returned in IOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandle. If the instance of the channel is not needed any more, it should be released and closed via the operator close_io_channelclose_io_channelCloseIoChannelclose_io_channelCloseIoChannelCloseIoChannel. Besides, it will be closed automatically when closing the associated device instance by close_io_deviceclose_io_deviceCloseIoDeviceclose_io_deviceCloseIoDeviceCloseIoDevice.

Having opened a transmission channel, values can be read and written by the operators read_io_channelread_io_channelReadIoChannelread_io_channelReadIoChannelReadIoChannel and write_io_channelwrite_io_channelWriteIoChannelwrite_io_channelWriteIoChannelWriteIoChannel on the channel.

An opened channel can be reconfigured by using the operators set_io_channel_paramset_io_channel_paramSetIoChannelParamset_io_channel_paramSetIoChannelParamSetIoChannelParam and get_io_channel_paramget_io_channel_paramGetIoChannelParamget_io_channel_paramGetIoChannelParamGetIoChannelParam.

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

Parallelization

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

IODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandle (input_control)  io_device HIODevice, HTupleHTupleHIODevice, HTupleHIODeviceX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the opened I/O device.

IOChannelNameIOChannelNameIOChannelNameIOChannelNameIOChannelNameIOChannelName (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

HALCON I/O channel names of the specified device.

GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  string-array HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Parameter names.

Default value: []

GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  string-array HTupleHTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Parameter values.

Default value: []

IOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandle (output_control)  io_channel(-array) HIOChannel, HTupleHTupleHIOChannel, HTupleHIOChannelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handles of the opened I/O channel.

Example (HDevelop)

query_io_device (IODeviceHandle, [], 'io_channel_names.digital_output', ChannelOutputNames)
open_io_channel (IODeviceHandle, ChannelOutputNames[0], [], [], IOChannelHandle)
write_io_channel (IOChannelHandle, 1, Status)

Result

If the parameters are valid, the operator open_io_channelopen_io_channelOpenIoChannelopen_io_channelOpenIoChannelOpenIoChannel 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_infoget_extended_error_infoGetExtendedErrorInfoget_extended_error_infoGetExtendedErrorInfoGetExtendedErrorInfo.

Possible Predecessors

open_io_deviceopen_io_deviceOpenIoDeviceopen_io_deviceOpenIoDeviceOpenIoDevice, query_io_devicequery_io_deviceQueryIoDevicequery_io_deviceQueryIoDeviceQueryIoDevice

Possible Successors

set_io_channel_paramset_io_channel_paramSetIoChannelParamset_io_channel_paramSetIoChannelParamSetIoChannelParam, read_io_channelread_io_channelReadIoChannelread_io_channelReadIoChannelReadIoChannel, write_io_channelwrite_io_channelWriteIoChannelwrite_io_channelWriteIoChannelWriteIoChannel

Module

Foundation


ClassesClassesClassesClasses | | | | Operators