dio_read_input
Skill class for ai.intrinsic.dio_read_input skill.
The dio_read_input skill is used to read digital values from a Digital Input/Output device. The skill user specifies one or more digital inputs to read when the skill is executed. The list of requested digital inputs will be returned as a list of booleans in the output parameter of the skill.
It is possible that the values have changed by the time the skill output is available if asynchronous calls are made from other parts of the system.
Prerequisites
-
A real-time control service that controls the digital inputs.
-
The skill user must know the
Block nameof the relevant digital inputs to read. TheBlock namecan be found in the I/O Mapping Panel of therealtime_control_service.
Usage Example
-
Choose the desired
Adiodevice from the list of available hardware devices. When the digital input is provided by a robot control box or EtherCAT, this is usually namedrobot_controller. -
Specify the
Block name, which is the name of the Digital Input/Output block from which values will be read. -
(Optional) Specify the duration to wait to read the digital input. After this time has elapsed a timeout error will be created.
Parameters
block_name
Specifies the name of the DIO (Digital Input/Output) block from which values will be read. You can look up the list of block names, indices, and current values of digital inputs in the Services panel, on the settings page of the real-time control or robot control service, in the 'I/O mapping' window.
timeout
If the DIOs could not be read within this duration, the skill will create a timeout error. Defaults to 5 seconds.
robot_name
Name of the robot. Deprecated. Do not use. Value will be ignored.
part_name
Name of the ADIO part. Deprecated. If set, this value will override the
ADIO part name contained in the ADIO parameter.
Capabilities
adio
Resource with capability Icon2AdioPart
Returns
values
All signal values of the specified block from the input parameters. The list contains all digital inputs available in the selected block. The list is ordered by index. You can look up the order and current values in the Services panel, on the settings page of the real-time control or robot control service, in the 'I/O mapping' window.
Error Code
The skill does not have error codes yet