0% found this document useful (0 votes)
446 views132 pages

Tc3 Robotics Mxautomation: Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
446 views132 pages

Tc3 Robotics Mxautomation: Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 132

Manual

TC3 Robotics mxAutomation

TwinCAT 3

Version: 1.4
Date: 2016-11-17
Order No.: TF5120
Table of Contents

Table of Contents
1 Notes on the documentation .................................................................................................................... 6

2 Safety instructions .................................................................................................................................... 7

3 Introduction................................................................................................................................................ 8
3.1 Target group .....................................................................................................................................  8
3.2 Industrial robot documentation .........................................................................................................  8
3.3 Terms used.......................................................................................................................................  8

4 Product description................................................................................................................................... 9
4.1 Overview...........................................................................................................................................  9
4.1.1 Components.......................................................................................................................... 9
4.1.2 Communication ..................................................................................................................... 9
4.1.3 WorkVisual............................................................................................................................ 9
4.2 Intended use .....................................................................................................................................  9
4.2.1 Misuse................................................................................................................................... 9

5 Safety........................................................................................................................................................ 10

6 Installation................................................................................................................................................ 11
6.1 System requirements......................................................................................................................  11
6.1.1 Hardware ............................................................................................................................ 11
6.1.2 Software.............................................................................................................................. 11

7 Programming ........................................................................................................................................... 12
7.1 Overview of function blocks ............................................................................................................  12
7.2 Frequently used input/output signals in the function blocks ...........................................................  16
7.2.1 Input signals........................................................................................................................ 16
7.2.2 Output signals ..................................................................................................................... 16
7.2.3 Signal sequence for execution of ExecuteCmd .................................................................. 17
7.3 Frequently used input/output signals in the MC function blocks.....................................................  18
7.3.1 Input signals........................................................................................................................ 18
7.3.2 Output signals ..................................................................................................................... 18
7.3.3 Signal sequence for execution of Execute.......................................................................... 19
7.4 Structures for motion programming (STRUCT) ..............................................................................  19
7.4.1 APO .................................................................................................................................... 20
7.4.2 PTP_APO (INT) .................................................................................................................. 20
7.4.3 CP_APO (INT) .................................................................................................................... 20
7.4.4 COORDSYS ....................................................................................................................... 21
7.4.5 E6AXIS ............................................................................................................................... 21
7.4.6 E6POS ................................................................................................................................ 21
7.4.7 FRAME ............................................................................................................................... 22
7.5 Integer variables .............................................................................................................................  22
7.5.1 BufferMode ......................................................................................................................... 22
7.5.2 QueueMode ........................................................................................................................ 23
7.5.3 CircType.............................................................................................................................. 23
7.5.4 OriType ............................................................................................................................... 23
7.5.5 Status.................................................................................................................................. 23
7.6 Data of a Cartesian workspace.......................................................................................................  24
7.6.1 Origin and orientation.......................................................................................................... 24
7.6.2 Dimensions ......................................................................................................................... 24
7.7 Data of an axis-specific workspace ................................................................................................  24
7.7.1 Robot axes.......................................................................................................................... 25
7.7.2 External axes ...................................................................................................................... 25
7.8 Programming tips for TC3 mxAutomation.......................................................................................  25
7.8.1 Instancing............................................................................................................................ 25
7.8.2 ExecuteCmd ....................................................................................................................... 26

TC3 Robotics mxAutomation Version: 1.4 3


Table of Contents

7.8.3 Program override ................................................................................................................ 26


7.8.4 Approximate positioning...................................................................................................... 26
7.9 Administrative functions..................................................................................................................  26
7.9.1 Reading PLC-specific communication into a non-PLC-specific structure ........................... 26
7.9.2 Writing a non-PLC-specific structure into PLC-specific communication ............................. 27
7.9.3 Initializing the mxA interface ............................................................................................... 28
7.9.4 Setting the program override (POV) ................................................................................... 29
7.9.5 Activating and reading Automatic External signals from the robot controller...................... 30
7.9.6 Reading the current robot position...................................................................................... 32
7.9.7 Reading the current axis position........................................................................................ 33
7.9.8 Reading the current path velocity ....................................................................................... 33
7.9.9 Reading the current axis velocity ........................................................................................ 34
7.9.10 Reading the current robot acceleration............................................................................... 35
7.9.11 Reading a digital input ........................................................................................................ 36
7.9.12 Reading digital inputs 1 to 8................................................................................................ 36
7.9.13 Reading multiple digital inputs ............................................................................................ 37
7.9.14 Reading a digital output ...................................................................................................... 38
7.9.15 Writing a digital output ........................................................................................................ 39
7.9.16 Writing digital outputs 1 to 8................................................................................................ 40
7.9.17 Reading an analog input ..................................................................................................... 40
7.9.18 Reading an analog output................................................................................................... 41
7.9.19 Writing an analog output ..................................................................................................... 41
7.9.20 Wait statement (read digital input) ...................................................................................... 43
7.9.21 Selecting the tool, base and interpolation mode ................................................................. 43
7.9.22 Reading TOOL data............................................................................................................ 44
7.9.23 Writing TOOL data .............................................................................................................. 45
7.9.24 Reading BASE data ............................................................................................................ 45
7.9.25 Writing BASE data .............................................................................................................. 46
7.9.26 Reading the load data......................................................................................................... 47
7.9.27 Writing load data ................................................................................................................. 48
7.9.28 Reading the software limit switches of the robot axes ........................................................ 49
7.9.29 Reading the software limit switches of the external axes ................................................... 50
7.9.30 Writing the software limit switches of the robot axes .......................................................... 50
7.9.31 Writing the software limit switches of the external axes...................................................... 51
7.9.32 Declaring interrupts............................................................................................................. 52
7.9.33 Activating interrupts ............................................................................................................ 54
7.9.34 Deactivating interrupts ........................................................................................................ 55
7.9.35 Reading the state of an interrupt......................................................................................... 55
7.9.36 Activating a path-related switching action (TRIGGER WHEN DISTANCE)........................ 57
7.9.37 Activating a path-related switching action (TRIGGER WHEN PATH) ................................ 58
7.9.38 Canceling a program........................................................................................................... 60
7.9.39 Stopping the robot............................................................................................................... 61
7.9.40 Continuing a program ......................................................................................................... 61
7.9.41 Automatically starting function blocks and signals.............................................................. 62
7.10 Functions for activating motions .....................................................................................................  64
7.10.1 Jogging to a relative end position ....................................................................................... 64
7.10.2 Jogging to a relative end position in the TOOL coordinate system..................................... 66
7.10.3 Jogging to an end position .................................................................................................. 68
7.11 Functions for activating motions (PLC OPEN-compliant) ...............................................................  70
7.11.1 Moving to a Cartesian position with a LIN motion............................................................... 70
7.11.2 Moving to a Cartesian position with a LIN_REL motion...................................................... 71
7.11.3 Moving to a Cartesian position with a PTP motion ............................................................. 73
7.11.4 Moving to a Cartesian position with a PTP_REL motion .................................................... 74
7.11.5 Moving to an axis-specific position with a PTP motion ....................................................... 77
7.11.6 Moving to a Cartesian position with a CIRC motion............................................................ 78
7.11.7 Moving to a Cartesian position with a CIRC_REL motion................................................... 80
7.12 Diagnostic functions........................................................................................................................  82
7.12.1 Reading the current state of the mxA interface................................................................... 82
7.12.2 Reading error messages of the mxA interface.................................................................... 82
7.12.3 Resetting error messages of the mxA interface.................................................................. 83
7.12.4 Reading error messages of the robot controller.................................................................. 83

4 Version: 1.4 TC3 Robotics mxAutomation


Table of Contents

7.12.5 Reading diagnostic signals ................................................................................................. 85


7.12.6 Reading and acknowledging error states............................................................................ 87
7.13 Special functions.............................................................................................................................  89
7.13.1 Reading system variables................................................................................................... 89
7.13.2 Writing system variables ..................................................................................................... 90
7.13.3 Calling a brake test ............................................................................................................. 92
7.13.4 Calling a mastering test ...................................................................................................... 93
7.13.5 Reading the safety controller signals .................................................................................. 95
7.13.6 Reading the state of the TouchUp status keys ................................................................... 96
7.13.7 Teaching points................................................................................................................... 97
7.13.8 Modifying settings for the advance run ............................................................................... 97
7.13.9 Reading values from KRC_SetAdvance ............................................................................. 98
7.13.10Calculating the Cartesian robot position from the axis angles .......................................... 100
7.13.11Calculating axis angles from the Cartesian robot position ................................................ 100
7.13.12Initializing a conveyor........................................................................................................ 102
7.13.13Activating a conveyor........................................................................................................ 103
7.13.14Tracking a workpiece on the conveyor ............................................................................. 103
7.13.15Picking up a workpiece from the conveyor ....................................................................... 105
7.13.16Activating interrupts for monitoring ................................................................................... 106
7.13.17Deactivating interrupts for monitoring ............................................................................... 108
7.13.18Activating a motion along a vector .................................................................................... 108
7.13.19Deactivating KRC_VectorMoveOn.................................................................................... 110
7.13.20Configuring Cartesian workspaces ................................................................................... 111
7.13.21Reading the configuration of Cartesian workspaces......................................................... 112
7.13.22Configuring axis-specific workspaces ............................................................................... 112
7.13.23Reading the configuration of axis-specific workspaces .................................................... 113
7.13.24Reading the status of the workspaces .............................................................................. 115

8 Messages ............................................................................................................................................... 117
8.1 Error messages of the mxA interface in the robot interpreter .......................................................  117
8.2 Error messages of the mxA interface in the submit interpreter.....................................................  121
8.3 Errors in the function block ...........................................................................................................  125
8.4 ProConOS errors ..........................................................................................................................  128

TC3 Robotics mxAutomation Version: 1.4 5


Notes on the documentation

1 Notes on the documentation


This description is only intended for the use of trained specialists in control and automation engineering who
are familiar with the applicable national standards.
It is essential that the documentation and the following notes and explanations are followed when installing
and commissioning the components.
It is the duty of the technical personnel to use the documentation published at the respective time of each
installation and commissioning.

The responsible staff must ensure that the application or use of the products described satisfy all the
requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under
development.
We reserve the right to revise and change the documentation at any time and without prior announcement.
No claims for the modification of products that have already been supplied may be made on the basis of the
data, diagrams and descriptions in this documentation.

Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE®, XFC® and XTS® are registered
trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own
purposes could violate the rights of the owners.

Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and
patents:
EP1590927, EP1789857, DE102004044764, DE102007017835
with corresponding applications or registrations in various other countries.

The TwinCAT Technology is covered, including but not limited to the following patent applications and
patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany

Copyright
© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to
others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a
patent, utility model or design.

6 Version: 1.4 TC3 Robotics mxAutomation


Safety instructions

2 Safety instructions
Safety regulations
Please note the following safety instructions and explanations!
Product-specific safety instructions can be found on following pages or in the areas mounting, wiring,
commissioning etc.

Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the
application. Modifications to hardware or software configurations other than those described in the
documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.

Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are
familiar with the applicable national standards.

Description of symbols
In this documentation the following symbols are used with an accompanying safety instruction or note. The
safety instructions must be read carefully and followed without fail!

Serious risk of injury!


Failure to follow the safety instructions associated with this symbol directly endangers the
life and health of persons.
DANGER

Risk of injury!
Failure to follow the safety instructions associated with this symbol endangers the life and
health of persons.
WARNING

Personal injuries!
Failure to follow the safety instructions associated with this symbol can lead to injuries to
persons.
CAUTION

Damage to the environment or devices


Failure to follow the instructions associated with this symbol can lead to damage to the en-
vironment or equipment.
Attention

Tip or pointer
This symbol indicates information that contributes to better understanding.

Note

Note on safety

Familiarize yourself also when reading other documentations with the safety signs used
therein and with the meaning of these safety signs.
Carefully attend to safety signs and notes on safety also within other documentations.
DANGER

TC3 Robotics mxAutomation Version: 1.4 7


Introduction

3 Introduction

3.1 Target group


This documentation is aimed at users with the following knowledge and skills:
•   Knowledge of the robot controller system
•   Advanced PLC programming skills
•   Advanced knowledge of field bus interfaces

For optimal use of KUKA robots, we recommend that our customers take part in a course of
training at KUKA College. Information about the training program can be found at
www.kuka.com or can be obtained directly from our subsidiaries.
Note

3.2 Industrial robot documentation


To be taken from KUKA documentation.

3.3 Terms used


Term Description
Axis group Depending on the machine data configuration, an axis group contains the
following axes:
•   Robot axes A1 to A6
•   External axes E1 to E6 (synchronous or asynchronous)
FIFO Method used to process a data memory
•   First In First Out: the elements saved first are taken first from the
memory.
KR C KUKA Robot Controller
KRL KUKA robot programming language (KUKA Robot Language)
KUKA smartHMI User interface of the KUKA robot controller (KUKA smart Human-
Machine Interface)
KUKA smartPAD Hand-held operating and programming device for the KUKA industrial
robot
mxA interface KUKA.PLC mxAutomation technology package on the robot controller
EtherCAT EtherCAT is an Ethernet-based field bus.
Robot interpreter The robot interpreter is a process that works synchronously in which the
current robot program is executed.
BCO run The robot is moved to the coordinates of the motion block in which the
block pointer is situated. In this way, the robot position is made to match
the coordinates of the current point.
PLC Programmable Logic Controller
TwinCAT 3 Run-Time and development environment for Beckhoff controllers
Submit interpreter The Submit interpreter is a cyclical logic program that runs in parallel with
the motion program on the robot controller.
WorkVisual Engineering environment for KR C4-controlled robot cells

8 Version: 1.4 TC3 Robotics mxAutomation


Product description

4 Product description

4.1 Overview
Die TwinCAT library contains function blocks for programming automation tasks with TwinCAT 3.

4.1.1 Components
The following software components are included in the TwinCAT library:
•   Function blocks for TwinCAT 3

4.1.2 Communication
For data exchange between the PLC and the robot controller the terminal EL6695-1001 by KUKA can be
used.

4.1.3 WorkVisual
The following software is required for configuring the field buses and mapping the field bus signals:
•   WorkVisual 4.0

4.2 Intended use


The online part of KUKA.PLC mxAutomation may only be used on a KR C4 robot controller with the following
software:
•   KUKA System Software 8.3
•   KUKA.PLC ProConOS 4.1
•   KUKA.EtherCAT bridge
•   KUKA.ConveyorTech 6.0
•   KUKA.VectorMove 1.0

The offline part of KUKA.PLC mxAutomation is intended for use with TwinCAT 3.1.4020.14 or higher.

Any other or additional use is considered misuse and is not allowed. The manufacturer cannot be held liable
for any resulting damage. The risk lies entirely with the user.

Operation in accordance with the intended use also requires compliance with the start-up and configuration
instructions in this documentation.

4.2.1 Misuse
Any use or application deviating from the intended use is deemed to be misuse and is not allowed. This
includes e.g.:
•   Incorrect configuration (not in compliance with this documentation). This might result in the robot
executing different actions from those planned by the PLC programmer.
•   Use in a programming environment other than TwinCAT 3.1.4020.14 or higher.

TC3 Robotics mxAutomation Version: 1.4 9


Safety

5 Safety
This documentation contains safety instructions which refer specifically to the software described here.

Familiarize yourself also when reading other documentations with the safety signs used
therein and with the meaning of these safety signs.
Carefully attend to safety signs and notes on safety also within other documentations.
DANGER

The fundamental safety information for the industrial robot can be found in the “Safety” chapter of the
Operating and Programming Instructions for System Integrators or the Operating and Programming
Instructions for End Users.

The “Safety” chapter in the operating and programming instructions of the KUKA System
Software (KSS) must be observed. Death to persons, severe injuries or considerable dam-
age to property may otherwise result.
DANGER

10 Version: 1.4 TC3 Robotics mxAutomation


Installation

6 Installation

6.1 System requirements

6.1.1 Hardware
Robot controller:
•   KR C4
•   Or KR C4 compact

External PLC:
•   Beckhoff TwinCAT 3 controller

6.1.2 Software
Robot controller:
•   KUKA System Software 8.3

The following KRL resources must be free:


KRL resource Number
I/Os 2 049 … 4 080

•   KUKA.PLC ProConOS 4-1 4.1

Option with ConveyorTech:


•   KUKA.ConveyorTech 6.0

Option with VectorMove:


•   KUKA.VectorMove 1.0

Standard laptop/PC:
•   WorkVisual 4.0

Industrial PC/Embedded-PC
•   TwinCAT 3.1.4020.14 or higher

TC3 Robotics mxAutomation Version: 1.4 11


Programming

7 Programming

7.1 Overview of function blocks


Administrative functions
KRC_ReadAxisGroup  >>> "Reading PLC-specific
communication into a non-PLC-specific
structure". [} 26]
KRC_WriteAxisGroup  >>> "Writing a non-PLC-specific structure
into PLC-specific communication". [} 27]
KRC_Initialize  >>> "Initializing the mxA interface".
[} 28]
KRC_SetOverride  >>> "Setting the program override
(POV)". [} 29]
KRC_AutomaticExternal  >>> "Activating and reading Automatic
External signals from the robot controller".
[} 30]
KRC_ReadActualPosition  >>> "Reading the current robot position".
[} 32]
KRC_ReadActualAxisPosition  >>> "Reading the current axis position".
[} 33]
KRC_ReadActualVelocity  >>> "Reading the current path velocity".
[} 33]
KRC_ReadActualAxisVelocity  >>> "Reading the current axis velocity".
[} 34]
KRC_ReadActualAcceleration  >>> "Reading the current robot
acceleration". [} 35]
KRC_ReadDigitalInput  >>> "Reading a digital input". [} 36]
KRC_ReadDigitalInput1To8  >>> "Reading digital inputs 1 to 8".
[} 36]
KRC_ReadDigitalInputArray  >>> "Reading multiple digital inputs".
[} 37]
KRC_ReadDigitalOutput  >>> "Reading a digital output". [} 38]
KRC_WriteDigitalOutput  >>> "Writing a digital output". [} 39]
KRC_WriteDigitalOutput1To8  >>> "Writing digital outputs 1 to 8".
[} 40]
KRC_ReadAnalogInput  >>> "Reading an analog input". [} 40]
KRC_ReadAnalogOutput  >>> "Reading an analog output". [} 41]
KRC_WriteAnalogOutput  >>> "Writing an analog output". [} 41]
KRC_SetCoordSys  >>> "Selecting the tool, base and
interpolation mode". [} 43]
KRC_ReadToolData  >>> "Reading TOOL data". [} 44]
KRC_WriteToolData  >>> "Writing TOOL data". [} 45]
KRC_ReadBaseData  >>> "Reading BASE data". [} 45]
KRC_WriteBaseData  >>> "Writing BASE data". [} 46]
KRC_ReadLoadData  >>> "Reading the load data". [} 47]
KRC_WriteLoadData  >>> "Writing load data". [} 48]

12 Version: 1.4 TC3 Robotics mxAutomation


Programming

Administrative functions
KRC_ReadSoftEnd  >>> "Reading the software limit switches
of the robot axes". [} 49]
KRC_ReadSoftEndExt  >>> "Reading the software limit switches
of the external axes". [} 50]
KRC_WriteSoftEnd  >>> "Writing the software limit switches
of the robot axes". [} 50]
KRC_WriteSoftEndExt  >>> "Writing the software limit switches
of the external axes". [} 51]
KRC_AutoStart  >>> "Automatically starting function
blocks and signals". [} 62]

Motion programming
KRC_JogLinearRelative  >>> "Jogging to a relative end position".
[} 64]
KRC_JogToolRelative  >>> "Jogging to a relative end position in
the TOOL coordinate system". [} 66]
KRC_Jog  >>> "Jogging to an end position". [} 68]

