Skip to content

KRC4 Digital / Analog IOs

Prerequisites

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

drag&bot supports all the soft digital and analog IOs of the KRC4 Controller. The user may require to link these soft IOs with a real IOs using the KUKA Workvisual e.g. for using Fieldbus. For more information about it please check official KUKA WorkVisual website

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.