Skip to content

KRC4/KRC5 Digital / Analog IOs

Important

  • drag&bot supports all the soft digital and analog IOs of the KRC4/KRC5 Controller. The user may require to map these soft IOs with a real IOs using the KUKA WorkVisual 6.0 e.g. for using Fieldbus. For more information about it please check the official KUKA WorkVisual website and the official KUKA WorkVisual 6.0 manual V5, paragraph no. 9.4 Mapping the bus I/Os.
  • Please use the KUKA WorkVisual under your responsibility, drag and bot GmbH assumes no responsibility or liability for any possible damage or injury resulted from it.
  • For any further clarification related to KUKA WorkVisual errors/issues, please refer to the official manuals from KUKA or communicate with your KUKA official support team.

Prerequisites

  • drag&bot Controller driver Ver. 1.0 (released on 14.02.2020) or higher.

IOs numbering using drag&bot Function Blocks

drag&bot uses the same controller numbering for the Digital Inputs and Outputs, with the prefix DI for inputs and DO for outputs. For Analog Outputs the same numbering as for the controller is used, while the Analog Input numbering used in drag&bot is shifted by 10000. Please refer to the table below for more details.

IO type Controller numbering drag&bot numbering
Digital Outputs 1 to 4096 DO[1] to DO[4096]
Digital Inputs 1 to 4096 DI[1] to DI[4096]
Analog Outputs 1 to 32 1 to 32
Analog Inputs 1 to 32 10001 to 10032

To interact with the Digital I/Os using this numbering in your programs use the function blocks

  • Digital I/O Device - Get
  • Digital I/O Device - Set
  • Digital I/O Device - Wait For

as described in the Function Block Library overview.

To interact with the Analog I/Os using this numbering in your programs use the function blocks described below.

IOs numbering using drag&bot Control Panel

The drag&bot Control Panel currently has access to only the first 16 Inputs and Outputs of the controller. Refer to below tables for more details.

Controller Output number drag&bot Control Panel number Controller Input number drag&bot Control Panel number
1 DO[1] 1 DI[1]
2 DO[2] 2 DI[2]
... ... ... ...
15 DO[15] 15 DI[15]
16 DO[16] 16 DI[16]

The rest of the Digital and Analog I/Os are accessible only through function blocks.

Analog IO Function Blocks

Analog I/O - Get

It requests the value of an analog I/O pin of the robot.

Name Data type Description
Inputs Pin number Integer Number of an analog I/O pin.
Outputs Value Float The value of the analog I/O pin.
success Boolean Whether the analog I/O was read successfully or not.
error message String The error message in case of success = FALSE.

Analog I/O - Set

It sets the value of one of the analog output of the robot.

Name Data type Description
Inputs Pin number Integer Number of an analog output pin.
Value Float Value of the analog output pin.
Outputs success Boolean Whether the analog I/O was written successfully or not.
error message String The error message in case of success = FALSE.

Analog I/O - Wait For

It pauses the program thread until the desired value is read on the given analog I/O pin. A timeout can be specified to throw an exception.

Name Data type Description
Inputs Pin number Integer Number of an analog I/O pin.
Desired Value Float The value which has to be read on the analog I/O pin to continue program execution.
tolerance Float Acceptable tolerance in the reading value following this mathematical formula : (desired value - tolerance) <= reading value <= (desired value + tolerance)
Timeout Float Timeout in seconds to wait for the signal before a TIMEOUT exception is thrown. A value of zero waits infinitely.
Outputs Value Float The value of the analog I/O pin.
success Boolean Whether the analog I/O was read successfully or not.
error message String The error message in case of success = FALSE.