Motion programming (PLC OPEN-compliant)


MC_MoveLinearAbsolute  >>> "Moving to a Cartesian position with
a LIN motion". [} 70]
MC_MoveLinearRelative  >>> "Moving to a Cartesian position with
a LIN_REL motion". [} 71]
MC_MoveDirectAbsolute  >>> "Moving to a Cartesian position with
a PTP motion". [} 73]
MC_MoveDirectRelative  >>> "Moving to a Cartesian position with
a PTP_REL motion". [} 74]
MC_MoveAxisAbsolute  >>> "Moving to an axis-specific position
with a PTP motion". [} 77]
MC_MoveCircularAbsolute  >>> "Moving to a Cartesian position with
a CIRC motion". [} 78]
MC_MoveCircularRelative  >>> "Moving to a Cartesian position with
a CIRC_REL motion". [} 80]

Program execution control


KRC_Abort  >>> "Canceling a program". [} 60]
KRC_Interrupt  >>> "Stopping the robot". [} 61]
KRC_Continue  >>> "Continuing a program". [} 61]
KRC_WaitForInput  >>> "Wait statement (read digital input)".
[} 43]

Interrupt programming
KRC_DeclareInterrupt  >>> "Declaring interrupts". [} 52]

TC3 Robotics mxAutomation Version: 1.4 13


Programming

Interrupt programming
KRC_ActivateInterrupt  >>> "Activating interrupts". [} 54]
KRC_DeactivateInterrupt  >>> "Deactivating interrupts". [} 55]
KRC_ReadInterruptState  >>> "Reading the state of an interrupt".
[} 55]

Path-related switching actions (=Trigger)


KRC_SetDistanceTrigger  >>> "Activating a path-related switching
action (TRIGGER WHEN DISTANCE)".
[} 57]
KRC_SetPathTrigger  >>> "Activating a path-related switching
action (TRIGGER WHEN PATH)". [} 58]

Diagnostic functions
KRC_ReadMXAStatus  >>> "Reading the current state of the
mxA interface". [} 82]
KRC_ReadMXAError  >>> "Reading error messages of the mxA
interface". [} 82]
KRC_ReadKRCError  >>> "Reading error messages of the
robot controller". [} 83]
KRC_MessageReset  >>> "Resetting error messages of the
mxA interface". [} 83]
KRC_Diag  >>> "Reading diagnostic signals". [} 85]
KRC_Error  >>> "Reading and acknowledging error
states". [} 87]

Special functions (general)


KRC_ReadSysVar  >>> "Reading system variables". [} 89]
KRC_WriteSysVar  >>> "Writing system variables". [} 90]
KRC_BrakeTest  >>> "Calling a brake test". [} 92]
KRC_MasRef  >>> "Calling a mastering test". [} 93]
KRC_ReadSafeOPStatus  >>> "Reading the safety controller
signals". [} 95]
KRC_ReadTouchUPState  >>> "Reading the state of the TouchUp
status keys". [} 96]
KRC_TouchUP  >>> "Teaching points". [} 97]
KRC_SetAdvance  >>> "Modifying settings for the advance
run". [} 97]
KRC_GetAdvance  >>> "Reading values from
KRC_SetAdvance". [} 98]
KRC_Forward  >>> "Calculating the Cartesian robot
position from the axis angles". [} 100]
KRC_Inverse  >>> "Calculating axis angles from the
Cartesian robot position". [} 100]

14 Version: 1.4 TC3 Robotics mxAutomation


Programming

Special functions (conveyor)


KRC_ConvIniOff  >>> "Initializing a conveyor". [} 102]
KRC_ConvOn  >>> "Activating a conveyor". [} 103]
KRC_ConvFollow  >>> "Tracking a workpiece on the
conveyor". [} 103]
KRC_ConvSkip  >>> "Picking up a workpiece from the
conveyor". [} 105]
KRC_ActivateConvInterrupt  >>> "Activating interrupts for
monitoring". [} 106]
KRC_DeactivateConvInterrupt  >>> "Deactivating interrupts for
monitoring". [} 108]

In order to be able to use these function blocks, the KUKA.ConveyorTech technology pack-
age must be installed on the robot controller.

Note

Special functions (VectorMove)


KRC_VectorMoveOn  >>> "Activating a motion along a vector".
[} 108]
KRC_VectorMoveOff  >>> "Deactivating KRC_VectorMoveOn".
[} 110]

In order to be able to use these function blocks, the KUKA.VectorMove technology package
must be installed on the robot controller.

Note

Special functions (workspaces)


KRC_WriteWorkspace  >>> "Configuring Cartesian workspaces".
[} 111]
KRC_ReadWorkspace  >>> "Reading the configuration of
Cartesian workspaces". [} 112]
KRC_WriteAxWorkspace  >>> "Configuring axis-specific
workspaces". [} 112]
KRC_ReadAxWorkspace  >>> "Reading the configuration of axis-
specific workspaces". [} 113]
KRC_ReadWorkstates  >>> "Reading the status of the
workspaces". [} 115]

TC3 Robotics mxAutomation Version: 1.4 15


Programming

7.2 Frequently used input/output signals in the function


blocks

7.2.1 Input signals

AxisGroupIdx
This signal input is used to set the number of the axis group addressed by a function block.

5 axis groups (robot and external axes) can be controlled by the PLC.

ExecuteCmd
If this signal is set, mxAutomation transfers the associated function block to the robot. The function block is
stored in a statement buffer by the robot, provided there is still sufficient space in the buffer. If the
ExecuteCmd input is reset, mxAutomation deletes the function block from the buffer again unless execution
of the statement has already begun.

7.2.2 Output signals

Busy
This signal output indicates that the associated function block is currently being transferred to the robot’s
statement buffer or has already been transferred. It is reset when the ExecuteCmd input is reset.

Active
This signal output indicates that the associated function block is currently being executed on the robot. It is
reset when the ExecuteCmd input is reset.

Approximate positioning is not possible with the active output because the next motion instruction is not sent
until the previous motion has been executed. Approximate positioning is only possible if the Busy output of
the previous function block is connected to the ExecuteCmd input of the following block.

Done
This signal output indicates that the associated function block has been successfully executed by the robot.
It is reset when the ExecuteCmd input is reset.

Error
This signal output indicates that an error has occurred during execution of the associated function block on
the robot. In this case, the signal output ErrorID contains an error number. It is reset when the ExecuteCmd
input is reset.

ErrorID
This signal output contains an error number.

The errors and error causes corresponding to the error number are described here: >>> "Messages". [} 117]

Aborted
This signal output is set either when the function block KRC_Abort is executed or when a statement is
executed in the ABORTING mode. It is reset when the ExecuteCmd input is reset.

16 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.2.3 Signal sequence for execution of ExecuteCmd

Example
The signal diagram applies in the following case:
•   A statement has been transferred by means of ExecuteCmd and successfully executed.

Signal diagram – ExecuteCmd successful

Item Description
1 The function block is transferred to the robot (= request to execute
the statement).
2 The statement is transferred.
3 The statement is currently being executed.
4 The statement was completed successfully. Neither has an error
occurred, nor has the statement been aborted, e.g. by KRC_Abort.
The Error signal would be set instead of the Done signal in the
case of an error, and the Aborted signal would be set instead of the
Done signal if the statement is aborted.
5 If the ExecuteCmd input is reset, the outputs too are reset.

Variations
•   ExecuteCmd is reset before Done is set. The statement will be executed in this case but the Done
signal will not be set. This means there is no confirmation that the statement has been executed.
•   ExecuteCmd is reset before Error or Aborted is set. The statement will be aborted in this case but
neither the Error nor the Aborted signal will be set. This means there is no confirmation that the
statement has been aborted.
•   ExecuteCmd is reset before Active is set. In this case the function block will be deleted from the
robot’s statement buffer.
•   ExecuteCmd is reset before Busy is set. The funcion block will not be transferred to the robot in this
case and the statement will therefore not be executed.

TC3 Robotics mxAutomation Version: 1.4 17


Programming

7.3 Frequently used input/output signals in the MC


function blocks
The MC function blocks differ from the KRC function blocks in that they correspond to the PLC OPEN
standard or are closer to it. The behavior of the Busy signal output in particular is different for the MC
function blocks. Here, the ComDone signal output must be used for linking function blocks.

7.3.1 Input signals

AxisGroupIdx
This signal input is used to set the number of the robot addressed by a function block.

Execute
If this signal is set, mxAutomation transfers the associated function block to the robot. The function block is
stored in a statement buffer by the robot, provided there is still sufficient space in the buffer. If the Execute
input is reset, mxAutomation deletes the function block from the buffer again unless execution of the
statement has already begun.

7.3.2 Output signals

ComBusy
This signal output indicates that the associated function block has been sent from the PLC to the robot’s
statement buffer and has been correctly transferred.

ComDone
This signal output indicates that the associated function block has been sent from the PLC to the robot’s
statement buffer and has been correctly transferred. This signal output is identical to the Done signal output
of the KRC function blocks. We recommend using this signal output for the approximation of motions.

Busy
This signal output indicates that execution of the associated function block has begun. However, it is
possible that the function block has not yet been transferred to the robot’s statement buffer. In this respect,
this signal output differs from the Busy signal output of the KRC function blocks.

Active
This signal output indicates that the associated function block is currently being executed on the robot. It is
reset when the Execute input is reset.

Approximation is not possible with the Active output because the next motion instruction is not sent until the
previous one is executed. Approximation is only possible if the ComDone output of the previous function
block is connected to the Execute input of the subsequent block.

Error
This signal output indicates that an error has occurred during execution of the associated function block on
the robot. In this case, the signal output ErrorID contains an error number. It is reset when the Execute input
is reset.

ErrorID
This signal output contains an error number.

18 Version: 1.4 TC3 Robotics mxAutomation


Programming

The errors and error causes corresponding to the error number are described here: >>> "Messages". [} 117]

CommandAborted
This signal output indicates that execution of a statement or motion has been aborted.

7.3.3 Signal sequence for execution of Execute

Example
The signal diagram applies in the following case:
•   A statement has been transferred by means of Execute and successfully executed.

Signal diagram – Execute successful

Item Description
1 The function block is transferred to the robot (= request to execute
the statement).
2 The statement has been transferred (= is located in the robot’s
statement buffer). The ComDone and ComBusy outputs are set.
3 The statement is currently being executed.
4 The statement was completed successfully. Neither has an error
occurred, nor has the statement been aborted, e.g. by KRC_Abort.
The Error signal would be set instead of the Done signal in the
case of an error, and the Aborted signal would be set instead of the
Done signal if the statement is aborted.
5 If the Execute input is reset, the outputs too are reset.

7.4 Structures for motion programming (STRUCT)


The data structures used for motion programming are described below.

TC3 Robotics mxAutomation Version: 1.4 19


Programming

7.4.1 APO
Approximation parameters for a KRC_Move motion command
Element Type Description
PTP_MODE PTP_APO (INT)  >>> "PTP_APO (INT)". [} 20]
CP_MODE CP_APO (INT)  >>> "CP_APO (INT)". [} 20]
CPTP INT Approximation distance for PTP motions (= furthest distance
before the end point at which approximate positioning can
begin)
•   1 … 100 %
Maximum distance 100 %: half the distance between the
start point and the end point relative to the contour of the
PTP motion without approximate positioning
CDIS REAL Distance parameter (unit: mm)
Approximation starts, at the earliest, when the distance to
the end point falls below the value specified here.
CORI REAL Orientation parameter (unit: °)
Approximation starts, at the earliest, when the dominant
orientation angle (rotation or swiveling of the longitudinal
axis of the tool) falls below the angle distance to the end
point specified here.
CVEL INT Velocity parameter
•   1 … 100 %
The approximation parameter specifies the percentage of
the programmed velocity at which the approximate
positioning process is started, at the earliest, in the
deceleration phase towards the end point.

7.4.2 PTP_APO (INT)


Approximate positioning with PTP motions
Value Name Description
0 – Without approximate positioning (default)
1 C_PTP Causes the end point to be approximated.
The specification C_PTP is sufficient for PTP-PTP approximate
positioning. In the case of PTP-CP approximation, i.e. if the
approximated PTP block is followed by a LIN or CIRC block,
another approximate positioning parameter must also be
specified.
2 C_PTP, C_DIS PTP-CP approximation with distance parameter
3 C_PTP, C_ORI PTP-CP approximation with orientation parameter
4 C_PTP, C_VEL PTP-CP approximation with velocity parameter

7.4.3 CP_APO (INT)


Approximate positioning with CP motions (LIN, CIRC)
Value Name Description
0 – Without approximate positioning (default)
1 C_DIS Approximate positioning with distance parameter
2 C_ORI Approximate positioning with orientation parameter
3 C_VEL Approximate positioning with velocity parameter

