Skip to content

Variable Server, I/Os

Setup KeStudio Project

Variables and digital I/Os can be exchanged between drag&bot and a KemroX PLC device via the KemroX Variable Server. Before used, the KeStudio project has to be configured specifically.

  1. Add a Global Variable List to the Application and name it GVL_DNB.

  2. Configure the I/Os of your hardware (DI570, DM556, DO550, etc.) in the GVL_DNB file. The naming follows the structure DOutXXX for digital outputs and DInXXX for digital inputs, while both numberings XXX are starting from zero and being booleans. An example for a DM570 with eight inputs and outputs is shown below. Other variables can also be defined and exchanged later with drag&bot, but should not follow this structure to avoid confusions.

  3. Add a variable alive of type Bool to the GVL_DNB. alive: BOOL := TRUE; The variable is used to detect connection interruptions from the Variable Server to the clients.

  4. If required for your PLC program, add a variable dnbProgramStatus of type INT to the GVL_DNB. dnbProgramStatus: INT := 0; This variable is used to indicate the program execution status of drag&bot (0 = Unknown, 1 = Program Started, 2 = Program Stopped, 3 = Program Paused).

  5. If required for your PLC program, add a variable robotEStopActive of type BOOL to the GVL_DNB. robotEStopActive: BOOL := FALSE; This variable is used to indicate the current robot E-Stop status by drag&bot.

  6. Use each variable and I/O at least once in the PLC program, otherwise it will not be updated correctly by the variable server in case of mapping to a device.

  7. Add a Symbol Configuration and build the program for it.

  8. Setup access rights inside the Symbol Configuration. Digital outputs need read and write access, digital inputs need at least read access. Other variables should have read and write access, if they are meant to be accessed by drag&bot.

  9. Apply the I/O mappings for your target device, e.g. a DM570.

Setup drag&bot

  1. Add KemroX Variable Client component in the drag&bot Component Manger.
  2. Configure the parameter IP for your setup. It has to match with the IP, where the KemroX PLC device is available from the network.
  3. The configured I/Os should be available in the Operator Panel -> I/O Tab -> Subtab Keba.

Interact with other variables than digital I/Os

Interacting with other variables than digital I/Os is possible in two ways:

  • via Datastore
  • via specific Function Blocks

Interaction via Datastore

Indirect interaction with the Variable Client is possible through the Datastore. The entries are provided as from an external source kemrox_vars. Variables are automatically mirrored from the Variable Client to the Datastore, except they belong to one of the following groups:

  • KemroX IOs, following the format DOutXXX / DInXXX, as they are described above.
  • Variables with special functionality: alive, dnbProgramStatus, robotEStopActive
  • Variables with unsupported datatypes.

The following datatypes of KemroX variables are supported and are automatically converted to Datastore datatypes:

Datastore Datatype Supported KemroX Datatypes
integer BYTE, WORD, SINT, USINT, INT, UINT, DINT
float REAL, LREAL
boolean BOOL
string STRING
pose -
joint6 -

Note that for floating point variables, ±0.000001 is the smallest possible number towards zero. Smaller numbers are converted to 0.0;

Interaction via specific Function Blocks

Direct interaction with the Variable Client is possible with specific Function Blocks. Currently this is only possible for integer variables.

KemroX Variable Server - Get Value - Integer

Gets the integer variable value from the KemroX Variable Server.

Name Data type Description
Inputs Path String The identifying path of the variable on the Variable Server. Usually it starts with 'APPL.Application.GVL_DNB'.
Outputs Value Integer The integer value of the variable.
Exceptions PATH_NOT_FOUND - The exception is raised, if the item can not be found on the variable server or is not acessible.
MISMATCHING_DATATYPE - The exception is raised, if the variable datatype is not an integer.
MODULE_NOT_AVAILABLE - The exception is raised, if the KemroX Variable Client component is not running.

KemroX Variable Server - Set Value - Integer

Sets an integer variable value at the KemroX Variable Server.

Name Data type Description
Inputs Path String The identifying path of the variable on the Variable Server. Usually it starts with 'APPL.Application.GVL_DNB'.
Value Integer The integer value to set to the variable.
Outputs -
Exceptions PATH_NOT_FOUND - The exception is raised, if the item can not be found on the variable server or is not acessible.
MISMATCHING_DATATYPE - The exception is raised, if the variable datatype is not an integer.
MODULE_NOT_AVAILABLE - The exception is raised, if the KemroX Variable Client component is not running.