interfaces mvtec

Interface Documentation

I/O Interface for digital I/O devices from Interface

Interface: Interface
Revision: 1.1 Addendum
Date: 2015-09-09
HALCON Version: 12.0

General

This page provides the documentation of the HALCON Interface interface for accessing the Interface Digital I/O cards. Only interface specific parameters and features are described here. For general information of the operators for I/O interfaces please have a look at the HALCON Operator Reference.
Registered customers can download the latest revision of this interface from the MVTec WWW server.

System Requirements

  • Intel compatible PC with Windows Vista/7/8, Windows Vista/7/8 x64, also WoW64 (using 32-bit HALCON on 64-bit Windows).
  • Installed Interface driver 2.16.8.12 (or higher).
  • Installed gpf2000 Runtime 3.20.15.0 (or higher). The FBIDIO.dll must be found within you search path.
  • Windows: HALCON I/O interface hioInterface.dll or hioInterfacexl.dll, respectively. If you have properly installed the interface, all these DLLs should reside in bin\%HALCONARCH% within the HALCON base directory %HALCONROOT% you have chosen during the installation of HALCON.

Features

  • Opening and using of multiple Interface I/O ports.
  • Opening and using of multiple specific channels (specific port values).
  • Support of digital inputs and digital outputs.

Limitations

  • No support of counters.
  • No support of analog functions.
  • No support of bi-directional I/O channels.

Operator control_io_interface

Not supported by this interface.

Operator query_io_interface

query_io_interface(::IOInterfaceName, Query:Result)
Query information about the specified I/O device interface.
Parameter Values Type Description
IOInterfaceName 'Interface' string HALCON I/O interface name.
Query string Parameter name of the query.
     'io_device_names' string Returns a list of available devices.
     'param_name' string Returns the possible parameter names.
     'revision' string Revision number of the OPC_UA interface.
Result integer, real, string List of result values (according to Query).

Operator open_io_device

open_io_device(::IOInterfaceName, IODeviceName, GenParamName, GenParamValue:IODeviceHandle)
Open and configure an I/O device.
Parameter Values Default Type Description
IOInterfaceName 'Interface' [] string HALCON I/O interface name.
IODeviceName [] string I/O device name.
GenParamName [] string Dynamic parameter names.
GenParamValue [] integer, real, string Dynamic parameter values.
IODeviceHandle integer Handle of the opened I/O device.

Operator control_io_device

Not supported by this interface.

Operator set_io_device_param

Set the device parameters. Currently, no parameters are defined.

Operator get_io_device_param

get_io_device_param(::IODeviceHandle, ParamName:ParamValue)
Query settings of an I/O device instance.
Parameter Values Type Description
IODeviceHandle integer Handle of the opened I/O device.
ParamName string Parameter names.
     'io_device_name' string Returns the name of the device.
     'param_name' string Returns the possible parameter names.
ParamValue integer, real, string Parameter values.

Operator query_io_device

query_io_device(::IODeviceHandle, IOChannelName, Query:Result)
Query information about channels of the specified I/O device.
Parameter Values Type Description
IODeviceHandle integer Handle of the opened I/O device.
IOChannelName string Channel names to query.
Query string Name of the query.
     'channel_type' 'digital_input', 'digital_output' string Returns the type of a channel.
     'io_channel_names' string Returns a list of channels provided by the device e.g. 'di_0.2' describes input port channel 2 on port 0. To list only the channels of a specific type, use the special form io_channel_names.<channel_type> (for a list of valid channel types, see the description of the channel_type parameter).
     'param_name' string Returns the possible parameter names.
     'value.range' [<min>,<max>,<step>] string Returns the possible range of the used I/O channel name parameter.
     'value' long Returns the value of a channel.
Result integer, real, string List of values (according to Query).

Operator open_io_channel

open_io_channel(::IODeviceHandle, IOChannelName, GenParamName, GenParamValue:IOChannelHandle)
Open and configure I/O channels.
Parameter Values Default Type Description
IODeviceHandle integer Handle of the opened I/O device.
IOChannelName string HALCON I/O channel names of the specified device.
GenParamName [] string Parameter names.
GenParamValue [] integer, real, string Parameter values.
IOChannelHandle integer Handles of the opened I/O channel.

Operator control_io_channel

Not supported by this interface.

Operator set_io_channel_param

Not supported by this interface.

Operator get_io_channel_param

get_io_channel_param(::IOChannelHandle, ParamName:ParamValue)
Query specific parameters of I/O channels.
Parameter Values Type Description
IOChannelHandle integer Handles of the opened I/O channels.
ParamName string Parameter names.
     'io_channel_name' string Returns the name of the channel.
     'param_name' string Returns the possible parameter names.
     'value.range' [<min>,<max>,<step>] string Returns the possible range of the used I/O channel.
     'value' long Returns the value of a channel.
ParamValue integer, real, string Parameter values.

Operator read_io_channel

read_io_channel(::IOChannelHandle:Value, Status)
Read a value from the specified I/O channels.
Parameter Values Type Description
IOChannelHandle integer Handles of the opened I/O channels.
Value integer, real, string Read value.
Status integer Status of read value. A status of '0' indicates success, while any other value indicates an error condition.

Operator write_io_channel

write_io_channel(::IOChannelHandle, Value:Status)
Write a value to a specific io channel. If several handles are passed, the data of each handle will be written internally to the associated channel.
Parameter Values Type Description
IOChannelHandle integer Handles of the opened I/O channels.
Value integer, real, string Write values.
Status integer Status of written values. A status of '0' indicates success, while any other value indicates an error condition.

Operator close_io_channel

close_io_channel(::IOChannelHandle:)
Close I/O channels.
Parameter Type Description
IOChannelHandle integer Handles of the opened I/O channels.

Operator close_io_device

close_io_device(::IODeviceHandle:)
Close the specified I/O device.
Parameter Type Description
IODeviceHandle integer Handle of the opened I/O device.
Query the requested information from the specified I/O channels. The parameter 'ParameterNode' is not used by this interface.

HDevelop Examples

For this interface the following examples are available:
  • interface_digital_read.hdev - Example to show how to read several parameters and values.
  • interface_digital_write.hdev - Example to show how to write serveral parameters and values.

Release Notes

  • Revision 1.1 Addendum (Sep 9, 2015):
    • Bi-directional I/O channels are not supported. A note has been added to the 'Limitations' section.
    • The HDevelop examples interface_digital_read.hdev and interface_digital_write.hdev have been improved.
  • Revision 1.1 (Jan 1, 2015):
  • Revision 1.0 (May 26, 2014):
    • First official release.