20 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.4.4 COORDSYS
Coordinate system to which the Cartesian coordinates of the end position refer in a KRC_Move or KRC_Jog
motion command
Element Type Description
Tool INT Number of the TOOL coordinate system
•   -1: coordinate system is not changed
•   0: NULLFRAME
•   1 … 16: TOOL_DATA[1 … 16]
Default: -1
Base INT Number of the BASE coordinate system
•   -1: coordinate system is not changed
•   0: NULLFRAME
•   1 … 32: BASE_DATA[1 … 32]
Default: -1
IPO_MODE INT Interpolation mode
•   0: The tool is a fixed tool (#BASE).
•   1: The tool is mounted on the mounting flange (#TCP).
Default: 0

7.4.5 E6AXIS
Angular values or translation values of the axes in an axis group for a KRC_MoveAxis motion command
Element Type Description
A1 REAL Position of robot axis A1 (unit: mm or °)
A2 REAL Position of robot axis A2 (unit: mm or °)
A3 REAL Position of robot axis A3 (unit: mm or °)
A4 REAL Position of robot axis A4 (unit: mm or °)
A5 REAL Position of robot axis A5 (unit: mm or °)
A6 REAL Position of robot axis A6 (unit: mm or °)
E1 REAL Position of external axis E1 (optional), (unit: mm or °)
E2 REAL Position of external axis E2 (optional), (unit: mm or °)
E3 REAL Position of external axis E3 (optional), (unit: mm or °)
E4 REAL Position of external axis E4 (optional), (unit: mm or °)
E5 REAL Position of external axis E5 (optional), (unit: mm or °)
E6 REAL Position of external axis E6 (optional), (unit: mm or °)

7.4.6 E6POS
Cartesian coordinates of the end position for a KRC_Move or KRC_Jog motion command
Element Type Description
X REAL Offset in X direction (unit: mm)
Y REAL Offset in Y direction (unit: mm)
Z REAL Offset in Z direction (unit: mm)
A REAL Rotation about Z axis
•   -180° … +180°

TC3 Robotics mxAutomation Version: 1.4 21


Programming

Element Type Description


B REAL Rotation about Y axis
•   -180° … +180°
C REAL Rotation about X axis
•   -180° … +180°
S INT Status The position (X, Y, Z) and
T INT Turn orientation (A, B, C) values of the
TCP are not sufficient to define the
robot position unambiguously, as
different axis positions are possible
for the same TCP. Status and Turn
serve to define an unambiguous
position that can be achieved with
different axis positions.
Note: Further information about
Status and Turn is contained in the
“Operating and Programming
Instructions for System
Integrators”.
E1 REAL Position of external axis E1 (optional), (unit: mm or °)
E2 REAL Position of external axis E2 (optional), (unit: mm or °)
E3 REAL Position of external axis E3 (optional), (unit: mm or °)
E4 REAL Position of external axis E4 (optional), (unit: mm or °)
E5 REAL Position of external axis E5 (optional), (unit: mm or °)
E6 REAL Position of external axis E6 (optional), (unit: mm or °)

7.4.7 FRAME
Space coordinates and orientation for the TOOL or BASE coordinate system
Element Type Description
X REAL Offset in X direction (unit: mm)
Y REAL Offset in Y direction (unit: mm)
Z REAL Offset in Z direction (unit: mm)
A REAL Orientation of the Z axis
•   -180° … +180°
B REAL Orientation of the Y axis
•   -180° … +180°
C REAL Orientation of the X axis
•   -180° … +180°

7.5 Integer variables


Some of the integer variables used in the function blocks are described below.

7.5.1 BufferMode
Mode in which a statement is executed on the robot controller

22 Version: 1.4 TC3 Robotics mxAutomation


Programming

Value Name Description


0 DIRECT The statement is executed directly by the Submit interpreter
(Submit program).
Note: This mode is not available for certain function blocks.
1 ABORTING The statement is executed immediately by the robot
interpreter (main program). First, all active motions and
buffered statements are aborted and the robot is braked to a
standstill.
2 BUFFERED The statement is buffered. Buffered statements are executed
by the robot interpreter (main program) according to the FIFO
principle.

7.5.2 QueueMode
Mode in which a statement is executed on the robot controller
Value Name Description
0 DIRECT The statement is executed directly by the submit interpreter
(Submit program).
Note: This mode is not available for certain function blocks.
1 ABORTING The statement is executed immediately by the robot
interpreter (main program). First, all active motions and
buffered statements are aborted and the robot is braked to a
standstill.
2 BUFFERED The statement is buffered. Buffered statements are executed
by the robot interpreter (main program) according to the FIFO
principle.

7.5.3 CircType
Orientation control for circular motion
Value Name Description
0 BASE Base-related orientation control during a circular motion
1 PATH Path-related orientation control during a circular motion

7.5.4 OriType
Orientation control for the TCP
Value Name Description
0 VAR The orientation of the TCP changes continuously during the
motion.
1 CONSTANT The orientation of the TCP remains constant during the
motion.
2 JOINT The orientation of the TCP changes continuously during the
motion, but not uniformly. This is done by linear transformation
(axis-specific motion) of the wrist axis angles.
Note: This orientation type is not suitable if a specific
orientation must be maintained exactly.

7.5.5 Status
Current state of the mxA interface (function block KRC_ReadMXAStatus)

TC3 Robotics mxAutomation Version: 1.4 23


Programming

Value Name Description


0 Invalid No function blocks can be processed.
Frequent causes:
•   Submit interpreter stopped or deselected
•   I/O error due to incorrect bus configuration
•   Robot controller not started.
1 Error An mxA error message is active.
The error message must be reset with the function block
KRC_MessageReset.
2 ProgramStopped Robot interpreter is not active (main program has been
stopped or deselected).
3 StandBy Robot interpreter is active and waiting for statements, e.g.
waiting for an input.
4 Executing Robot interpreter is active (main program is being executed).
5 Aborting Robot stopped and all statements aborted.

7.6 Data of a Cartesian workspace


The data of a Cartesian workspace which are used in certain function blocks are described below.

7.6.1 Origin and orientation


The origin and orientation of a Cartesian workspace are specified with the following elements. These are
relative to the WORLD coordinate system.
Element Data type Unit Minimum Maximum
X REAL mm - -
Y REAL mm - -
Z REAL mm - -
A REAL ° -180 180
B REAL ° -180 180
C REAL ° -180 180

7.6.2 Dimensions
The dimensions of a Cartesian workspace are specified with the following elements.
Element Data type Unit
X1 REAL mm
X2 REAL mm
Y1 REAL mm
Y2 REAL mm
Z1 REAL mm
Z2 REAL mm

7.7 Data of an axis-specific workspace


The data of an axis-specific workspace which are used in certain function blocks are described below.

24 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.7.1 Robot axes


Element Data type Unit Description
A1_N REAL mm/° Lower limit for axis angle
A2_N REAL mm/°
A3_N REAL mm/°
A4_N REAL mm/°
A5_N REAL mm/°
A6_N REAL mm/°
A1_P REAL mm/° Upper limit for axis angle
A2_P REAL mm/°
A3_P REAL mm/°
A4_P REAL mm/°
A5_P REAL mm/°
A6_P REAL mm/°

7.7.2 External axes


Element Data type Unit Description
E1_N REAL mm/° Lower limit for axis angle
E2_N REAL mm/°
E3_N REAL mm/°
E4_N REAL mm/°
E5_N REAL mm/°
E6_N REAL mm/°
E1_P REAL mm/° Upper limit for axis angle
E2_P REAL mm/°
E3_P REAL mm/°
E4_P REAL mm/°
E5_P REAL mm/°
E6_P REAL mm/°

7.8 Programming tips for TC3 mxAutomation

7.8.1 Instancing
The following function blocks may only be instanced once per robot. In the case of multiple instancing, the
signals of the most recently called function block are output.
•   KRC_ReadAxisGroup
•   KRC_Intialize
•   KRC_SetOverride
•   KRC_AutomaticExternal
•   KRC_AutoStart
•   KRC_Diag
•   KRC_WriteAxisGroup

All other function blocks used in the mxAutomation robot program can be created as a multi-instance call.
The advantage of this is that not every function block requires a data block of its own.

TC3 Robotics mxAutomation Version: 1.4 25


Programming

7.8.2 ExecuteCmd
•   As far as possible, an ExecuteCmd input should only ever be simultaneously set for a function block
of the same robot.
•   After an ExecuteCmd input has been activated, do not reset it again until the function block has
confirmed execution of the statement by means of the Done signal or indicated by means of the Error
or Aborted signal that the statement has not been executed. If the ExecuteCmd input is reset
beforehand, there is no confirmation that the statement has been executed.
•   By linking the Busy output of a function block to the ExecuteCmd input of the following block, it is
possible to transfer a sequence of consecutive functions to the statement buffer and to execute them.
•   ExecuteCmd should not be used as a start signal for a sequence of statements. This might result in
the transfer of the following statements taking up valuable time.

Execution of a statement sequence should be triggered with KRC_WaitForInput instead. Linking the Busy
and ExecuteCmd signals ensures that execution of the planned steps can be started without delay as soon
as the corresponding input signal is received.

7.8.3 Program override


•   If the mxAutomation robot program is started by a RESET at the function block
KRC_AutomaticExternal, set the program override to a value greater than zero. Only then is the robot
interpreter executed in a loop.
•   While the mxAutomation robot program is being executed, the program override can be set to zero
without problems.

7.8.4 Approximate positioning


Approximate positioning means that the motion does not stop exactly at the programmed point. Approximate
positioning is an option that can be selected during motion programming.
•   Approximate positioning is not possible if the motion instruction is followed by an instruction that
triggers an advance run stop.
•   Approximate positioning is only possible if the motion statement is followed by a statement that is
transferred in BUFFERED mode.

7.9 Administrative functions

7.9.1 Reading PLC-specific communication into a non-PLC-specific


structure

Description
The function block KRC_ReadAxisGroup translates the TwinCAT-specific interface to the robot controller into
the non-PLC-specific structure of an axis group.

The function block KRC_ReadAxisGroup must always be called at the start of the program.
Access to the axis group structure is only permissible between KRC_ReadAxisGroup and
KRC_WriteAxisGroup.
Note

26 Version: 1.4 TC3 Robotics mxAutomation


Programming

The function block may only be instanced once per axis group. In the case of multiple in-
stancing, the signals of the most recently called function block are output.

Note

Function block KRC_ReadAxisGroup

Inputs
Parameter Type Description
KRC4_Input POINTER TO Structure map of the input range of the
BYTE robot controller
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
ErrorID DINT Error number
Error BOOL TRUE = error in function block

7.9.2 Writing a non-PLC-specific structure into PLC-specific


communication

Description
The function block KRC_WriteAxisGroup translates the non-PLC-specific structure of an axis group into the
TwinCAT-specific interface to the robot controller.

The function block KRC_WriteAxisGroup must always be called at the end of the program.
Access to the axis group structure is only permissible between KRC_ReadAxisGroup and
KRC_WriteAxisGroup.
Note

The function block may only be instanced once per axis group. In the case of multiple in-
stancing, the signals of the most recently called function block are output.

Note

Function block KRC_WriteAxisGroup

TC3 Robotics mxAutomation Version: 1.4 27


Programming

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
KRC4_Output POINTER TO Structure map of the output range of the
BYTE robot controller

Outputs
Parameter Type Description
ErrorID DINT Error number
Error BOOL TRUE = error in function block

7.9.3 Initializing the mxA interface

Description
The function block KRC_Initialize initializes the mxA interface on the robot controller. Statements cannot be
transferred until the interface has been initialized.

During initialization, the versions of the PLC library and mxA interface are compared and checked for
compatibility. The 1st and 2nd digits of the version must match.

The function block may only be instanced once per axis group. In the case of multiple in-
stancing, the signals of the most recently called function block are output.

Note

Function block KRC_Initialize

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs

28 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


ErrorID DINT Error number
KRC_Serial DINT Serial number of the robot controller
KRC_Major DINT Version identifier of the mxA interface (1st digit)
KRC_Minor DINT Version identifier of the mxA interface (2nd digit)
KRC_Revision DINT Version identifier of the mxA interface (3rd digit)
PLC_Major DINT Version identifier of the PLC library (1st digit)
PLC_Minor DINT Version identifier of the PLC library (2nd digit)
PLC_Revision DINT Version identifier of the PLC library (3rd digit)
Done BOOL TRUE = initialization successfully completed
Error BOOL TRUE = error in function block

7.9.4 Setting the program override (POV)

Description
The function block KRC_SetOverride sets the program override.

Program override is the velocity of the robot during program execution. The program override is specified as
a percentage of the programmed velocity. The override setting is transferred to the robot during every PLC
cycle. If the override setting is changed, this change is detected by the robot and applied.

The override is only applied in Automatic External mode so that the override can be set via the smartPAD in
the test modes T1 and T2, e.g. for teaching.

The function block may only be instanced once per axis group. In the case of multiple in-
stancing, the signals of the most recently called function block are output.

Note

Function block KRC_SetOverride

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
Override INT Set the program override.
•   0 … 100 %

Outputs
Parameter Type Description
ActualOverride INT Current override setting
•   0 … 100%
ErrorID DINT Error number
Valid BOOL TRUE = data are valid

TC3 Robotics mxAutomation Version: 1.4 29


Programming

Parameter Type Description


Error BOOL TRUE = error in function block

7.9.5 Activating and reading Automatic External signals from the


robot controller

Description
The function block KRC_AutomaticExternal activates the Automatic External interface and reads the
interface signals.

The function block may only be instanced once per axis group. In the case of multiple in-
stancing, the signals of the most recently called function block are output.

Note

Function block KRC_AutomaticExternal

Inputs

Parameter Type Signal name (KRL) Description


AxisGroupIdx INT — Index of axis group
•  1…5
MOVE_ENABLE BOOL $MOVE_ENABLE TRUE = motion enable for the robot
Note: This system variable is monitored by
the robot controller in all operating modes.
CONF_MESS BOOL $CONF_MESS TRUE = acknowledgement of error
messages
DRIVES_ON BOOL $DRIVES_ON TRUE = activation of the robot drives
DRIVES_OFF BOOL $DRIVES_OFF TRUE = deactivation of the robot drives
EXT_START BOOL $EXT_START TRUE = start or continuation of robot
program execution

30 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Signal name (KRL) Description


RESET BOOL — Selects the mxAutomation robot program
in the case of a rising edge of the signal
and starts it. First, all buffered statements
are aborted.
ENABLE_T1 BOOL — TRUE = enabling of T1 mode
The signal $MOVE_ENABLE is
suppressed in the absence of enabling.
The robot cannot be moved.
ENABLE_T2 BOOL — TRUE = enabling of T2 mode
The signal $MOVE_ENABLE is
suppressed in the absence of enabling.
The robot cannot be moved.
ENABLE_AUT BOOL — TRUE = enabling of Automatic mode
The signal $MOVE_ENABLE is
suppressed in the absence of enabling.
The robot cannot be moved.
ENABLE_EXT BOOL — TRUE = enabling of Automatic External
mode
The signal $MOVE_ENABLE is
suppressed in the absence of enabling.
The robot cannot be moved.

Outputs

Parameter Type Signal name (KRL) Description


Valid BOOL — TRUE = data are valid
RC_RDY1 BOOL $RC_RDY1 TRUE = robot controller ready for program
start
ALARM_STOP BOOL $ALARM_STOP FALSE = robot stop by EMERGENCY
STOP
USER_SAFE BOOL $USER_SAF FALSE = operator safety violated
PERI_RDY BOOL $PERI_RDY TRUE = robot drives activated
ROB_CAL BOOL $ROB_CAL TRUE = robot axes mastered
IO_ACTCONF BOOL $IO_ACTCONF TRUE = Automatic External interface
active
STOPMESS BOOL $STOPMESS TRUE = safety circuit interrupted (robot
fault)
INT_E_STOP BOOL Int. E-Stop TRUE = external EMERGENCY STOP
FALSE = EMERGENCY STOP device
pressed on the smartPAD
PRO_ACT BOOL $PRO_ACT TRUE = process active at robot level
APPL_RUN BOOL APPL_RUN TRUE = robot program running
PRO_MOVE BOOL $PRO_MOVE TRUE = synchronous robot motion active
ON_PATH BOOL $ON_PATH TRUE = robot on programmed path
NEAR_POSRET BOOL $NEAR_POSRET TRUE = robot near most recently saved
position on the programmed path (after
leaving path)
ROB_STOPPED BOOL $ROB_STOPPED TRUE = robot is at standstill
T1 BOOL $T1 TRUE = operating mode T1 selected
T2 BOOL $T2 TRUE = operating mode T2 selected
AUT BOOL $AUT TRUE = operating mode Automatic
selected

TC3 Robotics mxAutomation Version: 1.4 31


Programming

Parameter Type Signal name (KRL) Description


EXT BOOL $EXT TRUE = operating mode Automatic
External selected

7.9.6 Reading the current robot position

Description
The function block KRC_ReadActualPosition reads the current Cartesian actual position of the robot
$POS_ACT. This is updated cyclically.

Function block KRC_ReadActualPosition

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
Valid BOOL TRUE = data are valid
Position E6POS Current Cartesian actual position $POS_ACT
The data structure E6POS contains all
components of the Cartesian actual position (=
position of the TCP relative to the origin of the
BASE coordinate system).
X, Y, Z REAL Current actual position in the X, Y, Z directions
A, B, C REAL Orientation A, B, C in the current actual position
Status INT Status of the current actual position
Turn INT Turn of the current actual position
Tool INT Number of the currently used TOOL coordinate
system $ACT_TOOL
Base INT Number of the currently used BASE coordinate
system $ACT_BASE
IPOMode INT Current interpolation mode in the main run
$IPO_MODE_C

32 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.9.7 Reading the current axis position

Description
The function block KRC_ReadActualAxisPosition reads the current axis-specific robot position $AXIS_ACT.
This is updated cyclically.

Function block KRC_ReadActualAxisPosition

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
Valid BOOL TRUE = data are valid
AxisPosition E6AXIS Current axis-specific robot position $AXIS_ACT
The data structure E6AXIS contains all the axis
positions of the axis group.
A1 … A6 REAL Current position of robot axes A1 to A6
E1 … E6 REAL Current position of external axes E1 to E6

7.9.8 Reading the current path velocity

Description
The function block KRC_ReadActualVelocity reads the current actual velocity at the TCP of the robot
$VEL_ACT.

The current path velocity can only be read for CP motions in program mode.

Note

TC3 Robotics mxAutomation Version: 1.4 33


Programming

Function block KRC_ReadActualVelocity

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
Valid BOOL TRUE = data are valid
Value REAL Current path velocity $VEL_ACT (unit: m/s)

7.9.9 Reading the current axis velocity

Description
The function block KRC_ReadActualAxisVelocity reads the current axis-specific velocity of the robot
$VEL_AXIS_ACT.

Function block KRC_ReadActualAxisVelocity

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.

Outputs
Parameter Type Description
ErrorID DINT Error number

34 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


A1 … A6 INT Current motor speed (-100% … +100%) of
A1 … A6 in the main run, relative to the
maximum motor speed ($VEL_AXIS_MA)
Note: The actual resulting speed of the robot
axis is dependent on the gear ratio.
E1 … E6 INT Current motor speed (-100% … +100%) of
E1 … E6 in the main run, relative to the
maximum motor speed ($VEL_AXIS_MA)
Note: The actual resulting speed of the external
axis is dependent on the gear ratio.
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.9.10 Reading the current robot acceleration

Description
The function block KRC_ReadActualAcceleration reads the current Cartesian acceleration at the TCP of the
robot $ACC_CAR_ACT.

The current Cartesian acceleration about angles A, B, C is not evaluated.

Note

Function block KRC_ReadActualAcceleration

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.

Outputs
Parameter Type Description
ErrorID DINT Error number
ACC_ABS REAL Current Cartesian acceleration relative to the
absolute value of the overall acceleration lX + Y
+Zl (unit: m/s2)

TC3 Robotics mxAutomation Version: 1.4 35


Programming

Parameter Type Description


X, Y, Z REAL Current Cartesian acceleration in the X, Y, Z
direction (unit: m/s2)
A, B, C REAL Current Cartesian acceleration about angles A,
B, C
0 m/s2 (not calculated)
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.9.11 Reading a digital input

Description
The function block KRC_ReadDigitalInput polls and reads a digital input of the robot controller. This function
is executed in the Submit interpreter.

Function block KRC_ReadDigitalInput

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.
Number INT Number of the digital input
•   1 … 2 048

Outputs
Parameter Type Description
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Value BOOL Value of the digital input
Error BOOL TRUE = error in function block

7.9.12 Reading digital inputs 1 to 8

Description
The function block KRC_ReadDigitalInput1To8 polls and reads the digital inputs 1 to 8 of the robot controller.
This function is executed in the Submit interpreter. The input values can be read continuously without
triggering a blockade.

36 Version: 1.4 TC3 Robotics mxAutomation


Programming

Function block KRC_ReadDigitalInput1To8

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
Valid BOOL TRUE = data are valid
IN1 … IN8 BOOL Actual value of the digital input $IN[1] … $IN[8]
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.9.13 Reading multiple digital inputs

Description
The function block KRC_ReadDigitalInputArray polls and reads multiple digital inputs of the robot controller.
This function is executed in the Submit interpreter.

Function block KRC_ReadDigitalInputArray

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.
Startnumber INT Number of the first digital output that is polled
•   1 … 2 048

TC3 Robotics mxAutomation Version: 1.4 37


Programming

Parameter Type Description


Length INT Number of inputs that are polled
•   1 … 2 00
Note: If the number of inputs to be read
exceeds the 1 … 2048 range, no error message
is generated. Inputs outside of this range are not
read.

Outputs
Parameter Type Description
Done BOOL TRUE = statement has been executed
Values BOOL[200] Values of the digital inputs
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.9.14 Reading a digital output

Description
The function block KRC_ReadDigitalOutput polls and reads a digital output of the robot controller. This
function is executed in the Submit interpreter.

Function block KRC_ReadDigitalOutput

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.
Number INT Number of the digital output
•   1 … 2 048

Outputs
Parameter Type Description
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Value BOOL Value of the digital output
Error BOOL TRUE = error in function block

38 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.9.15 Writing a digital output

Description
The function block KRC_WriteDigitalOutput writes a digital output or a pulse output on the robot controller.
This function is executed in the Submit interpreter.

Function block KRC_WriteDigitalOutput

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
Number INT Number of the digital output
•   1 … 2 048
Note: It must be ensured that no outputs are used that are
already assigned by the system. Example: $OUT[1025] is
always TRUE.
Value BOOL Value of the digital output
Pulse REAL Length of the pulse
•   0.0 s
No pulse active
•   0.1 … 3.0 s
Pulse interval = 0.1 s; pulse durations outside this range of
values trigger a program stop.
_Continue BOOL TRUE = output written in advance run
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 39


Programming

7.9.16 Writing digital outputs 1 to 8

Description
The function block KRC_WriteDigitalOutput1To8 writes the digital outputs 1 to 8 on the robot controller. This
function is executed in the Submit interpreter. The output values can be written continuously without
triggering a blockade.

Function block KRC_WriteDigitalOutput1To8

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
OUT1 … OUT8 BOOL Setpoint value of the output
$OUT[1] … $OUT[8]

Outputs
Parameter Type Description
ErrorID DINT Error number
Error BOOL TRUE = error in function block

7.9.17 Reading an analog input

Description
The function block KRC_ReadAnalogInput polls and reads an analog input of the robot controller. This
function is executed in the Submit interpreter.

Function block KRC_ReadAnalogInput

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.

40 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


Number INT Number of the analog input
•   1 … 32

Outputs
Parameter Type Description
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Value REAL Value of the analog input
Error BOOL TRUE = error in function block

7.9.18 Reading an analog output

Description
The function block KRC_ReadAnalogOutput polls and reads an analog output of the robot controller. This
function is executed in the Submit interpreter.

Function block KRC_ReadAnalogOutput

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.
Number INT Number of the analog output
•   1 … 32

Outputs
Parameter Type Description
Value REAL Value of the analog output
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.9.19 Writing an analog output

Description
The function block KRC_WriteAnalogOutput polls and writes an analog output of the robot controller. This
function is executed in the Submit interpreter.

TC3 Robotics mxAutomation Version: 1.4 41


Programming

Function block KRC_WriteAnalogOutput

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
Number INT Number of the analog output
•   1 … 32
Value REAL Value of the analog output
_Continue BOOL TRUE = output written in advance run
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

42 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.9.20 Wait statement (read digital input)

Description
The function block KRC_WaitForInput stops the program until a digital input takes the defined value.
Program execution is then resumed.

Function block KRC_WaitForInput

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
Number INT Number of the digital input
•   1 … 2 048
Value BOOL Setpoint value of the digital input
iContinue BOOL TRUE = poll input in advance run
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Active BOOL TRUE = statement is currently being executed
(robot is waiting for an input)
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement has been aborted
Error BOOL TRUE = error in function block

7.9.21 Selecting the tool, base and interpolation mode

Description
The function block KRC_SetCoordSys can be used to set the tool, base and interpolation mode without
having to execute a motion at the same time. This function is required, for example, to read the current
position in different coordinate systems.

TC3 Robotics mxAutomation Version: 1.4 43


Programming

Function block KRC_SetCoordSys

Inputs

Parameter Type Description


CoordinateSystem COORDSYS  >>> "COORDSYS". [} 21]
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of
the signal.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.9.22 Reading TOOL data

Description
The function block KRC_ReadToolData reads the TOOL data of the robot.

Function block KRC_ReadToolData

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.
ToolNo INT Number of the TOOL coordinate system
•   1 … 16: TOOL_DATA[1 … 16]

44 Version: 1.4 TC3 Robotics mxAutomation


Programming

Outputs
Parameter Type Description
ToolData FRAME  >>> "FRAME". [} 22]
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.9.23 Writing TOOL data

Description
The function block KRC_WriteToolData writes the TOOL data of the robot.

Function block KRC_WriteToolData

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
ToolData FRAME  >>> "FRAME". [} 22]
ToolNo INT Number of the TOOL coordinate system
•   1 … 16: TOOL_DATA[1 … 16]
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.9.24 Reading BASE data

Description
The function block KRC_ReadBaseData reads the BASE data of the robot.

TC3 Robotics mxAutomation Version: 1.4 45


Programming

Function block KRC_ReadBaseData

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.
BaseNo INT Number of the BASE coordinate system
•   1 … 32: BASE_DATA[1 … 32]

Outputs
Parameter Type Description
BaseData FRAME  >>> "FRAME". [} 22]
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.9.25 Writing BASE data

Description
The function block KRC_WriteBaseData writes the BASE data of the robot.

Function block KRC_WriteBaseData

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
BaseData FRAME  >>> "FRAME". [} 22]
BaseNo INT Number of the BASE coordinate system
•   1 … 32: BASE_DATA[1 … 32]
BufferMode INT  >>> "BufferMode". [} 22]

46 Version: 1.4 TC3 Robotics mxAutomation


Programming

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.9.26 Reading the load data

Description
The function block KRC_ReadLoadData reads the load data of the robot (payload data or supplementary
load data). This function is executed in the Submit interpreter.

Function block KRC_ReadLoadData

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.
Tool INT Number of the TOOL coordinate system for
reading the payload data or number for reading
the supplementary load data
•   1 … 16: TOOL_DATA[1 … 16]
•   -1: Supplementary load A1
•   -2: Supplementary load A2
•   -3: Supplementary load A3

Outputs
Parameter Type Description
M REAL Mass
X, Y, Z REAL Position of the center of gravity relative to the
flange

TC3 Robotics mxAutomation Version: 1.4 47


Programming

Parameter Type Description


A, B, C REAL Orientation of the principal inertia axes relative
to the flange
JX, JY, JZ REAL Mass moments of inertia
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.9.27 Writing load data

Description
The function block KRC_WriteLoadData writes the load data of the robot (payload data or supplementary
load data).

Function block KRC_WriteLoadData

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
Tool INT Number of the TOOL coordinate system for writing the payload
data or number for writing the supplementary load data
•   1 … 16: TOOL_DATA[1 … 16]
•   -1: Supplementary load A1
•   -2: Supplementary load A2
•   -3: Supplementary load A3
M REAL Mass
X, Y, Z REAL Position of the center of gravity relative to the flange
A, B, C REAL Orientation of the principal inertia axes relative to the flange
JX, JY, JZ REAL Mass moments of inertia
BufferMode INT  >>> "BufferMode". [} 22]

48 Version: 1.4 TC3 Robotics mxAutomation


Programming

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.9.28 Reading the software limit switches of the robot axes

Description
The function block KRC_ReadSoftEnd reads the software limit switches of the robot axes. This function is
executed in the Submit interpreter.

Function block KRC_ReadSoftEnd

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.

Outputs

Parameter Type Description


A1_Min … A6_Min REAL Negative software limit switch of axis A1 … A6
A1_Max … A6_Max REAL Positive software limit switch of axis A1 … A6
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 49


Programming

7.9.29 Reading the software limit switches of the external axes

Description
The function block KRC_ReadSoftEndExt reads the software limit switches of the external axes. This
function is executed in the Submit interpreter.

Function block KRC_ReadSoftEndExt

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.

Outputs

Parameter Type Description


E1_Min … E6_Min REAL Negative software limit switch of axis E1 … E6
E1_Max … E6_Max REAL Positive software limit switch of axis E1 … E6
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.9.30 Writing the software limit switches of the robot axes

Description
The function block KRC_WriteSoftEnd writes the software limit switches of the robot axes.

50 Version: 1.4 TC3 Robotics mxAutomation


Programming

Function block KRC_WriteSoftEnd

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
A1_Min … A6_Min REAL Negative software limit switch of axis A1 … A6
(Unit: mm or °)
A1_Max … A6_Max REAL Positive software limit switch of axis A1 … A6
(Unit: mm or °)
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.9.31 Writing the software limit switches of the external axes

Description
The function block KRC_WriteSoftEndExt writes the software limit switches of the external axes.

TC3 Robotics mxAutomation Version: 1.4 51


Programming

Function block KRC_WriteSoftEndExt

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
E1_Min … E6_Min REAL Negative software limit switch of axis E1 … E6
(Unit: mm or °)
E1_Max … E6_Max REAL Positive software limit switch of axis E1 … E6
(Unit: mm or °)
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.9.32 Declaring interrupts

Description
The function block KRC_DeclareInterrupt declares an interrupt to a digital input. There are 8 predefined
interrupts available for this.

Syntax
GLOBAL INTERRUPT DECL 90+Interrupt WHEN $IN[Input] == InputValue DO Subprogram

52 Version: 1.4 TC3 Robotics mxAutomation


Programming

Function block KRC_DeclareInterrupt

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is buffered in the case of a rising edge of the
signal.
Interrupt INT Number of the interrupt
•  1…8
Input INT Number of the digital input to which the interrupt is declared
•   1 … 2 048
Note: It must be ensured that no inputs are used that are
already assigned by the system. Example: $IN[1025] is always
TRUE.
InputValue BOOL TRUE = statement is executed in the case of a rising edge of
the signal.
FALSE = statement is executed in the case of a falling edge of
the signal.
Reaction INT Reaction to the interrupt
•   0: BRAKE F + HALT
•   1: BRAKE + HALT
•   2: BRAKE F + WAIT FOR $IN[Input]<>InputValue
•   3: BRAKE + WAIT FOR $IN[Input]<>InputValue
•   4: BRAKE F + WAIT FOR KRC_Continue
•   5: BRAKE + WAIT FOR KRC_Continue
•   6: BRAKE F + WAIT FOR $IN[Input]<>InputValue AND
KRC_Continue
•   7: BRAKE + WAIT FOR $IN[Input]<>InputValue AND
KRC_Continue
BufferMode INT  >>> "BufferMode". [} 22]

Outputs

Parameter Type Description


ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred or has already
been transferred
Done BOOL TRUE = statement has been processed in the advance run
Note: The statement can no longer be aborted. Exception:
Program is deselected or reset.

TC3 Robotics mxAutomation Version: 1.4 53


Programming

Parameter Type Description


Aborted BOOL TRUE = statement was aborted before it was processed in the
advance run
Error BOOL TRUE = error in function block

7.9.33 Activating interrupts

Description
The function block KRC_ActivateInterrupt activates a previously declared interrupt. There are 8 predefined
interrupts available for this.

An interrupt cannot be processed until the interrupt has been activated by the main run of the robot
interpreter. The function block KRC_WaitForInput can be used to monitor and check whether an interrupt is
active.

Function block KRC_ActivateInterrupt

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is buffered in the case of a rising edge of the
signal.
Interrupt INT Number of the interrupt
•  1…8
BufferMode INT  >>> "BufferMode". [} 22]

Outputs

Parameter Type Description


ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred or has already
been transferred
Done BOOL TRUE = statement has been processed in the advance run
Note: The signal does not indicate whether the interrupt has
really been triggered or activated by the main run.
Aborted BOOL TRUE = statement was aborted before it was processed in the
advance run
Error BOOL TRUE = error in function block

54 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.9.34 Deactivating interrupts

Description
The function block KRC_DeactivateInterrupt deactivates a previously declared interrupt. There are 8
predefined interrupts available for this.

Syntax
INTERRUPT OFF 90+Interrupt

Function block KRC_DeactivateInterrupt

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is buffered in the case of a rising edge of the
signal.
Interrupt INT Number of the interrupt
•  1…8
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.9.35 Reading the state of an interrupt

Description
The function block KRC_ReadInterruptState reads the state of an interrupt in the advance run. This is
updated cyclically.

A distinction can be made between the state of the interrupt in the advance run and the state in the main run.

TC3 Robotics mxAutomation Version: 1.4 55


Programming

Function block KRC_ReadInterruptState

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
Interrupt INT Number of the interrupt
•  1…8

Outputs

Parameter Type Description


ErrorID DINT Error number
Value INT State of specified interrupt
•   0: Interrupt has not been declared.
•   1: Interrupt has been declared, but not activated.
•   2: Interrupt has been declared and activated in the
advance run.
•   3: Interrupt has been declared and deactivated while
still in the advance run.
•   4: Interrupt has been triggered and is active.
•   5: Interrupt has been triggered and the main program
has already been resumed with KRC_Continue.
Error BOOL TRUE = error in function block
Valid BOOL TRUE = data are valid

56 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.9.36 Activating a path-related switching action (TRIGGER WHEN


DISTANCE)

Description
The function block KRC_SetDistanceTrigger triggers a path-related switching action in the case of PTP or
LIN motions.

The Trigger triggers a defined statement. The statement refers to the start point or end point of the motion
block in which the Trigger is situated in the program. The statement is executed parallel to the robot motion.

The statement can be shifted in time. It is then not triggered exactly at the start or end point, but brought
forward or delayed.

If a trigger calls a subprogram, it counts as an active interrupt until the subprogram has
been executed. Up to 16 interrupts may be active at any one time.

Note

Further information on triggers, on offsetting the switching point and on the offset limits can
be found in the documentation by KUKA.

Note

Function block KRC_SetDistanceTrigger

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is buffered in the case of a rising edge of the
signal.
Distance INT Switching point of the trigger
•   0: Switching action at the start point
•   1: Switching action at the end point
Delay INT Statement delay
•   Delay = 0 ms: no delay
The statement cannot be shifted freely in time. The shifts that
are available depend on the value selected for Distance.
Further information about this is contained in the
documentation by KUKA.

TC3 Robotics mxAutomation Version: 1.4 57


Programming

Parameter Type Description


Output INT Number of the digital output
•   1 … 2 048
Note: It must be ensured that no outputs are used that are
already assigned by the system. Example: $OUT[1025] is
always TRUE.
Value BOOL TRUE = activate output
FALSE = deactivate output
Pulse REAL Length of the pulse
•   0.0 s
No pulse active
•   0.1 … 3.0 s
Pulse interval = 0.1 s; pulse durations outside this range of
values trigger a program stop.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs

Parameter Type Description


ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred or has already
been transferred
Done BOOL TRUE = statement has been processed in the advance run
Note: The statement can no longer be aborted. Exception:
Program is deselected or reset. The signal does not indicate
whether the switching action has really been triggered.
Aborted BOOL TRUE = statement was aborted before it was processed in the
advance run
Error BOOL TRUE = error in function block

7.9.37 Activating a path-related switching action (TRIGGER WHEN


PATH)

Description
The function block KRC_SetPathTrigger triggers a path-related switching action in the case of CP motions.

The Trigger triggers a defined statement. The statement refers to the end point of the motion block in which
the Trigger is situated in the program. The statement is executed parallel to the robot motion.

The statement can be shifted in time and/or space. It is then not triggered exactly at the end point, but
beforehand or afterwards.

Path triggers can only be activated before CP motions. If the subsequent motion is not a
CP motion, the robot controller issues an error message.

Note

58 Version: 1.4 TC3 Robotics mxAutomation


Programming

If a trigger calls a subprogram, it counts as an active interrupt until the subprogram has
been executed. Up to 16 interrupts may be active at any one time.

Note

Further information on triggers, on offsetting the switching point and on the offset limits can
be found in the documentation by KUKA.

Note

Function block KRC_SetPathTrigger

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is buffered in the case of a rising edge of the
signal.
Path REAL Statement offset
If the statement is to be shifted in space, the desired distance
from the end point must be specified here. If this end point is
approximated, Path is the distance to the position on the
approximate positioning arc closest to the end point.
•   Delay = 0.0 mm: no offset
•   Delay > 0.0 mm: shifts the statement towards the end
of the motion.
•   Delay < 0.0 mm: shifts the statement towards the start
of the motion.
Delay INT Statement delay
•   Delay = 0 ms: no delay
The statement cannot be shifted freely in time. The offsets that
are possible depend on the value selected for Path. Further
information about this is contained in the documentation by
KUKA.
Output INT Number of the digital output
•   1 … 2 048
Note: It must be ensured that no outputs are used that are
already assigned by the system. Example: $OUT[1025] is
always TRUE.

TC3 Robotics mxAutomation Version: 1.4 59


Programming

Parameter Type Description


Value BOOL TRUE = activate output
FALSE = deactivate output
Pulse REAL Length of the pulse
•   0.0 s
No pulse active
•   0.1 … 3.0 s
Pulse interval = 0.1 s; pulse durations outside this range of
values trigger a program stop.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs

Parameter Type Description


ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred or has already
been transferred
Done BOOL TRUE = statement has been processed in the advance run
Note: The statement can no longer be aborted. Exception:
Program is deselected or reset. The signal does not indicate
whether the switching action has really been triggered.
Aborted BOOL TRUE = statement was aborted before it was processed in the
advance run
Error BOOL TRUE = error in function block

7.9.38 Canceling a program

Description
The function block KRC_Abort cancels all active and buffered statements and motions.

Function block KRC_Abort

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred

60 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.9.39 Stopping the robot

Description
The function block KRC_Interrupt triggers an interrupt with a BRAKE or BRAKE F statement.

If a BRAKE statement is active, no more statements are processed via the mxA interface.
The function block KRC_Abort is also no longer processed. KRC_Abort cannot cancel the
program until it has been resumed with KRC_Continue, i.e. the BRAKE statement is no
Note longer active.
While the BRAKE statement is active, the program can only be canceled by means of a
RESET of the function block KRC_AutomaticExternal.

Function block KRC_Interrupt

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
Execute BOOL The statement is executed in the case of a rising edge of the
signal.
The robot program is interrupted for as long as the input
Execute is set to TRUE.
Fast BOOL TRUE = robot stops with a STOP 1 (BRAKE F statement).
FALSE = robot stops with a STOP 2 (BRAKE statement).

Outputs

Parameter Type Description


ErrorID DINT Error number
BrakeActive BOOL TRUE = statement is active and robot is waiting for enabling
Error BOOL TRUE = error in function block

7.9.40 Continuing a program

Description
The function block KRC_Continue can be used to resume execution of a program that has been stopped by
means of an interrupt.

TC3 Robotics mxAutomation Version: 1.4 61


Programming

Function block KRC_Continue

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
Enable BOOL The statement is executed in the case of a rising
edge of the signal.
In the case of an interrupt triggered by a BRAKE
or BRAKE F statement, the program can only be
resumed when the interrupt is no longer active
and the input Enable is set to TRUE.

Outputs
Parameter Type Description
ErrorID DINT Error number
Error BOOL TRUE = error in function block

7.9.41 Automatically starting function blocks and signals

Description
The function block KRC_AutoStart controls the existing signals and function blocks in a typical sequence of
statements. The signals for activating the Automatic External interface are checked prior to starting. If one or
more signals is missing, corresponding error numbers are displayed.

The drives are activated with an edge. For this reason, the DRIVES_ON input on the func-
tion block KRC_AutomaticExternal should not be permanently activated.

Note

Function block KRC_AutoStart

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

62 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


ExecuteReset BOOL Selects the mxAutomation robot program in the
case of a rising edge of the signal and starts it.
The program is reset beforehand and all
buffered statements are aborted.

Outputs
Parameter Type Description
Busy BOOL The sequence is active but not yet completed.
Done BOOL The sequence is completed.
DispActive BOOL TRUE = robot program is active
ResetValid BOOL TRUE = conditions for a RESET at the function
block KRC_AutomaticExternal are met
Error BOOL TRUE = error in function block
ErrorID DINT Error number

TC3 Robotics mxAutomation Version: 1.4 63


Programming

7.10 Functions for activating motions


Motion instructions can only be executed in ABORTING or BUFFERED mode. If a motion is
to be approximated, the following motion must be transferred in BUFFERED mode.

Note

Further information about the basics of motion programming – motion types, orientation
control, and approximate positioning – is contained in the operating and programming in-
structions for the KUKA System Software.
Note

7.10.1 Jogging to a relative end position

Description
The function block KRC_JogLinearRelative can be used to move to a Cartesian end position with a linear
motion. The coordinates of the end position are relative to the current position. Status and Turn of the end
position are ignored, i.e. the axis positions at the end position are not unambiguously defined.

The function is always executed in ABORTING mode, i.e. all active motions and buffered statements are
canceled, the robot is braked and the linear motion is then executed.

Function block KRC_JogLinearRelative

Inputs

Parameter Type Description


Position E6POS Coordinates of the Cartesian end position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
end position (= position of the TCP relative to the origin of
the selected coordinate system).
CoordinateSystem COORDSYS  >>> "COORDSYS". [} 21]
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising edge of the
signal.

64 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
OriType INT  >>> "OriType". [} 23]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
Aborted BOOL TRUE = statement/motion has been aborted
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 65


Programming

7.10.2 Jogging to a relative end position in the TOOL coordinate


system

Description
The function block KRC_JogToolRelative can be used to move to a Cartesian end position in the TOOL
coordinate system with a linear motion. The coordinates of the end position are relative to the current
position. Status and Turn of the end position are ignored, i.e. the axis positions at the end position are not
unambiguously defined.

The function is always executed in ABORTING mode, i.e. all active motions and buffered statements are
canceled, the robot is braked and the linear motion is then executed.

Function block KRC_JogToolRelative

Inputs

Parameter Type Description


Position E6POS Coordinates of the Cartesian end position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
end position (= position of the TCP relative to the origin of
the selected coordinate system).
CoordinateSystem COORDSYS  >>> "COORDSYS". [} 21]
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
OriType INT  >>> "OriType". [} 23]

66 Version: 1.4 TC3 Robotics mxAutomation


Programming

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
Aborted BOOL TRUE = statement/motion has been aborted
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 67


Programming

7.10.3 Jogging to an end position

Description
The function block KRC_Jog can be used to move to an end position with a linear motion or a point-to-point
motion.

The function is always executed in ABORTING mode, i.e. all active motions and buffered statements are
canceled, the robot is braked and the motion is then executed.

Function block KRC_Jog

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
MoveType INT Motion type for Cartesian or axis-specific jogging
•   0: Motion type PTP (axis-specific)
•   1: Motion type LIN (Cartesian)
•   2: Motion type SPTP (axis-specific)
•   3: Motion type SLIN (Cartesian)

68 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default value: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default value: 0% (= acceleration is not changed)
CoordinateSystem COORDSYS  >>> "COORDSYS". [} 21]
Increment REAL Incremental jogging
•   > 0.0: The robot moves no more than the specified
distance. For axis-specific jogging, the maximum
distance is automatically limited to the software limit
switches. For Cartesian jogging in the A, B or C
direction, the maximum distance is limited to 90°. If
the input signal is reset before the robot has reached
the end position, the robot stops immediately.
•   ≤ 0.0: For Cartesian jogging in the X, Y or Z
direction, the maximum distance is limited to
100000 mm.
The robot motion restarts each time the input signals are
changed.
A1_X_P BOOL Motion instruction
A1_X_M BOOL The motion is started at a rising edge of the signal and
A2_Y_P BOOL stopped at a falling edge of the signal.
A2_Y_M BOOL In motion type PTP, the robot axes can be moved as far
A3_Z_P BOOL as 0.1 mm before the software limit switches. For this, the
software limit switch values are read once when the PLC
A3_Z_M BOOL is started. During operation, the software limit switches
A4_A_P BOOL can be updated via the input UpdateSoftEnd.
A4_A_M BOOL Several robot axes can be moved simultaneously. The
A5_B_P BOOL TCP can be moved along the axes of several coordinate
A5_B_M BOOL systems.
A6_C_P BOOL If the input signals are changed, the motion is stopped and
then resumed with the modified configuration. If the
A6_C_M BOOL
positive and negative motion directions are activated
E1_P BOOL simultaneously, an error number is displayed.
E1_M BOOL The inputs for axes A1 … A6 have a dual assignment with
E2_P BOOL the coordinates, e.g. A1 with X, A2 with Y, etc.
E2_M BOOL The inputs that end in "P" (e.g. A2_Y_P) move in the
E3_P BOOL positive direction. The inputs that end in "M" (e.g.
E3_M BOOL A3_Z_M) move in the negative direction.
E4_P BOOL
E4_M BOOL
E5_P BOOL
E5_M BOOL
E6_P BOOL
E6_M BOOL

TC3 Robotics mxAutomation Version: 1.4 69


Programming

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
Aborted BOOL TRUE = statement/motion has been aborted
Error BOOL TRUE = error in function block

7.11 Functions for activating motions (PLC OPEN-


compliant)
The MC function blocks described below differ from the KRC function blocks in that they correspond to the
PLC OPEN standard or are closer to it.

For information on the frequently used signals in the MC function blocks, see >>> "Fre-
quently used input/output signals in the MC function blocks". [} 18]

Note

7.11.1 Moving to a Cartesian position with a LIN motion

Description
The function block MC_MoveLinearAbsolute is used to execute a linear motion to a Cartesian end position.
The coordinates of the end position are absolute.

Function block MC_MoveLinearAbsolute

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
Execute BOOL Starts/buffers the motion in the case of a rising edge of the
signal.

70 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


Position E6POS Coordinates of the Cartesian end position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
end position (= position of the TCP relative to the origin of
the BASE coordinate system).
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
CoordinateSystem COORDSYS Coordinate system to which the Cartesian coordinates of
the end position refer
 >>> "COORDSYS". [} 21]
Note: In the case of a LIN motion, the Cartesian
coordinates always refer to the BASE coordinate system.
OriType INT  >>> "OriType". [} 23]
Approximate APO  >>> "APO". [} 20]
QueueMode INT  >>> "QueueMode". [} 23]

Outputs
Parameter Type Description
ComDone BOOL TRUE = statement was completely transferred
and confirmed by the robot controller.
ComBusy BOOL TRUE = statement is currently being transferred
and has not yet been confirmed by the robot
controller.
Busy BOOL TRUE = function block has not yet been
executed completely.
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
CommandAbor BOOL TRUE = statement/motion has been aborted
ted
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.11.2 Moving to a Cartesian position with a LIN_REL motion

Description
The function block MC_MoveLinearRelative is used to execute a linear motion to a Cartesian end position.
The coordinates of the end position are relative to the current position.

TC3 Robotics mxAutomation Version: 1.4 71


Programming

A REL statement always refers to the current position of the robot. For this reason, if a REL
motion is interrupted, the robot executes the entire REL motion again, starting from the po-
sition at which it was interrupted.
Note

Function block MC_MoveLinearRelative

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
Execute BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
Position E6POS Coordinates of the Cartesian end position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
end position (= position of the TCP relative to the origin of
the selected coordinate system).
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
CoordinateSystem COORDSYS Coordinate system to which the Cartesian coordinates of
the end position refer
 >>> "COORDSYS". [} 21]
Note: In the case of a LIN_REL motion, the Cartesian
coordinates can refer to the BASE or TOOL coordinate
system.
OriType INT  >>> "OriType". [} 23]
Approximate APO  >>> "APO". [} 20]
QueueMode INT  >>> "QueueMode". [} 23]

72 Version: 1.4 TC3 Robotics mxAutomation


Programming

Outputs
Parameter Type Description
ComDone BOOL TRUE = statement was completely transferred
and confirmed by the robot controller.
ComBusy BOOL TRUE = statement is currently being transferred
and has not yet been confirmed by the robot
controller.
Busy BOOL TRUE = function block has not yet been
executed completely.
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
CommandAbor BOOL TRUE = statement/motion has been aborted
ted
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.11.3 Moving to a Cartesian position with a PTP motion

Description
The function block MC_MoveDirectAbsolute executes a point-to-point motion to a Cartesian end position.
The coordinates of the end position are absolute.

Function block MC_MoveDirectAbsolute

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
Execute BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
Position E6POS Coordinates of the Cartesian end position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
end position (= position of the TCP relative to the origin of
the BASE coordinate system).
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0%

TC3 Robotics mxAutomation Version: 1.4 73


Programming

Parameter Type Description


Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
CoordinateSystem COORDSYS Coordinate system to which the Cartesian coordinates of
the end position refer
 >>> "COORDSYS". [} 21]
Note: In the case of a PTP motion, the Cartesian
coordinates always refer to the BASE coordinate system.
Approximate APO  >>> "APO". [} 20]
QueueMode INT  >>> "QueueMode". [} 23]

Outputs
Parameter Type Description
ComDone BOOL TRUE = statement was completely transferred
and confirmed by the robot controller.
ComBusy BOOL TRUE = statement is currently being transferred
and has not yet been confirmed by the robot
controller.
Busy BOOL TRUE = function block has not yet been
executed completely.
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
CommandAbor BOOL TRUE = statement/motion has been aborted
ted
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.11.4 Moving to a Cartesian position with a PTP_REL motion

Description
The function block MC_MoveDirectRelative executes a point-to-point motion to a Cartesian end position. The
coordinates of the end position are relative to the current position.

A REL statement always refers to the current position of the robot. For this reason, if a REL
motion is interrupted, the robot executes the entire REL motion again, starting from the po-
sition at which it was interrupted.
Note

74 Version: 1.4 TC3 Robotics mxAutomation


Programming

Function block MC_MoveDirectRelative

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
Execute BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
Position E6POS Coordinates of the Cartesian end position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
end position (= position of the TCP relative to the origin of
the selected coordinate system).
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
CoordinateSystem COORDSYS Coordinate system to which the Cartesian coordinates of
the end position refer
 >>> "COORDSYS". [} 21]
Note: In the case of a PTP_REL motion, the Cartesian
coordinates always refer to the BASE coordinate system.
Approximate APO  >>> "APO". [} 20]
QueueMode INT  >>> "QueueMode". [} 23]

Outputs
Parameter Type Description
ComDone BOOL TRUE = statement was completely transferred
and confirmed by the robot controller.
ComBusy BOOL TRUE = statement is currently being transferred
and has not yet been confirmed by the robot
controller.

TC3 Robotics mxAutomation Version: 1.4 75


Programming

Parameter Type Description


Busy BOOL TRUE = function block has not yet been
executed completely.
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
CommandAbor BOOL TRUE = statement/motion has been aborted
ted
Error BOOL TRUE = error in function block
ErrorID DINT Error number

76 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.11.5 Moving to an axis-specific position with a PTP motion

Description
The function block MC_MoveAxisAbsolute is used to execute a point-to-point motion to an axis-specific end
position. The axis positions are absolute.

Function block MC_MoveAxisAbsolute

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
Execute BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
AxisPosition E6AXIS Axis-specific end position
 >>> "E6AXIS". [} 21]
The data structure E6Axis contains the angle values or
translation values for all axes of the axis group in the end
position.
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine data.
The maximum value depends on the robot type and the
selected operating mode.
Default: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine data.
The maximum value depends on the robot type and the
selected operating mode.
Default: 0% (= acceleration is not changed)
Approximate APO  >>> "APO". [} 20]
QueueMode INT  >>> "QueueMode". [} 23]

Outputs
Parameter Type Description
ComDone BOOL TRUE = statement was completely transferred
and confirmed by the robot controller.
ComBusy BOOL TRUE = statement is currently being transferred
and has not yet been confirmed by the robot
controller.

TC3 Robotics mxAutomation Version: 1.4 77


Programming

Parameter Type Description


Busy BOOL TRUE = function block has not yet been
executed completely.
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
CommandAbor BOOL TRUE = statement/motion has been aborted
ted
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.11.6 Moving to a Cartesian position with a CIRC motion

Description
The function block MC_MoveCircularAbsolute executes a circular motion to a Cartesian end position. In
order for the robot controller to be able to calculate the circular motion, an auxiliary position must be
specified in addition to the end position.

The coordinates of the auxiliary position and end position are absolute. The auxiliary position cannot be
approximated. The motion always stops exactly at this point.

Function block MC_MoveCircularAbsolute

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
Execute BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
Position E6POS Coordinates of the Cartesian end position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
end position (= position of the TCP relative to the origin of
the BASE coordinate system).
CircHP E6POS Coordinates of the Cartesian auxiliary position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
auxiliary position (= position of the TCP relative to the
origin of the BASE coordinate system).

78 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


Angle REAL Circular angle (= overall angle of the circular motion)
The circular angle makes it possible to extend the motion
beyond the programmed end point or to shorten it. The
actual end point thus no longer corresponds to the
programmed end point.
The circular angle is not limited, i.e. a circular angle
greater than ±360° can be specified:
•   > 0.0°: In the case of a positive angle, the motion is
carried out from the start point via CircHP towards
Position.
•   < 0.0°: In the case of a negative angle, the motion
is carried out from the start point via Position
towards CircHP.
•   = 0.0°: The circular angle is ignored. End position is
Position. The radius of the circle is calculated on the
basis of the start position, CircHP and Position.
Default: 0.0°
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
CoordinateSystem COORDSYS Coordinate system to which the Cartesian coordinates of
the auxiliary or end position refer
 >>> "COORDSYS". [} 21]
Note: In the case of a CIRC motion, the Cartesian
coordinates always refer to the BASE coordinate system.
OriType INT  >>> "OriType". [} 23]
CircType INT  >>> "CircType". [} 23]
Approximate APO  >>> "APO". [} 20]
QueueMode INT  >>> "QueueMode". [} 23]

Outputs
Parameter Type Description
ComDone BOOL TRUE = statement was completely transferred
and confirmed by the robot controller.
ComBusy BOOL TRUE = statement is currently being transferred
and has not yet been confirmed by the robot
controller.
Busy BOOL TRUE = function block has not yet been
executed completely.
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped

TC3 Robotics mxAutomation Version: 1.4 79


Programming

Parameter Type Description


CommandAbor BOOL TRUE = statement/motion has been aborted
ted
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.11.7 Moving to a Cartesian position with a CIRC_REL motion

Description
The function block MC_MoveCircularRelative executes a circular motion to a Cartesian end position. In order
for the robot controller to be able to calculate the circular motion, an auxiliary position must be specified in
addition to the end position.

The coordinates of the auxiliary position and end position are relative to the current position (= start position
of the circular motion). The auxiliary position cannot be approximated. The motion always stops exactly at
this point.

A REL statement always refers to the current position of the robot. For this reason, if a REL
motion is interrupted, the robot executes the entire REL motion again, starting from the po-
sition at which it was interrupted.
Note

Function block MC_MoveCircularRelative

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
Execute BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
Position E6POS Coordinates of the Cartesian end position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
end position (= position of the TCP relative to the origin of
the BASE coordinate system).

80 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


CircHP E6POS Coordinates of the Cartesian auxiliary position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
auxiliary position (= position of the TCP relative to the
origin of the BASE coordinate system).
Angle REAL Circular angle (= overall angle of the circular motion)
The circular angle makes it possible to extend the motion
beyond the programmed end point or to shorten it. The
actual end point thus no longer corresponds to the
programmed end point.
The circular angle is not limited, i.e. a circular angle
greater than ±360° can be specified:
•   > 0.0°: In the case of a positive angle, the motion is
carried out from the start point via CircHP towards
Position.
•   < 0.0°: In the case of a negative angle, the motion
is carried out from the start point via Position
towards CircHP.
•   = 0.0°: The circular angle is ignored. End position is
Position. The radius of the circle is calculated on the
basis of the start position, CircHP and Position.
Default: 0.0°
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
CoordinateSystem COORDSYS Coordinate system to which the Cartesian coordinates of
the auxiliary or end position refer
 >>> "COORDSYS". [} 21]
Note: In the case of a CIRC_REL motion, the Cartesian
coordinates always refer to the BASE coordinate system.
OriType INT  >>> "OriType". [} 23]
CircType INT  >>> "CircType". [} 23]
Approximate APO  >>> "APO". [} 20]
QueueMode INT  >>> "QueueMode". [} 23]

Outputs
Parameter Type Description
ComDone BOOL TRUE = statement was completely transferred
and confirmed by the robot controller.
ComBusy BOOL TRUE = statement is currently being transferred
and has not yet been confirmed by the robot
controller.

TC3 Robotics mxAutomation Version: 1.4 81


Programming

Parameter Type Description


Busy BOOL TRUE = function block has not yet been
executed completely.
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
CommandAbor BOOL TRUE = statement/motion has been aborted
ted
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.12 Diagnostic functions

7.12.1 Reading the current state of the mxA interface

Description
The function block KRC_ReadMXAStatus reads the current state of the mxA interface.

Function block KRC_ReadMXAStatus

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
Status INT  >>> "Status". [} 23]
ErrorID DINT Error number
Error BOOL TRUE = error in function block

7.12.2 Reading error messages of the mxA interface

Description
The function block KRC_ReadMXAError is used to read the current error state of an axis group. Only error
messages generated by the mxA interface are displayed.

Function block KRC_ReadMXAError

82 Version: 1.4 TC3 Robotics mxAutomation


Programming

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
ErrorID DINT Error number
Error BOOL TRUE = error in function block

7.12.3 Resetting error messages of the mxA interface

Description
The function block KRC_MessageReset resets the current error state of an axis group. Only error messages
generated by the mxA interface are reset.

Error messages from the robot controller are reset by means of the function block KRC_AutomaticExternal
(input CONF_MESS).

Messages can only be reset if the robot is stationary.

Note

Function block KRC_MessageReset

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
MessageReset BOOL TRUE = reset message

Outputs
Parameter Type Description
ErrorID DINT Error number
Error BOOL TRUE = error in function block

7.12.4 Reading error messages of the robot controller

Description
The function block KRC_ReadKRCError reads the current error state of the robot controller. Only error
messages generated by the robot controller are displayed.

TC3 Robotics mxAutomation Version: 1.4 83


Programming

Error messages from the robot controller are reset by means of the function block KRC_AutomaticExternal
(input CONF_MESS).

Messages can only be reset if the robot is stationary.

Note

Function block KRC_ReadKRCError

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
Offset INT If there are more than 10 messages in the message buffer, the
desired start index of the message buffer can be selected using
the offset.
Example: If there are 15 messages in the message buffer, the
offset must be 6 in order to read messages 6 to 15.

Outputs

Parameter Type Description


ErrorID DINT Error number
MessageCount INT Number of messages in the message buffer
Message1 … DINT The numbers of up to 10 messages in the message buffer can be
Message10 output.
Done BOOL TRUE = data are valid
Error BOOL TRUE = error in function block
STOPMESS BOOL TRUE = safety circuit is interrupted (robot fault)

84 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.12.5 Reading diagnostic signals

Description
The function block KRC_Diag reads the diagnostic signals of the robot controller.

The function block may only be instanced once per axis group. In the case of multiple in-
stancing, the signals of the most recently called function block are output.

Note

Function block KRC_Diag

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ShowTrace BOOL TRUE = activate display of the active function blocks in the
message window of the KUKA smartHMI.
FALSE = deactivate display of the active function blocks in the
message window of the KUKA smartHMI.
Note: Only activate the display for test and diagnostic purposes. If
the display is active, approximate positioning is no longer possible
and the cycle time of the submit interpreter is adversely affected.
MaxSubmitCycle INT Maximum cycle time of the submit interpreter
Default: 1 000 ms
Note: If the maximum cycle time is exceeded, the
$MOVE_ENABLE signal for motion enable is reset.

TC3 Robotics mxAutomation Version: 1.4 85


Programming

Outputs

Parameter Type Description


QueueCount INT Number of buffered statements
•   1 … 90
SubmitHeartbeat INT Heartbeat signal of the submit interpreter (counter is
incremented by 1 every Submit cycle)
•   1 … 245
SubmitCyc_Act REAL Current cycle time of the submit interpreter; unit: ms
Mean value over 1,000 ms = 1/number of cycles per second
SubmitCyc_Min REAL Shortest cycle time of the submit interpreter since the last
broken connection; unit: ms
SubmitCyc_Max REAL Longest cycle time of the submit interpreter since the last
broken connection; unit: ms
SubmitCyc_Avg INT Mean value of the cycle time of the submit interpreter during the
calculation period Avg_Duration; unit: ms
Avg_Duration DINT Duration of the current calculation period for the mean value of
the cycle time; unit: ms
The calculation period is restarted after a break in the
connection to the submit interpreter or, at the latest, after 60
minutes.
ProconosHeartbeat INT Life sign from ProConOS (counter is incremented by 1 every
ProConOS cycle)
ProconosCyc_Act INT Current cycle time of ProConOS; unit: ms
Mean value over 1,000 ms = 1/number of cycles per second
ProconosCyc_Min INT Shortest cycle time of ProConOS since the last broken
connection; unit: ms
ProconosCyc_Max INT Longest cycle time of ProConOS since the last broken
connection; unit: ms
ProconosCyc_Avg INT Mean value of the cycle time of ProConOS during the
calculation period Avg_Duration; unit: ms
ActivePosOrderID DINT Order ID of the KRC_Move motion command that is currently
being executed
ActiveOrderIDB DINT Order ID of the current KRC_Move motion command in the
advance run
ErrorID_RI DINT Robot interpreter error number
ErrorID_SI DINT Submit interpreter error number
ErrorID_PLC DINT PLC error number
ErrorID_PCOS DINT ProConOS error number
ErrorID DINT Error number
Valid BOOL TRUE = data are valid
PosActValid BOOL TRUE = position data are valid (BCO)
BrakeActive BOOL TRUE = robot is stopped by means of a BRAKE statement
Error BOOL TRUE = error in function block

86 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.12.6 Reading and acknowledging error states

Description
The function block KRC_Error collectively reads and acknowledges the current error state of the mxA
interface, the error state of the robot controller and the error state of the function blocks.

If more than one error has occurred in the function block at the same time, only the error number of the most
recent error is displayed. Errors in a function block cause the motion enable to be canceled.

If more than one error has occurred at the same time, these errors are displayed with the following priority
ranking:

1.   Errors of the mxA interface in the robot interpreter

2.   Errors of the mxA interface in the submit interpreter

3.   ProConOS errors

4.   Errors in the PLC

5.   Errors in a function block of the local PLC

6.   Errors in the robot controller

The function block KRC_Error contains all diagnostic function blocks, which means that this block displays
all important diagnostic data.

The $STOPMESS signal can only be reset if there is no error and the drives are switched
on. The drives must therefore be activated with the DRIVES_ON signal via the function
block KRC_Error. The drives are activated with an edge. For this reason, the DRIVES_ON
Note input on the function block KRC_AutomaticExternal should not be permanently activated.

Function block KRC_Error

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5

TC3 Robotics mxAutomation Version: 1.4 87


Programming

Parameter Type Description


MessageReset BOOL Resets error messages of the mxA interface and the robot
controller via the function block KRC_AutomaticExternal (input
CONF_MESS). Activates the drives.
TRUE = reset message
Note: The messages can only be reset if the robot is
stationary.

Outputs

Parameter Type Description


Error BOOL TRUE = error in function block
ErrorID INT Error number
NoHeartbeatKRC BOOL The submit interpreter is not sending a life sign
NoHeartbeatPCOS BOOL ProConOS is not sending a life sign
NotOnline BOOL No connection to robot controller
NotInitialized BOOL No statements can be executed, as the connection has not
been initialized.
NoOpModeExt BOOL Robot is not in Automatic External mode
NoMoveEnable BOOL No motion enable present.
UserSafeNotOK BOOL The operator safety is violated. The $USER_SAF signal of the
Automatic External interface is not active.
KrcErrorActive BOOL Error messages of the robot controller are active. The
$STOPMESS signal of the Automatic External interface is
active.
DrivesNotReady BOOL The drives are not ready. The $PERI_RDY signal of the
Automatic External interface is not active.
NoProgActive BOOL The robot program is not active. The $PRO_ACT signal of the
Automatic External interface is not active.

88 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.13 Special functions

7.13.1 Reading system variables

Description
The function block KRC_ReadSysVar reads a system variable. This function is executed in the Submit
interpreter.

Function block KRC_ReadSysVar

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.
Index INT Index of the system variable
•   1: $ADVANCE

So far, only the system variable $ADVANCE can be read. If required for the customer-spe-
cific application, the list of readable system variables can be expanded by KUKA.

Note

Outputs
Parameter Type Description
Value1 … REAL Value of the system variable
Value10 If the system variable is a structure type, up to
10 components of the structure can be read.
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 89


Programming

7.13.2 Writing system variables

Description
The function block KRC_WriteSysVar writes a system variable.

Function block KRC_WriteSysVar

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising edge of the
signal.
Index INT Index of the system variable
•   1: $ADVANCE
Value1 … Value10 REAL Value of the system variable
If the system variable is a structure type, up to 10 components
of the structure can be written.
Continue BOOL TRUE = write to system variable without advance run stop
Note: Only possible for specific system variables.
BufferMode INT  >>> "BufferMode". [} 22]

So far, only the system variable $ADVANCE can be written. If required for the customer-
specific application, the list of writable system variables can be expanded by KUKA.

Note

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed

90 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 91


Programming

7.13.3 Calling a brake test

Description
The function block KRC_BrakeTest calls the program for the brake test. The brake test is started at the
position at which the robot is located when the program is called.

The brake test must be performed with a program override of 100% (function block
KRC_SetOverride).

Note

During the brake test, all brakes are checked to see whether the wear limit has been reached. For this
purpose, the robot accelerates to a defined velocity limit. Once the robot has reached the velocity, the brake
is applied and the result for this braking operation is displayed.

If the brake test is successful, the robot is located back at the start position at the end of the measurement.

If the brake test fails, i.e. a brake has been identified as being defective, the robot moves directly to a parking
position. The coordinates of the parking position must be specified in the function block.

Parking position
The parking position must be selected in a position where no persons are endangered if the robot sags
because of the defective brake. The transport position, for example, can be selected as the parking position.

Further information about the transport position is contained in the robot operating or as-
sembly instructions.

Note

Detailed information about the brake test is contained in the documentation by KUKA.

Note

Function block KRC_BrakeTest

Inputs

92 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


ParkPosition E6POS Coordinates of the Cartesian parking position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
parking position (= position of the TCP relative to the origin
of the selected coordinate system).
ParkCoordinateSy COORDSYS  >>> "COORDSYS". [} 21]
stem
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
ParkVelocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)
ParkAcceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
BufferMode INT  >>> "BufferMode". [} 22]

Outputs

Parameter Type Description


Result DINT Result of the brake test
•   0: brake test failed (brake identified as defective or no
connection to robot controller)
•   1: brake test successful (no brake defective, but at least
one brake has reached the wear limit)
•   2: brake test successful (no brake defective or reached
wear limit)
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred or has already
been transferred
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
Aborted BOOL TRUE = statement/motion has been aborted
Error BOOL TRUE = error in function block

7.13.4 Calling a mastering test

Description
The function block KRC_MasRef is used to execute the mastering test.

TC3 Robotics mxAutomation Version: 1.4 93


Programming

After the function block has been called, the robot moves in a linear direction from the current position to the
reference position. Once the robot has reached the reference position, the current axis values are compared
with the axis values which have been saved in KUKA.SafeOperation. The robot then moves back to the start
position (= position before the function block was called).

The reference position is defined in the function block with the input parameter Position
and corresponds to the reference position defined with KUKA.SafeOperation.

Note

If the deviation between the current position and the reference position is too great, the mastering test has
failed.

Detailed information about the mastering test can be found in the documentation
KUKA.SafeOperation.

Note

Function block KRC_MasRef

Inputs

Parameter Type Description


Position E6POS Coordinates of the Cartesian reference position
 >>> "E6POS". [} 21]
The data structure E6POS contains all components of the
reference position (= position of the TCP relative to the
origin of the selected coordinate system).
CoordinateSystem COORDSYS  >>> "COORDSYS". [} 21]
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising edge of the
signal.
Velocity INT Velocity
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= velocity is not changed)

94 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


Acceleration INT Acceleration
•   0 … 100 %
Refers to the maximum value specified in the machine
data. The maximum value depends on the robot type and
the selected operating mode.
Default: 0% (= acceleration is not changed)
BufferMode INT  >>> "BufferMode". [} 22]

Outputs

Parameter Type Description


ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred or has already
been transferred
Active BOOL TRUE = motion is currently being executed
Done BOOL TRUE = motion has stopped
Aborted BOOL TRUE = statement/motion has been aborted
Error BOOL TRUE = error in function block
MasRefRequest BOOL TRUE = mastering test has been requested internally by the
robot controller.

7.13.5 Reading the safety controller signals

Description
The function block KRC_ReadSafeOPStatus reads signals of the safety controller. (Only relevant if
KUKA.SafeOperation is installed.)

Function block KRC_ReadSafeOPStatus

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
MASTERINGTEST_REQ_EXT BOOL TRUE = mastering test requested by the PLC.
BRAKETEST_REQ_EXT BOOL TRUE = brake test requested by the PLC.

TC3 Robotics mxAutomation Version: 1.4 95


Programming

Outputs

Parameter Type Description


ErrorID DINT Error number
Valid BOOL TRUE = data are valid
BRAKETEST_REQ_INT BOOL TRUE = brake test requested by the safety
controller.
MASTERINGTEST_REQ_INT BOOL TRUE = mastering test requested by the safety
controller.
BRAKETEST_MONTIME BOOL TRUE = robot was stopped due to elapsed brake
test monitoring time.
BRAKETEST_WORK BOOL TRUE = brake test is currently being performed
BRAKES_OK BOOL Edge TRUE --> FALSE: A brake has been
identified as defective.
BRAKETEST_WARN BOOL Edge FALSE --> TRUE: At least 1 brake has been
detected as having reached the wear limit.
MASTERINGTESTSWITCH_OK BOOL TRUE = reference switch is OK.
Error BOOL TRUE = error in function block

7.13.6 Reading the state of the TouchUp status keys

Description
The function block KRC_ReadTouchUPState reads the current state of the TouchUp status keys on the
smartPAD. In order to be able to teach points using the status keys on the smartPAD, the function block
must be linked to the function block KRC_TouchUP.

Function block KRC_ReadTouchUPState

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
Index INT Number selected using the status key on the
smartPAD to teach a position
•   1 … 100
ErrorID DINT Error number
Valid BOOL TRUE = data are valid
TouchUP BOOL State of the TouchUp status key on the
smartPAD
TRUE = TouchUp status key has been pressed.
Error BOOL TRUE = error in function block

96 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.13.7 Teaching points

Description
The function block KRC_TouchUP can be used to teach a point directly in the PLC. Tool, base and
interpolation mode of this point are automatically set by the function block.

Function block KRC_TouchUP

Memory

Parameter Type Description


PositionArray Array[100] List of the taught positions

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL TRUE = the point is taught.
Index INT Number under which the taught point is saved in
the PLC
•   1 … 100

Outputs
Parameter Type Description
ErrorID DINT Error number
Done BOOL TRUE = statement has been executed
Error BOOL TRUE = error in function block

7.13.8 Modifying settings for the advance run

Description
The settings for the advance run are modified using the function block KRC_SetAdvance.

The advance run is the maximum number of motion blocks that the robot controller calculates and plans in
advance during program execution. The actual number is dependent on the capacity of the computer. The
advance run is required, for example, in order to be able to calculate approximate positioning motions.

If the program execution is reset, the set values are reset to the default values.

Note

TC3 Robotics mxAutomation Version: 1.4 97


Programming

Function block KRC_SetAdvance

Inputs

Parameter Type Description


AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is buffered in the case of a rising edge of the
signal.
Count INT Number of functions to be transferred before the first robot
motion
•   1 … 50
Default value: 2
MaxWaitTime INT Maximum wait time before the beginning of program execution
if the set number of functions is not reached in the parameter
count.
•   1 … 60 000 ms
Default value: 300 ms
Mode INT Wait mode
•   0: The currently set mode is not changed.
•   1: If the first instruction is an approximated motion
instruction, the system waits for further instructions.
•   2: The system always waits for the number of set
functions or for the maximum wait time to elapse.
Default value: 1
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
Busy BOOL TRUE = statement has been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement has been aborted
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.13.9 Reading values from KRC_SetAdvance

Description
Function block KRC_GetAdvance reads the values that have been set in the function block
KRC_SetAdvance.

98 Version: 1.4 TC3 Robotics mxAutomation


Programming

Function block KRC_GetAdvance

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL The statement is executed in the case of a rising
edge of the signal.

Outputs

Parameter Type Description


Done BOOL TRUE = statement has been executed
Count INT Number of functions to be transferred before the first robot motion
•   1 … 50
Default value: 2
MaxWaitTime INT Maximum wait time before the beginning of program execution if the
set number of functions is not reached in the parameter count.
•   1 … 60 000 ms
Default value: 300 ms
Mode INT Wait mode
•   0: The currently set mode is not changed.
•   1: If the first instruction is an approximated motion
instruction, the system waits for further instructions.
•   2: The system always waits for the number of set functions
or for the maximum wait time to elapse.
Default value: 1
Error BOOL TRUE = error in function block
ErrorID DINT Error number

TC3 Robotics mxAutomation Version: 1.4 99


Programming

7.13.10 Calculating the Cartesian robot position from the axis angles

Description
The function block KRC_Forward uses specified axis angles to calculate the Cartesian robot position. The
function block can only be executed by the robot interpreter.

Function block KRC_Forward

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the statement at a rising edge of
the signal.
Axis_Values E6AXIS Axis-specific values that are to be converted to
Cartesian coordinates
The data structure E6AXIS contains the angle
values or translation values for all axes of the
axis group in this position.
CheckSoftEnd BOOL Checks whether the specified axis angles lie
within the software limit switches. If not, an error
number is displayed.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Position E6POS Cartesian robot position calculated from the
specified axis angles
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.13.11 Calculating axis angles from the Cartesian robot position

Description
The function block KRC_Inverse uses a specified Cartesian robot position to calculate the axis angles. The
function block can only be executed by the robot interpreter.

100 Version: 1.4 TC3 Robotics mxAutomation


Programming

Function block KRC_Inverse

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the statement at a rising edge of
the signal.
Position E6POS Cartesian robot position
PosValidS BOOL TRUE = The Status value contained in the
Position parameter is valid.
FALSE = The Status value is unknown.
PosValidT BOOL TRUE = The Turn value contained in the
Position parameter is valid.
FALSE = The Turn value is unknown.
Start_Axis E6Axis Axis-specific values at the start point of the
motion
The start point is the axis-specific position from
which the robot moves to the position that is to
be calculated.
CheckSoftEnd BOOL Checks whether the values from the Start_Axis
parameter lie within the software limit switches.
If not, an error number is displayed.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
AxisPosition E6AXIS Axis angles that have been calculated from the
specified Cartesian robot position
The data structure E6AXIS contains all the axis
positions of the axis group.
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block
ErrorID DINT Error number

TC3 Robotics mxAutomation Version: 1.4 101


Programming

7.13.12 Initializing a conveyor

Description
The function block KRC_ConvIniOff is used to initialize a conveyor. The AMI is set to the state #INITIALIZED
and the conveyor distance to 0.

Function block KRC_ConvIniOff

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
ConveyorNumb INT Number of the conveyor
er •  1…3
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

102 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.13.13 Activating a conveyor

Description
The function block KRC_ConvOn activates the AMI, i.e. sets it to the #ACTIVE state. If the AMI is activated,
the synchronization signals at the input of interface X33 (Fast Measurement) are evaluated.

The conveyor offset can be detected out in the background leaving the robot controller free to perform other
tasks. This allows the robot to carry out on-the-fly tracking of a part on the conveyor.

Function block KRC_ConvOn

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
ConveyorNumb INT Number of the conveyor
er •  1…3
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.13.14 Tracking a workpiece on the conveyor

Description
The function block KRC_ConvFollow enables the robot to follow a workpiece on the conveyor.
KRC_ConvFollow can be used to define a range on the conveyor in which the robot starts to track the
workpiece.

If the workpiece has already exceeded the maximum conveyor distance (input MaxDistance) when the
function block is called, the output MaxDistanceReached is set.

This function block can only be executed if the AMI has been activated using KRC_Con-
vOn.

Note

TC3 Robotics mxAutomation Version: 1.4 103


Programming

Function block KRC_ConvFollow

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
ConveyorNumb INT Number of the conveyor
er •  1…3
StartDistance REAL Distance traveled by the workpiece while the
robot waits before starting to track the workpiece
on the conveyor.
•   In the case of a linear conveyor:
Specification in millimeters
•   In the case of a circular conveyor:
Specification in degrees
MaxDistance REAL Maximum distance traveled by the workpiece
before the robot starts to synchronize itself with
the workpiece.
•   In the case of a linear conveyor:
Specification in millimeters
•   In the case of a circular conveyor:
Specification in degrees
Note: This input is not monitored during
synchronized motions of the conveyor. The
distance covered by the workpiece is monitored
by an interrupt. The corresponding settings are
made in WorkVisual.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement has been aborted
MaxDistanceR BOOL TRUE = the maximum distance traveled by the
eached workpiece (input MaxDistance) was already
exceeded at the time of execution. The
statement was not executed. Execution of the
program is stopped (WAIT FOR FALSE) and is
waiting for the program to be aborted.
Error BOOL TRUE = error in function block

104 Version: 1.4 TC3 Robotics mxAutomation


Programming

Parameter Type Description


ErrorID DINT Error number

7.13.15 Picking up a workpiece from the conveyor

Description
The function block KRC_ConvSkip is used to determine which workpieces are to be picked up, e.g. every
second workpiece, every third workpiece, etc. A total of up to 1024 workpieces can be monitored in the
background.

If the workpiece has already exceeded the maximum conveyor distance (input MaxDistance) when the
function block is called, the output MaxDistanceReached is set.

This function block can only be executed if the AMI has been activated using KRC_Con-
vOn.

Note

Function block KRC_ConvSkip

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
ConveyorNumb INT Number of the conveyor
er •  1…3
PieceNumber INT The number entered specifies which workpieces
are to be picked up.
Examples:
•   1: Every workpiece is picked up.
•   3: Every 3rd workpiece is picked up.
•   5: Every 5th workpiece is picked up.
StartDistance REAL Distance traveled by the workpiece while the
robot waits before starting to track the workpiece
on the conveyor.
•   In the case of a linear conveyor:
Specification in millimeters
•   In the case of a circular conveyor:
Specification in degrees

TC3 Robotics mxAutomation Version: 1.4 105


Programming

Parameter Type Description


MaxDistance REAL Maximum distance traveled by the workpiece
before the robot starts to synchronize itself with
the workpiece.
•   In the case of a linear conveyor:
Specification in millimeters
•   In the case of a circular conveyor:
Specification in degrees
Note: This input is not monitored during
synchronized motions of the conveyor. The
distance covered by the workpiece is monitored
by an interrupt. The corresponding settings are
made in WorkVisual.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement has been aborted
MaxDistanceR BOOL TRUE = the maximum distance traveled by the
eached workpiece (input MaxDistance) was already
exceeded at the time of execution. The
statement was not executed. Execution of the
program is stopped (WAIT FOR FALSE) and is
waiting for the program to be aborted.
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.13.16 Activating interrupts for monitoring

Description
The function block KRC_ActivateConvInterrupt activates the following interrupts:
•   Alarm distance monitoring
•   Maximum distance monitoring
•   $STOPMESS error monitoring

An interrupt cannot be processed until the interrupt has been activated by the main run of the robot
interpreter.

The monitoring functions are activated by the function blocks KRC_ConvFollow and KRC_ConvSkip insofar
as these have been successfully synchronized with a workpiece. Calling this function block is only necessary
if the monitoring function is to be ended and reactivated.

Function block KRC_ActivateConvInterrupt

106 Version: 1.4 TC3 Robotics mxAutomation


Programming

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
ConveyorNumb INT Number of the conveyor
er •  1…3
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 107


Programming

7.13.17 Deactivating interrupts for monitoring

Description
The function block KRC_DeactivateConvInterrupt deactivates the following interrupts:
•   Alarm distance monitoring
•   Maximum distance monitoring
•   $STOPMESS error monitoring

It is advisable to call this function block if leaving the conveyor area, or if monitoring is not
desired.

Note

Function block KRC_DeactivateConvInterrupt

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
ConveyorNumb INT Number of the conveyor
er •  1…3
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.13.18 Activating a motion along a vector

Description
The function block KRC_VectorMoveOn is used to move a robot along a defined vector in Cartesian space.
Here, the robot is moved by an external force.

108 Version: 1.4 TC3 Robotics mxAutomation


Programming

Function block KRC_VectorMoveOn

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
X REAL Defines the direction of the vector
Y REAL The vector must be specified in relation to the
Z REAL TCP of the TOOL coordinate system. The last
taught point before the function block is called is
A REAL
the root point of the vector.
B REAL
Limits:
C REAL
•   Translational motion (X, Y, Z): max.
200 mm in the positive and negative
directions
•   Rotational motion (A, B, C): max. 30° in
the positive and negative directions
VectorLimit REAL Permissible vector length limit; unit: %
If this value is exceeded, the robot is stopped
with ramp-down braking.
MaxDuration REAL Length of time after which VectorMove is
deactivated if an error has occurred
TorqueOffsetV REAL Defines the resistance torque of the robot
alue The resistance torque is the torque with which
the robot acts against the external force. It has
the effect that the robot only begins to move
when a specific amount of force is exerted.
The resistance torque can be defined in addition
to the holding torque. The holding torque
depends on the robot position, type, size and
additional load.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed

TC3 Robotics mxAutomation Version: 1.4 109


Programming

Parameter Type Description


Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.13.19 Deactivating KRC_VectorMoveOn

Description
The function block KRC_VectorMoveOff is used to deactivate the function block KRC_VectorMoveOn.

Function block KRC_VectorMoveOff

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

110 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.13.20 Configuring Cartesian workspaces

Description
The function block KRC_WriteWorkspace is used to configure Cartesian (= cubic) workspaces for the robot.
Workspaces serve to protect the system. A maximum of 8 Cartesian workspaces can be configured at any
one time. The workspaces may overlap.

Function block KRC_WriteWorkspace

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
WorkspaceNo INT Number of workspace
•  1…8
WorkspaceMod INT Mode for workspaces
e •   0: #OFF
•   1: #INSIDE
•   2: #OUTSIDE
•   3: #INSIDE_STOP
•   4: #OUTSIDE_STOP
Note: Further information about the mode for
workspaces is contained in the operating and
programming instructions for the KUKA System
Software (KSS).
WorkspaceDat BOX  >>> "Data of a Cartesian workspace". [} 24]
a
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 111


Programming

7.13.21 Reading the configuration of Cartesian workspaces

Description
The function block KRC_ReadWorkspace reads the configuration of the Cartesian workspaces for the robot.

Function block KRC_ReadWorkspace

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
WorkspaceNo INT Number of workspace
•  1…8

Outputs
Parameter Type Description
Done BOOL TRUE = statement has been executed
WorkspaceMod INT Mode for workspaces
e •   0: #OFF
•   1: #INSIDE
•   2: #OUTSIDE
•   3: #INSIDE_STOP
•   4: #OUTSIDE_STOP
Note: Further information about the mode for
workspaces is contained in the operating and
programming instructions for the KUKA System
Software (KSS).
WorkspaceDat BOX  >>> "Data of a Cartesian workspace". [} 24]
a
Error BOOL TRUE = error in function block
ErrorID DINT Error number

7.13.22 Configuring axis-specific workspaces

Description
The function block KRC_WriteAxWorkspace is used to configure axis-specific workspaces for the robot.
These serve to protect the system. A maximum of 8 axis-specific workspaces can be configured at any one
time. The workspaces may overlap.

112 Version: 1.4 TC3 Robotics mxAutomation


Programming

Function block KRC_WriteAxWorkspace

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
WorkspaceNo INT Number of workspace
•  1…8
WorkspaceMod INT Mode for workspaces
e •   0: #OFF
•   1: #INSIDE
•   2: #OUTSIDE
•   3: #INSIDE_STOP
•   4: #OUTSIDE_STOP
Note: Further information about the mode for
workspaces is contained in the operating and
programming instructions for the KUKA System
Software (KSS).
WorkspaceDat AXBOX  >>> "Data of an axis-specific workspace". [} 25]
a
BufferMode INT  >>> "BufferMode". [} 22]

Outputs
Parameter Type Description
ErrorID DINT Error number
Busy BOOL TRUE = statement is currently being transferred
or has already been transferred
Done BOOL TRUE = statement has been executed
Aborted BOOL TRUE = statement was aborted before it was
processed in the advance run
Error BOOL TRUE = error in function block

7.13.23 Reading the configuration of axis-specific workspaces

Description
The function block KRC_ReadAxWorkspace reads the configuration of the axis-specific workspaces for the
robot.

TC3 Robotics mxAutomation Version: 1.4 113


Programming

Function block KRC_ReadAxWorkspace

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5
ExecuteCmd BOOL Starts/buffers the motion in the case of a rising
edge of the signal.
WorkspaceNo INT Number of workspace
•  1…8

Outputs
Parameter Type Description
Done BOOL TRUE = statement has been executed
WorkspaceMod INT Mode for workspaces
e •   0: #OFF
•   1: #INSIDE
•   2: #OUTSIDE
•   3: #INSIDE_STOP
•   4: #OUTSIDE_STOP
Note: Further information about the mode for
workspaces is contained in the operating and
programming instructions for the KUKA System
Software (KSS).
WorkspaceDat AXBOX  >>> "Data of an axis-specific workspace". [} 25]
a
Error BOOL TRUE = error in function block
ErrorID DINT Error number

114 Version: 1.4 TC3 Robotics mxAutomation


Programming

7.13.24 Reading the status of the workspaces

Description
The function block KRC_ReadWorkstates reads the current status of the workspaces. The status of the
workspaces is updated cyclically.

Function block KRC_ReadWorkstates

Inputs
Parameter Type Description
AxisGroupIdx INT Index of axis group
•  1…5

Outputs
Parameter Type Description
Valid BOOL TRUE = data are valid
WORKSTATE1 BOOL Status of the workspaces
WORKSTATE2 BOOL
WORKSTATE3 BOOL
WORKSTATE4 BOOL
WORKSTATE5 BOOL
WORKSTATE6 BOOL
WORKSTATE7 BOOL
WORKSTATE8 BOOL
AXWORKSTATE1 BOOL
AXWORKSTATE2 BOOL
AXWORKSTATE3 BOOL
AXWORKSTATE4 BOOL
AXWORKSTATE5 BOOL
AXWORKSTATE6 BOOL
AXWORKSTATE7 BOOL
AXWORKSTATE8 BOOL
Error BOOL TRUE = error in function block

TC3 Robotics mxAutomation Version: 1.4 115


Programming

Parameter Type Description


ErrorID DINT Error number

116 Version: 1.4 TC3 Robotics mxAutomation


Messages

8 Messages

8.1 Error messages of the mxA interface in the robot


interpreter
No. Message text Cause Remedy
0 — — —
1 INTERNAL Internal exceptional error Contact service.
ERROR
2 ASSERT FAILED Internal exceptional error
3 OVERFLOW There are more than 100 checkback signals relating to If this is not possible,
STATUS status changes waiting to be transferred from the robot contact service.
RETURN controller to the PLC.
QUEUE (MAIN) The transmission rate is considerably lower than the
4 OVERFLOW processing speed.
STATUS
RETURN
QUEUE
(TRIGGER)
5 INVALID Internal exceptional error Contact service.
COMMAND
QUEUE INDEX
6 INVALID Internal exceptional error
COMMAND
STATE
7 INVALID Internal exceptional error
COMMAND ID
8 INVALID MOVE Internal exceptional error
TYPE
9 OVERFLOW Internal exceptional error
TRIGGER FIFO
10 UNDERFLOW Internal exceptional error
TRIGGER FIFO
11 INVALID Internal exceptional error
TRIGGER FIFO
INDEX
12 EXECUTION OF Internal exceptional error
T_AFTER
MISSING
13 EXECUTION OF Internal exceptional error
T_START
MISSING
14 INVALID Internal exceptional error
ADVANCE_ACT
16 TIMEOUT Connection to PLC interrupted: Restore connection, then
HEARTBEAT acknowledge error:
FROM PLC PLC program stopped Restart the PLC program.
Connecting cable defective or not correctly connected Exchange connecting
cable or connect it
correctly.
17 INVALID Internal exceptional error Contact service.
ORDERID
(INVERSE)

TC3 Robotics mxAutomation Version: 1.4 117


Messages

No. Message text Cause Remedy


30 INVALID PTP An invalid approximation parameter has been  >>> "APO". [} 20]
APO transferred for a PTP motion.
31 INVALID CP APO An invalid approximation parameter has been
transferred for a CP motion (LIN, CIRC).
32 INVALID BASE An invalid number has been programmed in the Specify the number of the
NUMBER function block KRC_ReadBaseData or BASE coordinate system
KRC_WriteBaseData for the BASE coordinate system. that is currently being used
in the robot controller
(parameter BaseNo).
•   1 … 32
An invalid number has been programmed in a  >>> "COORDSYS". [} 21]
KRC_Move or KRC_Jog function block for the BASE
coordinate system.
33 INVALID TOOL An invalid number has been programmed in the Specify the number of the
NUMBER function block KRC_ReadToolData or TOOL coordinate system
KRC_WriteToolData for the TOOL coordinate system. that is currently being used
in the robot controller
(parameter ToolNo).
•   1 … 16
An invalid number has been programmed in a  >>> "COORDSYS". [} 21]
KRC_Move or KRC_Jog function block for the TOOL
coordinate system.
34 INVALID An invalid value has been programmed in a function Program a valid value
VELOCITY block for the velocity. (parameter Velocity):
•   0 … 100 %
35 INVALID An invalid value has been programmed in a function Program a valid value
ACCELERATION block for the acceleration. (parameter Acceleration):
•   0 … 100 %
36 INVALID C_PTP An invalid approximation distance has been transferred  >>> "APO". [} 20]
for a PTP motion.
37 INVALID C_DIS An invalid distance parameter has been transferred for
an approximated motion.
38 INVALID C_VEL An invalid velocity parameter has been transferred for
an approximated motion.
39 INVALID C_ORI An invalid orientation parameter has been transferred
for an approximated motion.
40 INVALID An invalid value has been programmed in a  >>> "OriType". [} 23]
ORI_TYPE KRC_Move or KRC_Jog function block for the
orientation control of the TCP.
41 POSITION DATA No end position transferred when calling a KRC_Move  >>> "E6POS". [} 21]
NOT function block.
INITIALIZED
42 AXISPOSITION No axis position transferred when calling a  >>> "E6AXIS". [} 21]
DATA NOT KRC_MoveAxis function block.
INITIALIZED
43 INVALID An invalid value has been programmed in a Program a valid value
TRIGGER KRC_SetDistanceTrigger function block for the (parameter Distance):
DISTANCE switching point of the trigger. •   0: Switching action
at the start point
•   1: Switching action
at the end point
44 INVALID An invalid output has been programmed in a Program a valid value
TRIGGER IO KRC_SetDistanceTrigger or KRC_SetPathTrigger (parameter Output):
function block. •   1 … 2 048

118 Version: 1.4 TC3 Robotics mxAutomation


Messages

No. Message text Cause Remedy


45 INVALID An invalid value has been programmed in a Program a valid value
TRIGGER KRC_SetDistanceTrigger or KRC_SetPathTrigger (parameter Pulse):
PULSE function block for the length of the pulse. •   0.1 … 3.0 s
•   0.0 s (No pulse
active)
46 INVALID No auxiliary position transferred when calling a  >>> "E6AXIS". [} 21]
CIRC_HP KRC_MoveCirc function block.
47 INVALID The number of the digital input to which the interrupt is Program a valid value
INTERRUPT IO declared is invalid (function block (parameter Input):
KRC_DeclareInterrupt). •   1 … 2 048
48 INVALID An invalid number was transferred when calling a Program a valid value
INTERRUPT KRC_…Interrupt function block. (parameter Interrupt):
PRIORITY •   1 … 8
49 INTERRUPT Interrupt has not been declared.  >>> "Declaring
NOT DECLARED interrupts". [} 52]
50 INVALID The interrupt reaction programmed when the the  >>> "Declaring
INTERRUPT interrupt was declared is invalid. interrupts". [} 52]
ACTION
51 INVALID IO The number of the digital input to which the interrupt is Program a valid value
NUMBER declared is invalid (function block (parameter Input):
KRC_DeclareInterrupt). •   1 … 2 048
52 INVALID PULSE An invalid value has been programmed in the function Program a valid value
DURATION block KRC_WriteDigitalOutput for the length of the (parameter Pulse):
pulse. •   0.1 … 3.0 s
•   0.0 s (No pulse
active)
53 INVALID An invalid BufferMode has been programmed in a  >>> "BufferMode". [} 22]
BUFFER_MODE function block, e.g. DIRECT mode is not available for
certain function blocks.
54 INVALID TOOL An invalid number has been programmed in the  >>> "Writing load data".
NUMBER FOR function block KRC_ReadLoadData or [} 48]
LOAD_DATA KRC_WriteLoadData for reading or writing the load
data or supplementary load data.
55 INVALID An invalid value has been programmed in a function Program a valid value
ANALOG IO block for the analog input or output. (parameter Number):
NUMBER •   1 … 32
56 INVALID An invalid value has been programmed in a function  >>> "COORDSYS". [} 21]
IPO_MODE block for the interpolation mode, e.g. in a KRC_Move
function block.
57 INVALID An invalid value has been programmed in a  >>> "CircType". [} 23]
CIRC_TYPE KRC_MoveCirc function block for the orientation
control during the circular motion.
58 INVALID FRAME Invalid TOOL or BASE data have been programmed in  >>> "Writing BASE data".
DATA a KRC_WriteToolData or KRC_WriteBaseData [} 46]
function block.
59 INVALID LOAD Invalid load data have been programmed in a  >>> "Writing load data".
DATA KRC_WriteLoadData function block. [} 48]
60 INVALID Error writing the software limit switches: positive Program lower values for
SOFT_END software limit switch < negative software limit switch the negative software limit
(REVERSED) (function block KRC_WriteSoftEnd or switch than for the positive
KRC_WriteSoftEndEx) software limit switch.

TC3 Robotics mxAutomation Version: 1.4 119


Messages

No. Message text Cause Remedy


61 INVALID Internal exceptional error Contact service.
INTERRUPT
STATE
62 INVALID SYS An index for which no system variable is stored has Program a valid value
VAR INDEX been transferred in a KRC_ReadSysVar or (parameter Index).
KRC_WriteSysVar function block.

63 INVALID SYS An invalid value has been programmed in a Program a valid value
VAR VALUE KRC_WriteSysVar function block for the system (parameter Value1 …
variable. Value10).

64 SYS VAR NOT An error occurred when writing a system variable.


WRITEABLE The specified system variable does not exist or may not be written in the current
operating state.
65 INVALID REAL The programmed Real value is invalid. Program a valid value:
VALUE •   -2,147,483,500 …
+2,147,483,500
66 ERROR Error writing a digital output. The output may already Use a different digital
SETTING be assigned by the system. output (parameter
OUTPUT Number):
•   1 … 2 048
67 ERROR Error writing the software limit switches: One possible Program valid values for
SETTING error, for example, is writing a rotational axis with a the software limit switches
SOFTEND value outside the range +/-360°. (see machine data).
68 INVALID TECH A TechFunctionID for which no technology function is Contact service.
FUNCTION stored has been transferred in a KRC_TechFunction
INDEX function block.
69 INVALID TECH An invalid value has been programmed in a Contact service.
FUNCTION KRC_TechFunction function block for a parameter.
PARAMETER
70 INVALID An invalid value has been programmed in the called Program valid values for
PARAMETER function block for one or more parameters. the parameters.
VALUE

120 Version: 1.4 TC3 Robotics mxAutomation


Messages

8.2 Error messages of the mxA interface in the submit


interpreter
No. Message text Cause Remedy
401 INTERNAL Internal exceptional error Contact service.
ERROR
402 ASSERT FAILED Internal exceptional error
403 INVALID Internal exceptional error
COMMAND ID
404 INVALID Internal exceptional error
COMMAND
STATE
405 OVERFLOW Internal exceptional error
COMMAND
QUEUE
406 INVALID Internal exceptional error
COMMAND
QUEUE INDEX
407 INVALID Internal exceptional error
COMMAND
(PRE) QUEUE
INDEX
408 INVALID Internal exceptional error
WRITE_Q_IDX
AND
WRITE_PRE_Q_
IDX
409 OVERFLOW There are more than 100 checkback signals relating to If this is not possible,
STATUS status changes waiting to be transferred from the robot contact service.
RETURN controller to the PLC.
QUEUE The transmission rate is considerably lower than the
(SUBMIT) processing speed.
410 INVALID Internal exceptional error Contact service.
FIELDBUS
TELEGRAMM
LENGTH
411 TIMEOUT Internal exceptional error
ABORT_REQUE
ST
412 INVALID The checksum for data transmission from the PLC to the robot controller is invalid:
CHECKSUM PLC Error during start-up: Check configuration in
-> KRC WorkVisual and TwinCAT
•   EtherCAT configuration in WorkVisual or
TwinCAT faulty and configure EtherCAT
correctly.
Error during operation: Contact service.
•   Bit error during data transfer
413 INVALID MOVE Internal exceptional error Contact service.
TYPE
414 TIMEOUT Connection to PLC interrupted: Restore connection, then
HEARTBEAT acknowledge error:
FROM PLC PLC program stopped Restart the PLC program.
Submit interpreter deselected or stopped Restart submit interpreter.
Connecting cable defective or not correctly connected Exchange connecting
cable or connect it
correctly.

TC3 Robotics mxAutomation Version: 1.4 121


Messages

No. Message text Cause Remedy


416 SYS VAR NOT An error occurred when reading a system variable.
INITIALIZED The specified system variable does not exist or may not be read in the current
operating state.
Example: $POS_ACT cannot be accessed until a BCO run has been carried out.
417 UNDERFLOW Internal exceptional error Contact service.
OF NIBBLE
418 OVERFLOW OF Internal exceptional error
NIBBLE
419 UNDERFLOW Internal exceptional error
OF BYTE
420 OVERFLOW OF Internal exceptional error
BYTE
421 UNDERFLOW Internal exceptional error
OF INT16
422 OVERFLOW OF Internal exceptional error
INT16
423 UNDERFLOW Internal exceptional error
OF INT32
424 OVERFLOW OF Internal exceptional error
INT32
425 UNDERFLOW Internal exceptional error
OF REAL
426 OVERFLOW OF Internal exceptional error
REAL
430 INVALID PTP An invalid approximation parameter has been  >>> "APO". [} 20]
APO transferred for a PTP motion.
431 INVALID CP APO An invalid approximation parameter has been
transferred for a CP motion (LIN, CIRC).
432 INVALID BASE An invalid number has been programmed in the Specify the number of the
NUMBER function block KRC_ReadBaseData or BASE coordinate system
KRC_WriteBaseData for the BASE coordinate system. that is currently being used
in the robot controller
(parameter BaseNo).
•   1 … 32
An invalid number has been programmed in a  >>> "COORDSYS". [} 21]
KRC_Move or KRC_Jog function block for the BASE
coordinate system.
433 INVALID TOOL An invalid number has been programmed in the Specify the number of the
NUMBER function block KRC_ReadToolData or TOOL coordinate system
KRC_WriteToolData for the TOOL coordinate system. that is currently being used
in the robot controller
(parameter ToolNo).
•   1 … 16
An invalid number has been programmed in a  >>> "COORDSYS". [} 21]
KRC_Move or KRC_Jog function block for the TOOL
coordinate system.
434 INVALID An invalid value has been programmed in a function Program a valid value
VELOCITY block for the velocity. (parameter Velocity):
•   0 … 100 %
435 INVALID An invalid value has been programmed in a function Program a valid value
ACCELERATION block for the acceleration. (parameter Acceleration):
•   0 … 100 %

122 Version: 1.4 TC3 Robotics mxAutomation


Messages

No. Message text Cause Remedy


436 INVALID C_PTP An invalid approximation distance has been transferred  >>> "APO". [} 20]
for a PTP motion.
437 INVALID C_DIS An invalid distance parameter has been transferred for
an approximated motion.
438 INVALID C_VEL An invalid velocity parameter has been transferred for
an approximated motion.
439 INVALID C_ORI An invalid orientation parameter has been transferred
for an approximated motion.
440 INVALID An invalid value has been programmed in a  >>> "OriType". [} 23]
ORI_TYPE KRC_Move or KRC_Jog function block for the
orientation control of the TCP.
441 POSITION DATA No end position transferred when calling a KRC_Move  >>> "E6POS". [} 21]
NOT function block.
INITIALIZED
442 AXISPOSITION No axis position transferred when calling a  >>> "E6AXIS". [} 21]
DATA NOT KRC_MoveAxis function block.
INITIALIZED
443 INVALID An invalid value has been programmed in the Program a valid value
TRIGGER KRC_SetDistanceTrigger function block for the (parameter Distance):
DISTANCE switching point of the trigger. •   0: Switching action
at the start point
•   1: Switching action
at the end point
444 INVALID An invalid output has been programmed in a Program a valid value
TRIGGER IO KRC_SetDistanceTrigger or KRC_SetPathTrigger (parameter Output):
function block. •   1 … 2 048
445 INVALID An invalid value has been programmed in a Program a valid value
TRIGGER KRC_SetDistanceTrigger or KRC_SetPathTrigger (parameter Pulse):
PULSE function block for the length of the pulse. •   0.1 … 3.0 s
•   0.0 s (No pulse
active)
446 INVALID No auxiliary position transferred when calling a  >>> "E6AXIS". [} 21]
CIRC_HP KRC_MoveCirc function block.
447 INVALID The number of the digital input to which the interrupt is Program a valid value
INTERRUPT IO declared is invalid (function block (parameter Input):
KRC_DeclareInterrupt). •   1 … 2 048
448 INVALID An invalid number was transferred when calling a Program a valid value
INTERRUPT KRC_…Interrupt function block. (parameter Interrupt):
NUMBER/ •   1 … 8
PRIORITY
449 INTERRUPT Interrupt has not been declared.  >>> "Declaring
NOT DECLARED interrupts". [} 52]
450 INVALID The interrupt reaction programmed when the the  >>> "Declaring
INTERRUPT interrupt was declared is invalid. interrupts". [} 52]
ACTION
451 INVALID IO The number of the digital input to which the interrupt is Program a valid value
NUMBER declared is invalid (function block (parameter Input):
KRC_DeclareInterrupt). •   1 … 2 048
452 INVALID PULSE An invalid value has been programmed in the function  >>> "Writing a digital
DURATION block KRC_WriteDigitalOutput for the length of the output". [} 39]
pulse.
453 INVALID An invalid BufferMode has been programmed in a  >>> "BufferMode". [} 22]
BUFFER_MODE function block, e.g. DIRECT mode is not available for
certain function blocks.

TC3 Robotics mxAutomation Version: 1.4 123


Messages

No. Message text Cause Remedy


454 INVALID TOOL An invalid number has been programmed in the  >>> "Writing load data".
NUMBER FOR function block KRC_ReadLoadData or [} 48]
LOAD_DATA KRC_WriteLoadData for reading or writing the load
data or supplementary load data.
455 INVALID An invalid number has been programmed for the Program a valid number
ANALOG IO analog input or output in a function block. (parameter Number):
NUMBER •   1 … 32
456 INVALID An invalid value has been programmed in a function  >>> "COORDSYS". [} 21]
IPO_MODE block for the interpolation mode, e.g. in a KRC_Move
function block.
457 INVALID An invalid value has been programmed in a  >>> "CircType". [} 23]
CIRC_TYPE KRC_MoveCirc function block for the orientation
control during the circular motion.
458 INVALID FRAME Invalid TOOL or BASE data have been programmed in  >>> "Writing BASE data".
DATA a KRC_WriteToolData or KRC_WriteBaseData [} 46]
function block.
459 INVALID LOAD Invalid load data have been programmed in a  >>> "Writing load data".
DATA KRC_WriteLoadData function block. [} 48]
460 INVALID Error writing the software limit switches: Positive Program lower values for
SOFT_END software limit switch < negative software limit switch the negative software limit
(REVERSED) switch than for the positive
software limit switch.
461 INVALID Internal exceptional error Contact service.
INTERRUPT
STATE
462 INVALID SYS An index for which no system variable is stored has Program a valid value
VAR INDEX been transferred in a KRC_ReadSysVar or (parameter Index).
KRC_WriteSysVar function block.

463 INVALID SYS An invalid value has been programmed in a Program a valid value
VAR VALUE KRC_WriteSysVar function block for the system (parameter Value1 …
variable. Value10).

464 SYS VAR NOT An error occurred when writing a system variable.
WRITEABLE The specified system variable does not exist or may not be written in the current
operating state.
465 INVALID REAL The programmed Real value is invalid. Program a valid value:
VALUE •   -2,147,483,500 …
+2,147,483,500
466 ERROR Error writing an output. The output may already be Use a different digital
SETTING assigned by the system. output (parameter
OUTPUT Number):
•   1 … 2 048
467 ERROR An error occurred when writing a software limit switch. Program valid values for
SETTING One possible error, for example, is writing a rotational the software limit switches
SOFTEND axis with a value outside the range +/-360°. (see machine data).
468 INVALID TECH A TechFunctionID for which no technology function is Contact service.
FUNCTION stored has been transferred in a KRC_TechFunction
INDEX function block.
469 INVALID TECH An invalid value has been programmed in a Contact service.
FUNCTION KRC_TechFunction function block for a parameter.
PARAMETER

124 Version: 1.4 TC3 Robotics mxAutomation


Messages

No. Message text Cause Remedy


470 INVALID An invalid value has been programmed in the called Program valid values for
PARAMETER function block for one or more parameters. the parameters.
VALUE

8.3 Errors in the function block


No. Message text Cause Remedy
501 INTERNAL Internal exceptional error Contact service.
ERROR
502 INVALID BufferMode 0: DIRECT is not permissible for this Program the correct mode:
BUFFER_MODE function block. •   1: ABORTING
•   2: BUFFERED
503 INVALID MXA The software versions of the mxA interface and PLC  >>> "Initializing the mxA
VERSION library are not compatible. interface". [} 28]
504 INVALID Invalid override value in the function block Program a valid value
OVERRIDE KRC_SetOverride (parameter Override).
•   0 … 100 %
505 MAX GROUP The axis group index specified in the function block Only instance the
REF IDX KRC_ReadAxisGroup is already assigned. KRC_ReadAxisGroup
REACHED function block once in a
program.
506 INVALID The axis group index specified in the function block is Specify a valid index for
GROUPREFIDX invalid. the axis group (parameter
AxisGroupIdx).
507 INVALID FB The order in which the function blocks were called is Program the function
ORDER invalid. blocks in the correct order.
508 CONNECTION No statements can be transferred, as the mxA  >>> "Initializing the mxA
NOT interface has not been initialized. interface". [} 28]
INITIALIZED
509 NO Connection to robot controller interrupted: Restore connection, then
510 CONNECTION acknowledge error:
TO KRC Robot controller is switched off Reboot the robot
TIMEOUT controller.
HEARTBEAT Submit interpreter deselected or stopped Restart submit interpreter.
FROM KRC
Bus error or I/O configuration faulty Check I/O configuration.
Connecting cable defective or not correctly connected Exchange connecting
cable or connect it
correctly.
Maximum cycle time of the submit interpreter is too Increase the value for
short (only for message no. 510) MaxSubmitCycle in the
function block KRC_DIAG.
511 TIMEOUT CMD The ExecuteCmd input was reset before the Busy Acknowledge the message
INTERFACE signal was set. and in future do not reset
BLOCKED the ExecuteCmd input until
the Done, Error or Aborted
signal has been set.
512 INVALID The checksum for data transmission from the robot controller to the PLC is invalid.
CHECKSUM Error during start-up: Check configuration in
KRC -> PLC WorkVisual and TwinCAT
•   EtherCAT configuration in WorkVisual or
TwinCAT faulty and configure EtherCAT
correctly.
Error during operation: Contact service.
•   Bit error during data transfer

TC3 Robotics mxAutomation Version: 1.4 125


Messages

No. Message text Cause Remedy


513 INVALID An invalid number for the position to be taught was Program a valid value
POSITION transferred in the function block KRC_TouchUP. (parameter Index):
INDEX •   1 … 100
514 POS_ACT The current position cannot be taught, as the position Establish BCO with a
INVALID data are invalid (no BCO). RESET at the function
block
KRC_AutomaticExternal.
517 INVALID Internal exceptional error Contact service.
COMMAND SIZE
518 KRC STOPMESS Group error which prevents motion enable Check how the error was
ACTIVE triggered and eliminate the
error.
•   Analyze the
messages in the
message window of
the KUKA smartHMI.
•   Read the current
error state of the
robot controller with
the function block
KRC_ReadKRCError
.
519 INVALID An invalid value has been programmed for the Contact service.
ABSOLUTE parameter AbsoluteVelocity in a KRC_Move function
VELOCITY block.
520 VELOCITY More than one value has been programmed for the Contact service.
CONFLICT velocity in a KRC_Move function block.
521 INVALID An invalid value has been programmed for the Contact service.
PARAMETER parameter ParameterCount in a KRC_TechFunction
COUNT function block.
522 INVALID The parameter ParameterCount has been incorrectly Contact service.
PARAMETER configured in the KRC_TechFunction function block.
USAGE
523 INVALID The robot is in the incorrect operating mode. Select Automatic External
OPERATION mode.
MODE
524 USER_SAF The operator safety is violated. Close the safeguard and
SIGNAL NOT acknowledge the closed
ACTIVE state.
525 ALARM_STOP The safety configuration is incorrect and an Check and modify the
SIGNAL NOT EMERGENCY STOP has been triggered. safety configuration of the
ACTIVE system (robot controller
and PLC).
No connection to the EMERGENCY STOP of the Check the EMERGENCY
system STOP of the system and
reestablish the connection.
The inputs and outputs of the Automatic External 1.   In the main menu,
interface are incorrectly configured. select Display > Inputs/
outputs > Automatic
External.
2.   Check and modify the
configuration of the inputs
and outputs.

126 Version: 1.4 TC3 Robotics mxAutomation


Messages

No. Message text Cause Remedy


526 APPL_RUN RESET cannot be carried out because a robot program 1.   Wait until the robot
SIGNAL ACTIVE is running. program has been
executed.
2.   Execute the statement
again.
527 TIMEOUT The message cannot be acknowledged by the PLC. Acknowledge the message
MESSAGE on the robot controller.
CONFIRM
528 TIMEOUT MXA An error cannot be acknowledged in the function block Contact service.
MESSAGE KRC_AutoStart.
CONFIRM
529 TIMEOUT Internal exceptional error Contact service.
SWITCHING
DRIVES ON
530 TIMEOUT Internal exceptional error
PROGRAM
SELECTION
531 TIMEOUT Internal exceptional error
PROGRAM
START
532 MOVE_ENABLE The robot does not have motion enable Issue motion enable with
SIGNAL NOT the parameter
ACTIVE MOVE_ENABLE.
533 INVALID In the function block KRC_Forward, not all axis angles Define the missing axis
AXIS_VALUES required for execution are defined. angles in the function block
KRC_Forward.
534 INVALID $BASE Internal exceptional error Contact service.
535 INVALID $TOOL Internal exceptional error
536 INVALID Error in the function block KRC_Forward: Enter axis angles that lie
SOFTEND The specified axis angles lie outside of the software within the software limit
limit switches. switches (parameter
Axis_Values).
or: Modify the software
limit switches.
537 ERR MATH Error in the function block KRC_Forward: Enter axis angles that the
TRAFO The robot cannot reach the specified axis angles. robot can reach
(parameter Axis_Values).
538 INVALID Error in the function block KRC_Inverse: •   Fully specify the
AXIS_VALUES •   The Cartesian robot position has not been fully Cartesian robot
specified. position (parameter
Position).
•   The axis-specific values at the start point of the
motion have not been fully specified. •   Fully specify the
axis-specific values
at the start point of
the motion
(parameter
Start_Axis).
539 INVALID $BASE Internal exceptional error Contact service.
540 INVALID $TOOL Internal exceptional error
541 INVALID Error in the function block KRC_Inverse: Enter values that lie within
SOFTEND The specified axis-specific values at the start point of the software limit switches
the motion lie outside of the software limit switches. (parameter Start_Axis).
or: Modify the software
limit switches.

TC3 Robotics mxAutomation Version: 1.4 127


Messages

No. Message text Cause Remedy


542 ERR MATH Error in the function block KRC_Inverse: Enter values that the robot
TRAFO The robot cannot reach the specified axis-specific can reach (parameter
values at the start point of the motion. Start_Axis).
543 INVALID During a linked motion capable of being approximated, Acknowledge the message
EXECUTE the Execute input was reset before the ComDone and in the future do not
signal was set by the function block. reset the Execute input
until the ComDone signal
has been set by the
function block.
544 INVALID Initialization of the mxA interface on the robot controller Check whether the Done
DEV_VEL_CP has not yet been completed or has an error. output on the function
block KRC_Initialize is
active.

8.4 ProConOS errors


No. Message text Cause Remedy
701 INTERNAL ERROR Internal exceptional error Contact service.
702 ASSERT FAILED Internal exceptional error
703 INVALID COMMAND Internal exceptional error
ID
704 INVALID HEADER Internal exceptional error
DATA
709 ERROR READING Internal exceptional error
SOFTPLC
710 ERROR FROM KRC Internal exceptional error
SUBMIT
712 INVALID The checksum for data Contact service.
CHECKSUM PLC - transmission from the PLC to the
> KRC robot controller is invalid.
713 INVALID MOVE An invalid value has been Contact service.
TYPE programmed in a KRC_Move
function block for the parameter
MoveType.
730 INVALID PTP APO An invalid approximation  >>> "APO". [} 20]
parameter has been transferred
for a PTP motion.
731 INVALID CP APO An invalid approximation
parameter has been transferred
for a CP motion (LIN, CIRC).
732 INVALID BASE An invalid number has been Specify the number of the BASE
NUMBER programmed in the function block coordinate system that is
KRC_ReadBaseData or currently being used in the robot
KRC_WriteBaseData for the controller (parameter BaseNo).
BASE coordinate system. •   1 … 32
An invalid number has been  >>> "COORDSYS". [} 21]
programmed in a KRC_Move or
KRC_Jog function block for the
BASE coordinate system.

128 Version: 1.4 TC3 Robotics mxAutomation


Messages

No. Message text Cause Remedy


733 INVALID TOOL An invalid number has been Specify the number of the TOOL
NUMBER programmed in the function block coordinate system that is
KRC_ReadToolData or currently being used in the robot
KRC_WriteToolData for the controller (parameter ToolNo).
TOOL coordinate system. •   1 … 16
An invalid number has been  >>> "COORDSYS". [} 21]
programmed in a KRC_Move or
KRC_Jog function block for the
TOOL coordinate system.
734 INVALID VELOCITY An invalid value has been Program a valid value (parameter
programmed in a function block Velocity):
for the velocity. •   0 … 100 %
735 INVALID An invalid value has been Program a valid value (parameter
ACCELERATION programmed in a function block Acceleration):
for the acceleration. •   0 … 100 %
736 INVALID C_PTP An invalid approximation distance  >>> "APO". [} 20]
has been transferred for a PTP
motion.
737 INVALID C_DIS An invalid distance parameter
has been transferred for an
approximated motion.
738 INVALID C_VEL An invalid velocity parameter has
been transferred for an
approximated motion.
739 INVALID C_ORI An invalid orientation parameter
has been transferred for an
approximated motion.
740 INVALID ORI_TYPE An invalid value has been  >>> "OriType". [} 23]
programmed in a KRC_Move or
KRC_Jog function block for the
orientation control of the TCP.
741 POSITION DATA No end position transferred when  >>> "E6POS". [} 21]
NOT INITIALIZED calling a KRC_Move function
block.
742 AXISPOSITION No axis position transferred when  >>> "E6AXIS". [} 21]
DATA NOT calling a KRC_MoveAxis function
INITIALIZED block.
743 INVALID TRIGGER An invalid value has been Program a valid value (parameter
DISTANCE programmed in a Distance):
KRC_SetDistanceTrigger •   0: Switching action at the
function block for the switching start point
point of the trigger.
•   1: Switching action at the
end point
744 INVALID TRIGGER An invalid output has been Program a valid value (parameter
IO programmed in a Output):
KRC_SetDistanceTrigger or •   1 … 2 048
KRC_SetPathTrigger function
block.
745 INVALID TRIGGER An invalid value has been Program a valid value (parameter
PULSE programmed in a Pulse):
KRC_SetDistanceTrigger or •   0.1 … 3.0 s
KRC_SetPathTrigger function
block for the length of the pulse. •   0.0 s (No pulse active)
746 INVALID CIRC_HP No auxiliary position transferred  >>> "E6AXIS". [} 21]
when calling a KRC_MoveCirc
function block.

TC3 Robotics mxAutomation Version: 1.4 129


Messages

No. Message text Cause Remedy


747 INVALID The number of the digital input to Program a valid value (parameter
INTERRUPT IO which the interrupt is declared is Input):
invalid (function block •   1 … 2 048
KRC_DeclareInterrupt).
748 INVALID An invalid number was Program a valid value (parameter
INTERRUPT transferred when calling a Interrupt):
PRIORITY KRC_…Interrupt function block. •   1 … 8
750 INVALID The interrupt reaction  >>> "Declaring interrupts".
INTERRUPT ACTION programmed when the the [} 52]
interrupt was declared is invalid.
751 INVALID IO NUMBER The number of the digital input to Program a valid value (parameter
which the interrupt is declared is Input):
invalid (function block •   1 … 2 048
KRC_DeclareInterrupt).
752 INVALID PULSE An invalid value has been Program a valid value (parameter
DURATION programmed in the function block Pulse):
KRC_WriteDigitalOutput for the •   0.1 … 3.0 s
length of the pulse.
•   0.0 s (No pulse active)
753 INVALID An invalid BufferMode has been  >>> "BufferMode". [} 22]
BUFFER_MODE programmed in a function block,
e.g. DIRECT mode is not
available for certain function
blocks.
754 INVALID TOOL An invalid number has been  >>> "Writing load data". [} 48]
NUMBER FOR programmed in the function block
LOAD_DATA KRC_ReadLoadData or
KRC_WriteLoadData for reading
or writing the load data or
supplementary load data.
755 INVALID ANALOG IO An invalid value has been Program a valid value (parameter
NUMBER programmed in a function block Number):
for the analog input or output. •   1 … 32
756 INVALID IPO_MODE An invalid value has been  >>> "COORDSYS". [} 21]
programmed in a function block
for the interpolation mode, e.g. in
a KRC_Move function block.
757 INVALID CIRC_TYPE An invalid value has been  >>> "CircType". [} 23]
programmed in a KRC_MoveCirc
function block for the orientation
control during the circular motion.
758 INVALID FRAME Invalid TOOL or BASE data have  >>> "Writing BASE data". [} 46]
DATA been programmed in a
KRC_WriteToolData or
KRC_WriteBaseData function
block.
759 INVALID LOAD DATA Invalid load data have been  >>> "Writing load data". [} 48]
programmed in a
KRC_WriteLoadData function
block.
760 INVALID SOFT_END Error writing the software limit Program lower values for the
(REVERSED) switches: positive software limit negative software limit switch
switch < negative software limit than for the positive software limit
switch (function block switch.
KRC_WriteSoftEnd or
KRC_WriteSoftEndEx)

130 Version: 1.4 TC3 Robotics mxAutomation


Messages

No. Message text Cause Remedy


765 INVALID REAL The programmed Real value is •   -2,147,483,500 …
VALUE invalid. +2,147,483,500
770 INVALID An invalid value has been Program valid values for the
PARAMETER VALUE programmed in the called parameters.
function block for one or more
parameters.
771 INVALID ADVANCE In the function block Program a valid value (parameter
COUNT KRC_SetAdvance, an invalid Count):
value has been programmed for •   1 … 50
the number of functions which
are to be transferred prior to the
first robot motion.
772 INVALID In the function block Program a valid value (parameter
MAXWAITTIME KRC_SetAdvance, an invalid MaxWaitTime):
value has been programmed for •   1 … 60 000 ms
the maximum wait time before
the start of program execution if
the set number of functions in the
parameter Count is not reached.
773 INVALID ADVANCE In the function block Program a valid value (parameter
MODE KRC_SetAdvance, an invalid Mode):
value has been programmed for •  0…2
Wait mode.
774 INVALID DI In the function block Program a valid value (parameter
STARTNUMBER KRC_ReadDigitalInputArray, an Startnumber):
invalid value has been •   1 … 2 048
programmed for the number of
the first digital input that is called.
775 INVALID DI LENGTH In the function block Program a valid value (parameter
KRC_ReadDigitalInputArray, an Length):
invalid value has been •   1 … 2 00
programmed for the number of
inputs that are polled.
776 INVALID In the called function block, an Program a valid value (parameter
CONVEYOR invalid number has been ConveyorNumber):
NUMBER programmed for the number of •  1…3
the conveyor.
777 INVALID In the function block Program a valid value (parameter
CONVEYOR KRC_ConvFollow or StartDistance):
STARTDISTANCE KRC_ConvSkip, an invalid value •   In the case of a linear
has been programmed for the conveyor: Specification in
distance traveled by the millimeters
workpiece while the robot waits
before starting to track the •   In the case of a circular
workpiece on the conveyor. conveyor: Specification in
degrees
778 INVALID In the function block Program a valid value (parameter
CONVEYOR KRC_ConvFollow or MaxDistance):
MAXDISTANCE KRC_ConvSkip, an invalid value •   In the case of a linear
has been programmed for the conveyor: Specification in
maximum distance traveled by millimeters
the workpiece before the robot
starts to synchronize itself with •   In the case of a circular
the workpiece. conveyor: Specification in
degrees

TC3 Robotics mxAutomation Version: 1.4 131


Messages

No. Message text Cause Remedy


779 INVALID In the function block Program a valid value (parameter
CONVEYOR KRC_ConvSkip, an invalid value PieceNumber).
PIECENUMBER has been programmed for the Examples:
number specifying which
workpieces are to be picked up. •   1: Every workpiece is
picked up.
•   3: Every 3rd workpiece is
picked up.
780 INVALID In the called function block, an Program a valid value (parameter
WORKSPACENO invalid number has been WorkspaceNo):
programmed for the number of •  1…8
the workspace.
781 INVALID In the called function block, an Program a valid value (parameter
WORKSPACEMODE invalid number has been WorkspaceMode):
programmed for the mode for •  0…4
workspaces.
782 INVALID Internal exceptional error Contact service.
WORKSPACEPART
801 STOPMESS ACTIVE Group error which prevents Check how the error was
motion enable triggered and eliminate the error.
•   Analyze the messages in
the message window of the
KUKA smartHMI.
•   Read the current error
state of the robot controller
with the function block
KRC_ReadKRCError.

132 Version: 1.4 TC3 Robotics mxAutomation

You might also like