0% found this document useful (0 votes)
1K views242 pages

KUKA KSS 8.3 Programming Manual For SI (250 491)

This document provides instructions for restoring archived data and activating projects on a KUKA robot controller running KUKA System Software 8.3. It describes how to restore archived files from a USB stick by selecting items from the restore menu. It also explains how to activate a project, including checking for safety-related changes, confirming activation, and verifying the robot's safety configuration after activation. Special projects like the initial and base projects are also discussed.

Uploaded by

Güven TEZCAN
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)
1K views242 pages

KUKA KSS 8.3 Programming Manual For SI (250 491)

This document provides instructions for restoring archived data and activating projects on a KUKA robot controller running KUKA System Software 8.3. It describes how to restore archived files from a USB stick by selecting items from the restore menu. It also explains how to activate a project, including checking for safety-related changes, confirming activation, and verifying the robot's safety configuration after activation. Special projects like the initial and base projects are also discussed.

Uploaded by

Güven TEZCAN
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/ 242

KUKA System Software 8.

7.10.5 Restoring data

Description
Only KSS 8.3 archives may be loaded into KSS 8.3. If
other archives are loaded, the following may occur:
 Error messages
 Robot controller is not operable.
 Personal injury and damage to property.

The following menu items are available for restoring data:


 All
 Applications
 System data
If the archived files are not the same version as the files present in the system,
an error message is generated during restoration.
Similarly, if the version of the archived technology packages does not match
the installed version, an error message is generated.

Precondition  If data are to be restored from the USB stick: A USB stick with the archive
is connected.
The stick can be connected to the smartPAD or robot controller.

A non-bootable USB stick must be used.


We recommend using a non-bootable KUKA stick. Data
may be lost if a stick from a different manufacturer is used.

Procedure 1. In the main menu, select File > Restore and then the desired subitems.
2. Confirm the request for confirmation with Yes. Archived files are restored
to the robot controller. A message indicates completion of the restoration
process.
3. If data have been restored from a USB stick: the stick can now be re-
moved.
4. Reboot the robot controller.

7.11 Project management

7.11.1 Pinning a project on the robot controller

Description Projects that are present on the robot controller can be pinned. A project can
be pinned directly on the robot controller or in WorkVisual.
Pinned projects cannot be changed, activated or deleted. They can be copied
or unpinned, however. A project can thus be pinned e.g. to prevent it from be-
ing accidentally deleted.

Information about how projects can be pinned via WorkVisual can be


found in the WorkVisual documentation.

Precondition  “Expert” user group

Procedure 1. Touch the WorkVisual icon on the smartHMI, then go to Open. The Proj-
ect management window opens.
2. Select the desired project and press the Pin button. The project is pinned
and labeled with a pin symbol in the project list.
(>>> 7.11.3 "Project management window" Page 252)

250 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


7 Program and project management

3. The project can be unpinned again by pressing the Unpin button.

7.11.2 Activating a project

Precondition  User group “Expert” or higher


If the activation would cause changes in the area Safety-relevant com-
munication parameters, the user group “Safety recovery” or higher must
be selected.
 In AUT or AUT EXT mode:
The project can only be activated if this affects only KRL programs. If the
project contains settings that would cause other changes, it cannot be ac-
tivated.

If one of the options KUKA.SafeOperation or KUKA.SafeRangeMon-


itoring is installed on the robot controller, different user groups may
apply. Information can be found in the documentation for these op-
tions.

Preparation There are 2 ways of reaching the first step of the procedure below.
 Project activation is the direct continuation of another sequence, e.g. the
restoration of a project.
In this case, the preparation described as follows is not necessary.
 Or: Project activation is executed as a stand-alone sequence.
In this case, the preparation described as follows is required in order to ar-
rive at the procedure.
Preparation:
1. Touch the WorkVisual icon on the smartHMI, then go to Open. The Proj-
ect management window opens.
2. Select the desired project and activate it using the Activate button.

Procedure 1. The KUKA smartHMI displays the request for confirmation Do you want to
activate the project […]?. In addition, a message is displayed as to whether
the activation would overwrite a project, and if so, which.
If no relevant project will be overwritten: Confirm with Yes within 30 min-
utes.
2. An overview is displayed of the changes which will be made in comparison
to the project that is still active on the robot controller. The check box De-
tails can be used to display details about the changes.

If changes are listed in the overview under the heading


Safety-relevant communication parameters, this
means that the behavior of the Emergency Stop and “Operator safety” signal
may have changed compared with the previous project.
After activation of the project, the Emergency Stop and the “Operator safety”
signal must be checked for safe functioning. If the project is activated on sev-
eral robot controllers, this check must be carried out for every robot control-
ler. Failure to carry out this check may result in death, injuries or damage to
property.

3. The overview displays the request for confirmation Do you want to conti-
nue?. Confirm with Yes. The project is activated on the robot controller.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 251 / 491


KUKA System Software 8.3

After activation of a project on the robot controller, the


safety configuration must be checked there! If this is not
done, the robot will possibly be operated with incorrect data. Death, injuries
or damage to property may result.
(>>> 6.5 "Checking the safety configuration of the robot controller"
Page 166)

If the activation of a project fails, an error message is dis-


played. In this case, one of the following measures must
be carried out:
 Either: Activate a project again (the same one or a different one).
 Or: Reboot the robot controller with a cold restart.

In the case of a KSS/VSS update, the initial project and base project
are overwritten by copies of the active project.

7.11.3 Project management window

Overview The Project management window is opened using the WorkVisual icon on
the smartHMI.
In addition to the regular projects, the Project management window contains
the following special projects:

Project Description
Initial project The initial project is always present. It cannot be
changed by the user. It contains the initial state of the
robot controller as shipped.
Base project The user can save the active project as the base proj-
ect. This functionality is generally used to save a func-
tional, tried-and-tested project state.
The base project cannot be activated, but copied. The
base project can no longer be changed by the user. It
can, however, be overwritten by saving a new base
project (after a request for confirmation).
If a project is activated which does not contain all the
configuration files, the missing information is inserted
from the base project. This is the case e.g. if a project
is activated from an earlier version of WorkVisual. (The
configuration files include machine data files, safety
configuration files and many others.)

In the case of a KSS/VSS update, the initial project and base project
are overwritten by copies of the active project.

252 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


7 Program and project management

Description

Fig. 7-15: “Projects management” window

Item Description
1 The initial project is displayed.
2 Restores the factory settings of the robot controller.
Only available to the user group “Expert” or higher.
3 The base project is displayed.
4 Creates a copy of the base project.
Only available to the user group “Expert” or higher.
5 The active project is displayed.
6 Saves the active project as the base project. The active project re-
mains active.
Only available to the user group “Expert” or higher.
7 Creates a pinned copy of the active project.
Only available to the user group “Expert” or higher.
8 List of inactive projects (except base and initial project)

With all copying operations, a window opens in which a name and a descrip-
tion can be entered for the copy.

Buttons The following buttons are available:

Issued: 14.01.2015 Version: KSS 8.3 SI V4 253 / 491


KUKA System Software 8.3

Button Description
Activate Activates the selected project.
If the selected project is pinned: Creates a copy of the
selected project. (A pinned project cannot be activated
itself, only a copy of it.) The user can then decide
whether to activate this copy or whether the current
project should remain active.
Only available to the user group “Expert” or higher.
Pin (>>> 7.11.1 "Pinning a project on the robot controller"
Page 250)
Only available if an unpinned project is selected. Only
available to the user group “Expert” or higher.
Unpin Unpins the project.
Only available if a pinned project is selected. Only
available to the user group “Expert” or higher.
Copy Copies the selected project.
Only available to the user group “Expert” or higher.
Delete Deletes the selected project.
Only available if a non-activated, unpinned project is
selected. Only available to the user group “Expert” or
higher.
Edit Opens a window in which the name and/or description
of the selected project can be changed.
Only available if an unpinned project is selected. Only
available to the user group “Expert” or higher.
Update Refreshes the project list. This enables e.g. projects to
be displayed which have been transferred to the robot
controller since the display was opened.

7.12 Backup Manager

7.12.1 Overview of Backup Manager

Overview The Backup Manager makes it possible to back up and restore projects, option
packages and RDC data.
The default settings for the Backup Manager are defined in the Backup con-
figuration window. The settings can be changed.
(>>> 7.12.5 "Configuring Backup Manager" Page 258)

Start types There are several ways of starting a backup or restoration:

Backup Restoration
Manual Yes Yes
Automatic, in inter-
Yes No
vals
Via inputs Yes
(only possible in AUT Yes (only projects and option pack-
or AUT EXT mode) ages, no RDC data)

When a backup/restoration is running, no further backup/restoration can be


started. However, the start types are not mutually exclusive. If, for example,
an automatic backup is configured, a manual backup can still be executed.

254 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


7 Program and project management

Execution
Manual (>>> 7.12.2 "Manual backup of projects, option
packages and RDC data" Page 255)
(>>> 7.12.3 "Manually restoring projects and op-
tion packages" Page 256)
(>>> 7.12.4 "Restoring RDC data manually"
Page 257)
Automatic, in inter- If backups are to be started automatically, this
vals must be configured in the Backup configuration
window.
Via inputs If backups/restorations are to be started via in-
puts, this must be configured in the Backup con-
figuration window.

7.12.2 Manual backup of projects, option packages and RDC data

Description Projects
The following projects are backed up by default:
 Active project
 Initial project
 Base project
Option packages
Option packages will be backed up under the following conditions:
 The option package has a KOP file.
 The option package was originally added to the project in WorkVisual. The
project is now active on the robot controller.
Or:
The option package has been installed in the active project via Start-up >
Additional software. The option package was available during installa-
tion as a single KOP file (not as a directory structure!).
RDC data
Every time a backup is made, a file with the name [Robot_serial_number].RDC
is created. It contains the CAL, MAM and PID files. Not all files are present in
all cases (dependent on the robot).

Procedure  In the main menu, select File > Backup Manager, and then one of the fol-
lowing menu items:
 Back up
The target directory is D:\ProjectBackup as long as no other directory
has been configured. The path is automatically created if it does not
already exist.
 Or Save as...
A target directory can be selected here. It only applies to this backup.
The backup is carried out. The robot controller displays a message when the
backup has been successfully completed. It generates one message per proj-
ect or option package and one message relating to the RDC data.
However, option packages will not be backed up if the same package version
already exists in the target directory.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 255 / 491


KUKA System Software 8.3

7.12.3 Manually restoring projects and option packages

Description Projects
The following projects are restored by default:
 Active project (i.e. the project which was active during the backup)
 Initial project
 Base project
After manual restoration of the project, the robot controller reactivates the pre-
viously active project if certain preconditions are met. If not, the project re-
mains inactive. This can be activated by the user at the desired point in time.
After restoration of the project via inputs, the previously active project also re-
mains inactive.
Option packages
The option packages for which there are KOP files in the source directory are
not necessarily all restored. An option package will be restored under the fol-
lowing conditions:
 At the time of backup, the option package was present in the active proj-
ect.
 At the time of restoration, this version of the option package is not installed
on the robot controller.
Following restoration, some option packages automatically install themselves
when the corresponding project is activated.
Option packages that do not automatically install themselves are available for
installation under Start-up > Additional software. A message on the robot
controller indicates that the option package must still be installed.

Menu items There are 2 menu items available for restoration. They differ with regard to the
source directory that is accessed.
 Restore >
The source directory is D:\ProjectBackup as long as no other directory has
been configured.
 Or Restore from ... >
A source directory can be selected here. It only applies to this restoration.

Precondition
No special preconditions are required for the restoration as such. If a
project is to be activated, the following preconditions must be met.

 User group “Expert” or higher


If the activation would cause changes in the area Safety-relevant com-
munication parameters, the user group “Safety recovery” or higher must
be selected.
 In AUT or AUT EXT mode:
The project can only be activated if this affects only KRL programs. If the
project contains settings that would cause other changes, it cannot be ac-
tivated.

If one of the options KUKA.SafeOperation or KUKA.SafeRangeMon-


itoring is installed on the robot controller, different user groups may
apply. Information can be found in the documentation for these op-
tions.

256 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


7 Program and project management

Procedure in 1. In the main menu, select File > Backup Manager > Restore > Projects
AUT / AUT EXT and options.
mode Or:
Select File > Backup Manager > Restore from ... > Projects and op-
tions and then select the source directory.
2. The robot controller displays a message for each project and option pack-
age when the restoration has been successfully completed.
 When an option package has been restored, the package must first be
installed before the project can be activated. This is indicated by a
message on the robot controller.
 If no option package has been restored, the robot controller begins to
activate the project without a request for confirmation.
3. For the further activation steps, see: (>>> 7.11.2 "Activating a project"
Page 251)

Observe the safety instructions relating to project activation!

Procedure in 1. In the main menu, select File > Backup Manager > Restore > Projects
T1 / T2 mode and options.
Or:
Select File > Backup Manager > Restore from ... > Projects and op-
tions and then select the source directory.
2. The robot controller displays a message for each project and option pack-
age when the restoration has been successfully completed.
 When an option package has been restored, the package must first be
installed before the project can be activated. This is indicated by a
message on the robot controller.
 If no option package has been restored, the robot controller displays
the following request for confirmation:
Do you want to activate the project […]? In addition, a message is dis-
played as to whether the activation would overwrite a project, and if so,
which.
If no relevant project will be overwritten: Confirm with Yes within
30 minutes.
3. For the further activation steps, see: (>>> 7.11.2 "Activating a project"
Page 251)

Observe the safety instructions relating to project activation!

7.12.4 Restoring RDC data manually

Menu items There are 2 menu items available for restoration. They differ with regard to the
source directory that is accessed.
 Restore >
The source directory is D:\ProjectBackup as long as no other directory has
been configured.
 Or Restore from ... >
A source directory can be selected here. It only applies to this restoration.

Precondition  “Expert” user group

Procedure 1. In the main menu, select File > Backup Manager > Restore > RDC data.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 257 / 491


KUKA System Software 8.3

Or:
Select File > Backup Manager > Restore from ... > RDC data and then
select the source directory.
2. A window opens. Activate the check boxes next to the data that are to be
restored:
 PID file, MAM file and/or CAL file
If an entry is grayed out and the check box is not activated, this means that
this file is not available in the backup.
3. Confirm the selection with Restore.
Once the restoration has been completed, the following message is dis-
played: RDC data successfully restored from {0}.

7.12.5 Configuring Backup Manager

Precondition  “Expert” user group


 For changes to the Signal interface tab additionally:
T1 or T2 mode

Procedure 1. In the main menu, select File > Backup Manager > Backup configura-
tion.
The Backup configuration window is opened.
2. Carry out the desired changes in the tabs.
 Backup configuration contains the general settings.
Automatic saving can also be configured here if required.
 I/O control can also be configured under Signal interface if required.
3. Close the window.
4. Respond to the request for confirmation asking whether the changes
should be saved by pressing Yes.

258 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


7 Program and project management

7.12.5.1 “Backup configuration” tab

Backup configu-
ration

Fig. 7-16: “Backup configuration” tab

Item Description
1 Maximum number of subfolders for older backups
A backup does not overwrite existing backup files. Instead, a sub-
folder is automatically created and the files are transferred there.
When the maximum number of subfolders has been reached, the
oldest subfolder will be deleted during the next backup and a new
one will be created.
 0 … 50
Default: 5
2  Activated: The active project is backed up during backup.
During restoration, only the project which was active during the
backup will be restored.
 Deactivated (default): The following projects are backed up
during the backup: Active project, base project, initial project
These projects are restored during restoration.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 259 / 491


KUKA System Software 8.3

Item Description
3  Activated (default): During backup, the robot controller stores
the projects and RDC data in the directory [Target path for
project backup]\[Robot name]\.
The robot controller accesses this directory during restoration.
Note: Select this setting if more than one robot controller uses
the same target path.
 Deactivated: During backup, the robot controller stores the
projects and RDC data in the directory [Target path for proj-
ect backup]\.
The robot controller accesses this directory during restoration.
Note: Option packages are always stored under [Target path for
KOP backup]\OptionPackages\ irrespective of this setting.
4  Activated: The robot controller automatically carries out back-
ups. The following parameters determine the point in time:
Interval, Day, Time hh:mm
Note: After an automatic backup, the robot controller does not
display a message of successful completion.
If the robot controller was switched off at the configured time, it
carries out a backup as soon as it is switched on again. It only
carries out one backup, even if the time was missed more than
once.
 Deactivated (default): No automatic backup.
5  Activated (default): The target directory for backups and the
source directory for restorations is D:\ProjectBackup.
 Deactivated: The following parameters determine the target
directory for backups and the source directory for restorations:
Target path for project backup, Target path for KOP back-
up
The following parameters can only be edited if the option Back up and
restore locally (D:\ProjectBackup) is deactivated.
6 If during backup and/or restoration the robot controller must ac-
cess the network and an authentication is required, the data saved
here are used. If no authentication is required, the data have no ef-
fect.
 User: User name
Default: user
 Password: Password. On entry, only the number of characters
is displayed and not the characters themselves.
Default: kuka
7 For projects and RDC data: Target directory for backups and
source directory for restorations
It is possible to navigate to the desired directory or to enter it direct-
ly. In the latter case, the path is automatically created if it does not
already exist.
8 For KOP files: Target directory for backups and source directory for
restorations
It is possible to navigate to the desired directory or to enter it direct-
ly. In the latter case, the path is automatically created if it does not
already exist.

260 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


7 Program and project management

7.12.5.2 “Signal interface” tab

When a restoration is started via inputs, the robot controller – in con-


trast to manual restoration – does not activate the previously active
project. This can be activated by the user at the desired point in time.

Signal interface

Fig. 7-17: “Signal interface” tab

Item Description
1  Activated: Backups and restorations can be started via the in-
put signal configured under Start address.
 Deactivated (default): Start is not possible via input signal.
The following parameters can only be edited if the option Activate
Remote Backup/Restore is activated.
2  Activated: The signals defined under Start address are as-
signed the following long text names:
BM input signal, BM output signal
If the signals already have long text names, these are not over-
written.
 Deactivated (default): No long text names
If Activated was previously selected, Deactivated removes
the long text names.
3 Displays when the input signal starts a backup or restoration. (Dis-
play during the length of a signal)
(>>> "Input signals" Page 262)
4  Left-hand lamp: Status of the input Start address.
 Right-hand lamp: Status of the input Start address + 1.
Status (cannot be edited): Green = 1; Gray = 0

Issued: 14.01.2015 Version: KSS 8.3 SI V4 261 / 491


KUKA System Software 8.3

Item Description
5 Input signal consisting of the following inputs:
Start address and Start address + 1.
Default: 1 026
6 Displays the action being executed or the result.
(>>> "Output signals" Page 262)
7  Left-hand lamp: Status of the output Start address.
 Right-hand lamp: Status of the output Start address + 1.
Status (cannot be edited): Green = 1; Gray = 0
8 Output signal consisting of the following outputs:
Start address and Start address + 1.
Default: 4 095
9 Duration for which output signal 01 or 11 is present before the ro-
bot controller sets 00 again
Unit: ms
Default: 5,000 ms

Input signals
Signal → Created actions / display in the Status box
00 No action / Idle
01 Starts a backup / Backup
10 Starts a restoration / Restore
11 Undefined state

A continuously active input signal does not cause the action to repeat.
When a backup/restoration is running, no further backup/restoration can be
started.

Output signals The signals 01 and 11 are present during the time configured in Pulse dura-
tion [ms], after which point the signal switches to 00.

Action / Result → Created signal / display in the Status box


No action running 00 / Idle
Backup running 10 / Backup
Restoration running 10 / Restore
Backup successful 01 / BackupSuccess
Restoration successful 01 / RestoreSuccess
Backup unsuccessful 11 / BackupError
Restoration unsuc- 11 / RestoreError
cessful

262 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


8 Program execution

8 Program execution

8.1 Selecting the program run mode


x

Procedure 1. Touch the Program run mode status indicator. The Program run mode
window is opened.
2. Select the desired program run mode.
(>>> 8.2 "Program run modes" Page 263)
The window closes and the selected program run mode is applied.

8.2 Program run modes

Status
Designation Description
indicator
Go The program is executed through to
the end without stopping.
#GO
Motion The program is executed with a stop at
each point, including auxiliary points
#MSTEP
and spline segment points. The Start
key must be pressed again for each
point. The program is executed without
advance processing.
Single Step The program is executed with a stop
after each program line. The motion is
#ISTEP
also stopped after program lines that
cannot be seen and after blank lines.
The Start key must be pressed again
for each line. The program is executed
without advance processing.
Single Step is only available to the
user group “Expert”.
Backward This program run mode is automati-
cally selected if the Start backwards
#BSTEP
key is pressed. It is not possible to
select a different mode.
This mode works in the same way as
Motion, but with the following excep-
tion: CIRC motions are executed back-
wards in the same way as they were
last executed forwards, i.e. if the for-
ward motion was not stopped at the
auxiliary point, nor will the backward
motion be stopped there.
This exception does not apply in the
case of SCIRC motions. Here, the
backward motion is always stopped at
the auxiliary point.

The following additional program run modes are available for systems integra-
tors.
These program run modes can only be selected via the variable correction
function. System variable for the program run mode: $PRO_MODE.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 263 / 491


KUKA System Software 8.3

Status
Designation Description
indicator
Program Step The program is executed step by step
without advance processing. Subpro-
#PSTEP
grams are executed completely.
Continuous Step Approximate positioning points are
executed with advance processing, i.e.
#CSTEP
they are approximated.
Exact positioning points are executed
without advance processing and with a
stop after the motion instruction.

8.3 Advance run

The advance run is the maximum number of motion blocks that the robot con-
troller calculates and plans in advance during program execution. The actual
number is dependent on the capacity of the computer.
The advance run refers to the current position of the block pointer. It is set via
the system variable $ADVANCE:
 Default value: 3
 Maximum value: 5
The advance run is required, for example, in order to be able to calculate ap-
proximate positioning motions. If $ADVANCE = 0 is set, approximate position-
ing is not possible.
Certain statements trigger an advance run stop. These include statements
that influence the periphery, e.g. OUT statements.

8.4 Block pointer

Overview During program execution, the block pointer indicates various items of infor-
mation:
 Which motion the robot is currently executing or has completed
 Whether an auxiliary point or end point is currently being approached
 The direction in which the robot is executing the program

Pointer Direction Description


Forwards The end point is being approached.

Backwards

Forwards The end point has been reached with exact


positioning.
Backwards

Forwards The auxiliary point is being approached.

Backwards

Forwards The auxiliary point has been reached with


exact positioning.
Backwards

264 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


8 Program execution

Examples for
forward motion

Fig. 8-1: The robot is moving from P3 to P4

Fig. 8-2: The robot has reached P4 with exact positioning

Fig. 8-3: The robot is moving from P5 to auxiliary point P6

Fig. 8-4: The robot has reached auxiliary point P6 with exact positioning

Fig. 8-5: The robot is moving from auxiliary point P6 to P7

Fig. 8-6: The robot has reached P7 with exact positioning

Issued: 14.01.2015 Version: KSS 8.3 SI V4 265 / 491


KUKA System Software 8.3

Examples for
backward motion

Fig. 8-7: The robot is moving from P8 to P7

Fig. 8-8: The robot has reached P7 with exact positioning

Fig. 8-9: The robot is moving from P7 to auxiliary point P6

Fig. 8-10: The robot has reached auxiliary point P6 with exact position-
ing

Double upward/ If the program window shows a section in which the block pointer is not cur-
downward arrow rently located, a double arrow indicates the direction in which it is to be found.

Fig. 8-11: The block pointer is located higher up in the program

Fig. 8-12: The block pointer is located lower down in the program

266 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


8 Program execution

8.5 Setting the program override (POV)

Description Program override is the velocity of the robot during program execution. The
program override is specified as a percentage of the programmed velocity.
In T1 mode, the maximum velocity is 250 mm/s, irrespective of the value that
is set.

Procedure 1. Touch the POV/HOV status indicator. The Overrides window is opened.
2. Set the desired program override. It can be set using either the plus/minus
keys or by means of the slide controller.
 Plus/minus keys: The value can be set to 100%, 75%, 50%, 30%,
10%, 3%, 1%
 Slide controller: The override can be adjusted in 1% steps.
3. Touch the POV/HOV status indicator again. (Or touch the area outside the
window.)
The window closes and the selected override value is applied.

The Jog options window can be opened via Options in the Over-
rides window.

Alternative Alternatively, the override can be set using the plus/minus key on the right of
procedure the smartPAD.
The value can be set to 100%, 75%, 50%, 30%, 10%, 3%, 1%.

8.6 Robot interpreter status indicator

Icon Color Description


Gray No program is selected.

Yellow The block pointer is situated on the first line


of the selected program.

Green The program is selected and is being exe-


cuted.

Red The selected and started program has been


stopped.

Black The block pointer is situated at the end of


the selected program.

8.7 Starting a program forwards (manual)

Precondition  A program is selected.


 Operating mode T1 or T2

Procedure 1. Select the program run mode.


2. Hold the enabling switch down and wait until the status bar indicates
“Drives ready”:

Issued: 14.01.2015 Version: KSS 8.3 SI V4 267 / 491


KUKA System Software 8.3

Fig. 8-13

3. Carry out a BCO run: Press Start key and hold it down until the message
“Programmed path reached (BCO)” is displayed in the message window. The
robot stops.

The BCO run is executed as a LIN or PTP motion from


the actual position to the target position. The velocity is
automatically reduced. The path of the motion cannot be predicted reliably.
Observe the motion during the BCO run so that the robot can be stopped in
time if a collision becomes imminent.

4. Press Start key and hold it down.


The program is executed with or without stops, depending on the program
run mode.
To stop a program that has been started manually, release the Start key.

8.8 Starting a program forwards (automatic)

Precondition  A program is selected.


 Operating mode Automatic (not Automatic External)

Procedure 1. Select the program run mode Go.


2. Switch on the drives.
3. Carry out a BCO run:
Press Start key and hold it down until the message “Programmed path
reached (BCO)” is displayed in the message window. The robot stops.

The BCO run is executed as a LIN or PTP motion from


the actual position to the target position. The velocity is
automatically reduced. The path of the motion cannot be predicted reliably.
Observe the motion during the BCO run so that the robot can be stopped in
time if a collision becomes imminent.

4. Press the Start key. The program is executed.


To stop a program that has been started in Automatic mode, press the STOP
key.

8.9 Carrying out a block selection

Description A program can be started at any point by means of a block selection.

Precondition  A program is selected.


 Operating mode T1 or T2

Procedure 1. Select the program run mode.


2. Select the motion block at which the program is to be started.
3. Press Block selection. The block pointer indicates the motion block.
4. Hold the enabling switch down and wait until the status bar indicates
“Drives ready”:

268 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


8 Program execution

5. Carry out a BCO run: Press Start key and hold it down until the message
“Programmed path reached (BCO)” is displayed in the message window. The
robot stops.

The BCO run is executed as a LIN or PTP motion from


the actual position to the target position. The velocity is
automatically reduced. The path of the motion cannot be predicted reliably.
Observe the motion during the BCO run so that the robot can be stopped in
time if a collision becomes imminent.

6. The program can now be started manually or automatically. It is not nec-


essary to carry out a BCO run again.

8.10 Resetting a program

Description In order to restart an interrupted program from the beginning, it must be reset.
This returns the program to the initial state.

Precondition  Program is selected.

Procedure  Select the menu sequence Edit > Reset program.

Alternative  In the status bar, touch the Robot interpreter status indicator. A window
procedure opens.
Select Reset program.

8.11 Starting Automatic External mode

There is no BCO run in Automatic External mode. This


means that the robot moves to the first programmed po-
sition after the start at the programmed (not reduced) velocity and does not
stop there.

Precondition  Operating mode T1 or T2


 Inputs/outputs for Automatic External are configured.
 The program CELL.SRC is configured.

Procedure 1. Select the program CELL.SRC in the Navigator. (This program is located
in the folder “R1”.)
2. Set program override to 100%. (This is the recommended setting. A differ-
ent value can be set if required.)
3. Carry out a BCO run:
Hold down the enabling switch. Then press the Start key and hold it down
until the message “Programmed path reached (BCO)” is displayed in the
message window.

The BCO run is executed as a LIN or PTP motion from


the actual position to the target position. The velocity is
automatically reduced. The path of the motion cannot be predicted reliably.
Observe the motion during the BCO run so that the robot can be stopped in
time if a collision becomes imminent.

4. Select “Automatic External” mode.


5. Start the program from a higher-level controller (PLC).
To stop a program that has been started in Automatic mode, press the STOP
key.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 269 / 491


KUKA System Software 8.3

8.12 Backward motion using the Start backwards key

The following applies to backward motion using the Start backwards key. It
does not apply to other backward motion functionalities, e.g. backward motion
as part of fault strategies in technology packages.

8.12.1 Executing motions backwards

Description Backward motion is often used if a sequence of motions is to be optimized and


individual points are to be re-taught for this purpose. The user executes the
path backwards until the point that is to be corrected has been reached. Once
the point has been re-taught, backward motion is continued if required in order
to correct further points.
The program run mode #BSTEP is automatically applied for backward motion.
Approximate positioning and weaving are not possible during backward mo-
tion. If approximate positioning or weaving were carried out for points during
forward execution, the backward path will thus differ from the forward path. It
is thus possible that the robot may have to perform a BCO run after starting
backward motion, even though it did not leave the path during forward motion.

The BCO run is executed as a LIN or PTP motion from


the actual position to the target position. The velocity is
automatically reduced. The path of the motion cannot be predicted reliably.
Observe the motion during the BCO run so that the robot can be stopped in
time if a collision becomes imminent.

Precondition  A program is selected.


 The motions that are to be executed backwards have been executed for-
wards.
 T1 or T2 mode

Procedure 1. Hold the enabling switch down and wait until the status bar indicates
“Drives ready”:

2. Press and hold down the Start backwards key.


 If the robot is already on the backward path, it now moves backwards.
 If the robot is not on the backward path, it now moves to it. When
“Programmed path reached (BCO)” is displayed in the message window,
it has reached the path. The robot stops.
Press the Start backwards key again. The robot now moves back-
wards.
3. Press the Start backwards key again for each motion block.

8.12.2 Functional principle and characteristics of backward motion

Functional During forward motion, the robot controller saves the executed motions in a
principle ring buffer. During backward motion, the motions are executed on the basis of
the saved information.
No backward motion possible once the buffer has been deleted:
The contents of the buffer are deleted in the following cases. Backward motion
is not possible again until motions have been executed in the forward direction
again.

270 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


8 Program execution

 Program is reset.
 Program is deselected.
 Lines are inserted into the program or deleted.
 KRL instruction RESUME
 Block selection to a motion other than the current one.
What is possible without restriction, however, is a block selection to any
segment point within the current spline block. This counts as block selec-
tion to the current motion, as the robot controller plans and executes the
spline block as one motion.
The robot controller deletes the buffer without generating a corresponding
message.

Characteristics  Backward motion is only possible in modes T1 and T2.


 Only motions are executed during backward motion, and no control struc-
tures or control instructions.
 Outputs, flags and cyclical flags are not recorded during forward motion.
For this reason, their previous states are not restored during backward
motion.
 The velocity is the same as for forward motion.
In T2, it is possible that monitoring functions may be triggered during back-
ward motion that are not triggered during forward motion. In this case, the
program override must be reduced.
Backward motion can be deactivated. Further configuration options are also
available.
(>>> 6.16 "Configuring backward motion" Page 188)
DELETE_BACKWARD_BUFFER() can be used to prevent backward motion for
specific motions.
(>>> 11.14.1 "DELETE_BACKWARD_BUFFER()" Page 441)

Torque/force The following applies to motions with torque or force mode or VectorMove:
mode,  Backward motion is possible for conventional motions, but force/torque
VectorMove mode or VectorMove is automatically deactivated.
 Spline motions cannot be executed backwards.

In the case of more complex applications with torque


mode (e.g. press ejection) and/or VectorMove, backward
motion is generally not recommended, as the underlying processes are not
usually reversible.
In such cases, it is advisable to prevent backward motion using
DELETE_BACKWARD_BUFFER(). Damage to property may otherwise re-
sult.

8.12.2.1 Response in the case of subprograms

 Motions executed forwards in an interrupt program are not recorded. They


cannot, therefore, be executed backwards.
 If a subprogram has been completely executed during forward motion, it
cannot be executed with backward motion.
 If the forward motion was stopped in a subprogram, the response depends
on the position of the advance run pointer:

Issued: 14.01.2015 Version: KSS 8.3 SI V4 271 / 491


KUKA System Software 8.3

Position of the advance run Response


pointer
Advance run pointer is in the sub- Backward motion is possible.
program.
Advance run pointer has already Backward motion is not possible.
left the subprogram.
Prevention:
Trigger an advance run stop before
the END of the subprogram, e.g.
with WAIT SEC 0. However, it is
then no longer possible to carry out
approximate positioning at this
point.
Or set $ADVANCE to "1". This does
not always prevent the error mes-
sage, but it reduces the probability.
Approximate positioning is still pos-
sible.

8.12.2.2 Approximate positioning response

Description Approximate positioning is not possible during backward motion. If approxi-


mate positioning was carried out for points during forward execution, the back-
ward path will thus differ from the forward path. It is thus possible that the robot
may have to perform a BCO run for the backward path after starting backward
motion, even though it did not leave the path during forward motion.

Example 1 Backward start outside an approximate positioning range:


The Start backwards key is pressed while the robot is on the path, but not in
an approximate positioning range. The robot now moves backwards on the
path to the end point of the previous motion.
PBACK = position of the robot at the moment at which the Start backwards key
is pressed

Fig. 8-14: Case 1: Backward start outside an approximate positioning


range

If the end point of the previous motion is approximated, it is nonetheless ad-


dressed with exact positioning.

272 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


8 Program execution

Fig. 8-15: Case 2: Backward start outside an approximate positioning


range

Example 2 Backward start in the approximate positioning range:


The Start backwards key is pressed while the robot is in an approximate posi-
tioning range. The robot now performs a BCO run to the start of the approxi-
mate positioning range and stops there. If the Start backwards key is now
pressed again, the actual backward motion begins, i.e. the robot moves back-
wards along the path to the end point of the previous motion.

Fig. 8-16: Backward start in the approximate positioning range

8.12.2.3 Response in the case of weave motions

Description Weaving is not possible during backward motion. If weaving was carried out
during forward execution, the backward path will thus differ from the forward
path. The robot must therefore perform a BCO run for the backward path after
starting backward motion, even though it did not leave the path during forward
motion.

Example Backward start on weave path:


The Start backwards key is pressed while the robot is weaving. The robot now
performs a BCO run to the taught path and stops there. If the Start backwards
key is now pressed again, the actual backward motion begins, i.e. the robot
moves backwards along the path to the end point of the previous motion.
PBACK = position of the robot at the moment at which the Start backwards key
is pressed

Issued: 14.01.2015 Version: KSS 8.3 SI V4 273 / 491


KUKA System Software 8.3

Fig. 8-17: Backward start on weave path

8.12.2.4 Switching from backwards to forwards

Precondition It is only possible to resume forward motion following backward motion if the
following preconditions are met:
 Block selection is possible to the program line on which the backward
block pointer is currently located.
 If the first motion to be executed forwards again is a conventional motion,
it must be completely programmed.
It is thus not possible, for example, to switch from backward motion to for-
ward motion if the first motion is a PTP_REL motion.
With few exceptions, this restriction does not apply in the case of spline
motions.

Response When the Start forward key is pressed for the first time following backward mo-
tion, the response is as follows:
 If BCO exists, the program run mode most recently used in the forward di-
rection is automatically restored and the robot moves forwards on the
path.
 If BCO does not exist, a BCO run is carried out. The program run mode
meanwhile remains set to #BSTEP. After the BCO run, the robot stops.
The Start forwards key must now be pressed again. The program run
mode most recently used in the forward direction is automatically restored
and the robot now moves forwards on the path.
If the switch from backwards to forwards occurs in a control structure, the robot
first moves forwards to the end of the control structure. It then stops with the
message Control structure next block {Block number}. The block number
specifies the first block after the control structure.

8.12.3 System variables with changed meaning

The meaning of certain system variables relating to backward motion has


changed with effect from V8.3.6. In some cases, they no longer have any ef-
fect, but still exist for reasons of compatibility with older versions.
The system variables that start with “$VW_…” exist not only in the VSS, but
also in the KSS.

274 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


8 Program execution

Designation Meaning in V8.3.6 and higher


$BWD_INFO Contains the current configuration for back-
ward motion as a bitmap. Numerous technol-
ogy packages read this variable.
The variable can only be read.
$BWDSTART This variable only still exists for reasons of
compatibility. It can be set to TRUE or
FALSE, but this has no effect.
$VW_BACKWARD Corresponds to the attribute ENABLE of the
configuration element BACKWARD_STEP.
The variable can only be read.
$VW_CYCFLAG Always supplies the value 0.
This variable only still exists for reasons of
compatibility and can only be read.
$VW_MOVEMENT Corresponds to the attribute MOVEMENTS
of the configuration element
BACKWARD_STEP.
The variable can only be read.
$VW_RETRACE_AMF Always supplies the value FALSE.
This variable only still exists for reasons of
compatibility and can only be read.
$LOAD_BWINI Always supplies the value FALSE.
This variable only still exists for reasons of
compatibility and can only be read.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 275 / 491


KUKA System Software 8.3

276 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

9 Basic principles of motion programming


s

9.1 Overview of motion types

The following motion types can be programmed:


 Point-to-point motions (PTP)
(>>> 9.2 "Motion type PTP" Page 277)
 Linear motions (LIN)
(>>> 9.3 "Motion type LIN" Page 278)
 Circular motions (CIRC)
(>>> 9.4 "Motion type CIRC" Page 278)
 Spline motions
Spline motions have a number of advantages over conventional PTP, LIN
and CIRC motions.
(>>> 9.7 "Spline motion type" Page 283)

The start point of a motion is always the end point of the previous mo-
tion.

The following motions are known as CP (“Continuous Path”) motions.


 LIN, CIRC, CP spline blocks, SLIN, SCIRC

9.2 Motion type PTP

The robot guides the TCP along the fastest path to the end point. The fastest
path is generally not the shortest path and is thus not a straight line. As the
motions of the robot axes are rotational, curved paths can be executed faster
than straight paths.
The exact path of the motion cannot be predicted.

Fig. 9-1: PTP motion

Issued: 14.01.2015 Version: KSS 8.3 SI V4 277 / 491


KUKA System Software 8.3

9.3 Motion type LIN

The robot guides the TCP at a defined velocity along a straight path to the end
point.

Fig. 9-2: LIN motion

9.4 Motion type CIRC

The robot guides the TCP at a defined velocity along a circular path to the end
point. The circular path is defined by a start point, auxiliary point and end point.

Fig. 9-3: CIRC motion

278 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

9.5 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 with a PTP motion
The TCP leaves the path that would lead directly to the end point and moves
along a faster path. During programming of the motion, the maximum distance
from the end point at which the TCP may deviate from its original path is de-
fined.
The path of an approximated PTP motion cannot be predicted. It is also not
possible to predict on which side of the approximated point the path will run.

Fig. 9-4: PTP motion, P2 is approximated

Approximate positioning with a LIN motion


The TCP leaves the path that would lead directly to the end point and moves
along a shorter path. During programming of the motion, the maximum dis-
tance from the end point at which the TCP may deviate from its original path
is defined.

Fig. 9-5: LIN motion, P2 is approximated

Approximate positioning with a CIRC motion


The TCP leaves the path that would lead directly to the end point and moves
along a shorter path. During programming of the motion, the maximum dis-
tance from the end point at which the TCP may deviate from its original path
is defined.
The motion passes exactly through the auxiliary point.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 279 / 491


KUKA System Software 8.3

Fig. 9-6: CIRC motion, PEND is approximated

9.6 Orientation control LIN, CIRC

Description The orientation of the TCP can be different at the start point and end point of
a motion. There are several different types of transition from the start orienta-
tion to the end orientation. A type must be selected when a CP motion is pro-
grammed.
The orientation control for LIN and CIRC motions is defined as follows:
 In the option window Motion parameters
(>>> 10.2.8 "Option window “Motion parameters” (LIN, CIRC, PTP)"
Page 311)
 Or via the system variable $ORI_TYPE

LIN motion
Orientation control Description
 Option window: The orientation of the TCP remains con-
Constant orientation stant during the motion.
 $ORI_TYPE = #CON- The programmed orientation is disregarded
STANT for the end point and that of the start point
is retained.
 Option window: The orientation of the TCP changes contin-
Standard uously during the motion.
 $ORI_TYPE = #VAR Note: If, with Standard, the robot passes
through a wrist axis singularity, use Wrist
PTP instead.
 Option window: The orientation of the TCP changes contin-
Wrist PTP uously during the motion. This is done by
 $ORI_TYPE = #JOINT linear transformation (axis-specific motion)
of the wrist axis angles.
Note: Use Wrist PTP if, with Standard, the
robot passes through a wrist axis singular-
ity.
The orientation of the TCP changes contin-
uously during the motion, but not uniformly.
Wrist PTP is thus not suitable if a specific
orientation must be maintained exactly, e.g.
in the case of laser welding.

280 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

Fig. 9-7: Constant orientation

Fig. 9-8: Standard or Wrist PTP

CIRC motion During CIRC motions, the robot controller only takes the programmed orienta-
tion of the end point into consideration. The programmed orientation of the
auxiliary point is disregarded.
The same orientation control options are available for selection for CIRC mo-
tions as for LIN motions.
It is also possible to define for CIRC motions whether the orientation control is
to be base-related or path-related. This is defined via the system variable
$CIRC_TYPE.

Orientation control Description


$CIRC_TYPE = #BASE Base-related orientation control during the
circular motion
$CIRC_TYPE = #PATH Path-related orientation control during the
circular motion

$CIRC_TYPE is meaningless if $ORI_TYPE = #JOINT.

(>>> 9.6.1 "Combinations of $ORI_TYPE and $CIRC_TYPE" Page 281)

9.6.1 Combinations of $ORI_TYPE and $CIRC_TYPE

$ORI_TYPE = #CONSTANT, $CIRC_TYPE = #PATH:

Issued: 14.01.2015 Version: KSS 8.3 SI V4 281 / 491


KUKA System Software 8.3

Fig. 9-9: Constant orientation, path-related

$ORI_TYPE = #VAR, $CIRC_TYPE = #PATH:

Fig. 9-10: Variable orientation, path-related

$ORI_TYPE = #CONSTANT, $CIRC_TYPE = #BASE:

Fig. 9-11: Constant orientation, base-related

282 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

$ORI_TYPE = #VAR, $CIRC_TYPE = #BASE:

Fig. 9-12: Variable orientation, base-related

9.7 Spline motion type

Spline is a motion type that is particularly suitable for complex, curved paths.
Such paths can also be generated using approximated LIN and CIRC motions,
but splines have advantages, however.
The most versatile spline motion is the spline block. A spline block is used to
group together several motions as an overall motion. The spline block is
planned and executed by the robot controller as a single motion block.
The motions that may be included in a spline block are called spline segments.
They are taught separately.
 A CP spline block can contain SPL, SLIN and SCIRC segments.
 A PTP spline block can contain SPTP segments.
In addition to spline blocks, individual spline motions can also be programmed:
SLIN, SCIRC and SPTP.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 283 / 491


KUKA System Software 8.3

Advantages of
spline blocks

Fig. 9-13: Curved path with spline block

 The path is defined by means of points that are located on the path. The
desired path can be generated easily.
 The programmed velocity is maintained better than with conventional mo-
tion types. There are few cases in which the velocity is reduced.
(>>> 9.7.1 "Velocity profile for spline motions" Page 285)
Furthermore, special constant velocity ranges can be defined in CP spline
blocks.
 The path always remains the same, irrespective of the override setting, ve-
locity or acceleration.
 Circles and tight radii are executed with great precision.

Disadvantages of
LIN/CIRC

Fig. 9-14: Curved path with approximated LIN motions

 The path is defined by means of approximated points that are not located
on the path. The approximate positioning ranges are difficult to predict.
Generating the desired path is complicated and time-consuming.

284 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

 In many cases, the velocity may be reduced in a manner that is difficult to


predict, e.g. in the approximate positioning ranges and near points that are
situated close together.
 The path changes if approximate positioning is not possible, e.g. for time
reasons.
 The path changes in accordance with the override setting, velocity or ac-
celeration.

9.7.1 Velocity profile for spline motions

The path always remains the same, irrespective of the override setting, veloc-
ity or acceleration.
The robot controller already takes the physical limits of the robot into consid-
eration during planning. The robot moves as fast as possible within the con-
straints of the programmed velocity, i.e. as fast as its physical limits will allow.
This is an advantage over conventional LIN and CIRC motions for which the
physical limits are not taken into consideration during planning. It is only during
motion execution that these limits have any effect and can cause stops to be
triggered.
Reduction of the velocity
Prime examples of cases in which the velocity has to fall below the pro-
grammed velocity include:
 Tight corners
 Major reorientation
 Large motions of the external axes
 Motion in the vicinity of singularities
Reduction of the velocity due to major reorientation can be avoided with spline
segments by selecting the orientation control option Ignore orientation.
Reduction of the velocity due to major external axis motions can be avoided
for spline segments with $EX_AX_IGNORE.
Reduction of the velocity to 0
This is the case for:
 Successive points with the same coordinates.
 Successive SLIN and/or SCIRC segments. Cause: inconstant velocity di-
rection.
In the case of SLIN-SCIRC transitions, the velocity is also reduced to 0 if
the straight line is a tangent of the circle, as the circle, unlike the straight
line, is curved.

Fig. 9-15: Exact positioning at P2

Issued: 14.01.2015 Version: KSS 8.3 SI V4 285 / 491


KUKA System Software 8.3

Fig. 9-16: Exact positioning at P2

Exceptions:
 In the case of successive SLIN segments that result in a straight line and
in which the orientations change uniformly, the velocity is not reduced.

Fig. 9-17: P2 is executed without exact positioning.

 In the case of a SCIRC-SCIRC transition, the velocity is not reduced if both


circles have the same center point and the same radius and if the orienta-
tions change uniformly. (This is difficult to teach, so calculate and program
points.)

Circles with the same center point and the same radius are some-
times programmed to obtain circles ≥ 360°. A simpler method is to
program a circular angle.

9.7.2 Block selection with spline motions

Spline block Block selection can be made to the segments of a spline block.
 CP spline block:
The BCO run is executed as a conventional LIN motion. This is indicated
by means of a message that must be acknowledged.
 PTP spline block:
The BCO run is executed as a conventional PTP motion. This is not indi-
cated by a message.
Following a block selection, the path is generally the same as if the spline were
to be executed during normal program execution.
Exceptions are possible if the spline has never yet been executed prior to the
block selection and the block selection is made here to the start of the spline
block:
The start point of the spline motion is the last point before the spline block, i.e.
the start point is outside the block. The robot controller saves the start point
during normal execution of a spline. In this way, it is already known in the case
of a block selection being carried out subsequently. If the spline block has nev-
er yet been executed, however, the start point is unknown.
If the Start key is pressed after the BCO run, the modified path is indicated by
means of a message that must be acknowledged.
Example: modified path in the case of block selection to P1

286 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

Fig. 9-18: Example: modified path in the case of block selection to P1

1 PTP P0
2 SPLINE
3 SPL P1
4 SPL P2
5 SPL P3
6 SPL P4
7 SCIRC P5, P6
8 SPL P7
9 SLIN P8
10 ENDSPLINE

Line Description
2 Header/start of the CP spline block
3…9 Spline segments
10 End of the CP spline block

SCIRC In the case of block selection to a SCIRC segment for which a circular angle
has been programmed, the motion is executed to the end point, taking into
consideration the circular angle, provided that the robot controller knows the
start point.
If the robot controller does not know the start point, the motion is executed to
the programmed end point. In this case, a message is generated, indicating
that the circular angle is not being taken into consideration.
In the case of a block selection to an individual SCIRC motion, the circular an-
gle is never taken into consideration.

9.7.3 Modifications to spline blocks

Description  Modification of the position of the point:


If a point within a spline block is offset, the path is modified, at most, in the
2 segments before this point and the 2 segments after it.
Small point offsets generally result in small modifications to the path. If,
however, very long segments are followed by very short segments or vice
versa, small modifications can have a very great effect.
 Modification of the segment type:
If an SPL segment is changed into an SLIN segment or vice versa, the
path changes in the previous segment and the next segment.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 287 / 491


KUKA System Software 8.3

Example 1 Original path:


PTP P0
SPLINE
SPL P1
SPL P2
SPL P3
SPL P4
SCIRC P5, P6
SPL P7
SLIN P8
ENDSPLINE

Fig. 9-19: Original path

A point is offset relative to the original path:


P3 is offset. This causes the path to change in segments P1 - P2, P2 - P3 and
P3 - P4. Segment P4 - P5 is not changed in this case, as it belongs to an
SCIRC and a circular path is thus defined.

Fig. 9-20: Point has been offset

The type of a segment is changed relative to the original path:


In the original path, the segment type of P2 - P3 is changed from SPL to SLIN.
The path changes in segments P1 - P2, P2 - P3 and P3 - P4.
PTP P0
SPLINE
SPL P1
SPL P2

288 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

SLIN P3
SPL P4
SCIRC P5, P6
SPL P7
SLIN P8
ENDSPLINE

Fig. 9-21: Segment type has been changed

Example 2 Original path:


...
SPLINE
SPL {X 100, Y 0, ...}
SPL {X 102, Y 0}
SPL {X 104, Y 0}
SPL {X 204, Y 0}
ENDSPLINE

Fig. 9-22: Original path

A point is offset relative to the original path:


P3 is offset. This causes the path to change in all the segments illustrated.
Since P2 - P3 and P3 - P4 are very short segments and P1 - P2 and P4 - P5
are long segments, the slight offset causes the path to change greatly.
...
SPLINE
SPL {X 100, Y 0, ...}
SPL {X 102, Y 1}
SPL {X 104, Y 0}
SPL {X 204, Y 0}
ENDSPLINE

Issued: 14.01.2015 Version: KSS 8.3 SI V4 289 / 491


KUKA System Software 8.3

Fig. 9-23: Point has been offset

Remedy:
 Distribute the points more evenly
 Program straight lines (except very short ones) as SLIN segments

9.7.4 Approximation of spline motions

All spline blocks and all individual spline motions can be approximated with
one another. It makes no difference whether they are CP or PTP spline blocks,
nor is the motion type of the individual motion relevant.
The motion type of the approximate positioning arc always corresponds to the
second motion. In the case of SPTP-SLIN approximation, for example, the ap-
proximate positioning arc is of type CP.
Spline motions cannot be approximated with conventional motions (LIN,
CIRC, PTP).
Approximation not possible due to time or advance run stops:
If approximation is not possible for reasons of time or due to an advance run
stop, the robot waits at the start of the approximate positioning arc.
 In the case of time reasons: the robot moves again as soon as it has been
possible to plan the next block.
 In the case of an advance run stop: the end of the current block is reached
at the start of the approximate positioning arc. This means that the ad-
vance run stop is canceled and the robot controller can plan the next block.
Robot motion is resumed.
In both cases, the robot now moves along the approximate positioning arc. Ap-
proximate positioning is thus technically possible; it is merely delayed.
This response differs from that for LIN, CIRC or PTP motions. If approximate
positioning is not possible for the reasons specified, the motion is executed to
the end point with exact positioning.
No approximate positioning in MSTEP and ISTEP:
In the program run modes MSTEP and ISTEP, the robot stops exactly at the
end point, even in the case of approximated motions.
In the case of approximate positioning from one spline block to another spline
block, the result of this exact positioning is that the path is different in the last
segment of the first block and in the first segment of the second block from the
path in program run mode GO.
In all other segments of both spline blocks, the path is identical in MSTEP,
ISTEP and GO.

9.7.5 Replacing an approximated CP motion with a spline block

Description In order to replace approximated conventional CP motions with spline blocks,


the program must be modified as follows:
 Replace LIN - LIN with SLIN - SPL - SLIN.

290 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

 Replace LIN - CIRC with SLIN - SPL - SCIRC.


Recommendation: Allow the SPL to project a certain way into the original
circle. The SCIRC thus starts later than the original CIRC.
In approximated motions, the corner point is programmed. In the spline block,
the points at the start and end of the approximation are programmed instead.
The following approximated motion is to be reproduced:
LIN P1 C_DIS
LIN P2

Spline motion:
SPLINE
SLIN P1A
SPL P1B
SLIN P2
ENDSPLINE

P1A = start of approximation, P1B = end of approximation

Fig. 9-24: Approximated motion - spline motion

Ways of determining P1A and P1B:


 Execute the approximated path and save the positions at the desired point
by means of Trigger.
 Calculate the points in the program with KRL.
 The start of the approximation can be determined from the approximate
positioning criterion. Example: If C_DIS is specified as the approximate
positioning criterion, the distance from the start of the approximation to the
corner point corresponds to the value of $APO.CDIS.
The end of the approximation is dependent on the programmed velocity.
The SPL path does not correspond exactly to the approximate positioning arc,
even if P1A and P1B are exactly at the start/end of the approximation. In order
to recreate the exact approximate positioning arc, additional points must be in-
serted into the spline. Generally, one point is sufficient.

Example The following approximated motion is to be reproduced:


$APO.CDIS=20
$VEL.CP=0.5

Issued: 14.01.2015 Version: KSS 8.3 SI V4 291 / 491


KUKA System Software 8.3

LIN {Z 10} C_DIS


LIN {Y 60}

Spline motion:
SPLINE WITH $VEL.CP=0.5
SLIN {Z 30}
SPL {Y 30, Z 10}
SLIN {Y 60}
ENDSPLINE

The start of the approximate positioning arc has been calculated from the ap-
proximate positioning criterion.

Fig. 9-25: Example: Approximated motion - spline motion 1

The SPL path does not yet correspond exactly to the approximate positioning
arc. For this reason, an additional SPL segment is inserted into the spline.
SPLINE WITH $VEL.CP=0.5
SLIN {Z 30}
SPL {Y 15, Z 15}
SPL {Y 30, Z 10}
SLIN {Y 60}
ENDSPLINE

292 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

Fig. 9-26: Example: Approximated motion - spline motion 2

With the additional point, the path now corresponds to the approximate posi-
tioning arc.

9.7.5.1 SLIN-SPL-SLIN transition

In the case of a SLIN-SPL-SLIN segment sequence, it is usually desirable for


the SPL segment to be located within the smaller angle between the two
straight lines. Depending on the start and end point of the SPL segment, the
path may also move outside this area.

Fig. 9-27: SLIN-SPL-SLIN

The path remains inside if the following conditions are met:


 The extensions of the two SLIN segments intersect.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 293 / 491


KUKA System Software 8.3

 2/3 ≤ a/b ≤ 3/2


a = distance from start point of the SPL segment to intersection of the SLIN
segments
b = distance from intersection of the SLIN segments to end point of the
SPL segment

9.8 Orientation control for CP spline motions

Description The orientation of the TCP can be different at the start point and end point of
a motion. When a CP spline motion is programmed, it is necessary to select
how to deal with the different orientations.
The orientation control type is defined as follows:
 If programming with KRL syntax: by means of the system variable
$ORI_TYPE
 If programming with inline forms: in the option window Motion parameters

Orientation control Description


 Option window: The orientation of the TCP remains constant during the motion.
Constant orientation
The orientation of the start point is retained. The programmed ori-
 $ORI_TYPE = #CON- entation of the end point is not taken into consideration.
STANT
 Option window: The orientation of the TCP changes continuously during the
Default motion. At the end point, the TCP has the programmed orienta-
 $ORI_TYPE = #VAR tion.
 Option window: The orientation of the TCP changes continuously during the
Wrist PTP motion. This is done by linear transformation (axis-specific
 $ORI_TYPE = #JOINT motion) of the wrist axis angles.
Note: Use Wrist PTP if, with Default, the robot passes through a
wrist axis singularity.
The orientation of the TCP changes continuously during the
motion, but not uniformly. Wrist PTP is thus not suitable if a spe-
cific orientation must be maintained exactly, e.g. in the case of
laser welding.
 Option window: This option is only available for CP spline segments (not for the
Ignore orientation spline block or for individual spline motions).
 $ORI_TYPE = #IG- This option is used if no specific orientation is required at a spe-
NORE cific point.
(>>> "#IGNORE" Page 295)

Fig. 9-28: Constant orientation

294 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

Fig. 9-29: Default orientation control

#IGNORE $ORI_TYPE = #IGNORE is used if no specific orientation is required at a point.


If this option is selected, the robot controller ignores the taught or programmed
orientation of the point. Instead, it calculates the optimal orientation for this
point on the basis of the orientations of the surrounding points. This reduces
the cycle time.
Example:
SPLINE
SPL XP1
SPL XP2
SPL XP3 WITH $ORI_TYPE=#IGNORE
SPL XP4 WITH $ORI_TYPE=#IGNORE
SPL XP5
SPL XP6
ENDSPLINE

The taught or programmed orientation of XP3 and XP4 is ignored.


Characteristics of $ORI_TYPE = #IGNORE:
 In the program run modes MSTEP and ISTEP, the robot stops with the ori-
entations calculated by the robot controller.
 In the case of a block selection to a point with #IGNORE, the robot adopts
the orientation calculated by the robot controller.
$ORI_TYPE = #IGNORE is not allowed for the following segments:
 The last segment in a spline block
 SCIRC segments with $CIRC_TYPE=#PATH
 Segments followed by a SCIRC segment with $CIRC_TYPE=#PATH
 Segments followed by a segment with $ORI_TYPE=#CONSTANT

SCIRC It is possible to define for SCIRC motions whether the orientation control is to
be space-related or path-related.
(>>> 9.8.1 "SCIRC: reference system for the orientation control" Page 296)
It is possible to define for SCIRC motions whether, and to what extent, the ori-
entation of the auxiliary point is to be taken into consideration. The orientation
behavior at the end point can also be defined.
(>>> 9.8.2 "SCIRC: orientation behavior" Page 296)

$SPL_ORI_JOINT $SPL_ORI_JOINT_AUTO is used to optimize the motion characteristics in the


_AUTO vicinity of wrist axis singularities.
Functional principle of $SPL_ORI_JOINT_AUTO = #ON:

Issued: 14.01.2015 Version: KSS 8.3 SI V4 295 / 491


KUKA System Software 8.3

 For CP spline motions with $ORI_TYPE = #VAR, the robot controller au-
tomatically decides for each motion (i.e. for each segment) whether to ex-
ecute it as #VAR or #JOINT.
$SPL_ORI_JOINT_AUTO = #ON is an alternative to using $ORI_TYPE =
#JOINT. While $ORI_TYPE = #JOINT can be used for specific individual mo-
tions, $SPL_ORI_JOINT_AUTO = #ON enables automatic optimization over
program sequences of any size with minimal effort for modification.
$SPL_ORI_JOINT_AUTO can only be modified using a robot program.
$SPL_ORI_JOINT_AUTO cannot be used in spline segments.
Default: $SPL_ORI_JOINT_AUTO = #OFF

9.8.1 SCIRC: reference system for the orientation control

It is possible to define for SCIRC motions whether the orientation control is to


be space-related or path-related. This can be defined as follows:
 If programming with inline forms: in the option window Motion parameters
 If programming with KRL syntax: by means of the system variable
$CIRC_TYPE

Orientation control Description


 Option window: Base-related orientation control during the
base-related circular motion
 $CIRC_TYPE = #BASE
 Option window: Path-related orientation control during the
path-oriented circular motion
 $CIRC_TYPE = #PATH

$CIRC_TYPE = #PATH is not allowed for the following motions:


 SCIRC segments for which $ORI_TYPE = #IGNORE
 SCIRC motions preceded by a spline segment for which $ORI_TYPE =
#IGNORE
(>>> 9.6.1 "Combinations of $ORI_TYPE and $CIRC_TYPE" Page 281)

9.8.2 SCIRC: orientation behavior

Description During SCIRC motions, the robot controller can take the programmed orienta-
tion of the auxiliary point into consideration. The operator can define whether
and to what extent it is actually taken into consideration:
 If programming with KRL syntax: by means of the system variable
$CIRC_MODE
 If programming with inline forms: in the option window Motion parame-
ters, tab Circle configuration
In the case of SCIRC statements with circular angles, the same procedure can
also be used to define whether the end point is to have the programmed ori-
entation or whether the orientation is to be scaled according to the circular an-
gle.
$CIRC_MODE can only be written to by means of a SCIRC statement.
$CIRC_MODE cannot be read.

Syntax For auxiliary points:


$CIRC_MODE.AUX_PT.ORI = BehaviorAUX
For end points:

296 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

$CIRC_MODE.TARGET_PT.ORI = BehaviorEND

Explanation of
Element Description
the syntax
BehaviorAUX Data type: ENUM
 #INTERPOLATE: At the auxiliary point, the TCP adopts
the programmed orientation.
 #IGNORE: The robot controller ignores the pro-
grammed orientation of the auxiliary point. The transi-
tion from the start orientation of the TCP to the end
orientation is carried out over the shortest possible dis-
tance.
 #CONSIDER (default):
There are essentially 2 paths for the transition from the
start orientation to the end orientation by means of a ro-
tation: a shorter one and a longer one. With #CONSID-
ER, the robot controller selects the path that comes
closest to the programmed orientation of the auxiliary
point. It is possible for the TCP to adopt the pro-
grammed orientation of the auxiliary point at some point
along the path. This is not necessarily the case, howev-
er.
BehaviorEND Data type: ENUM
 #INTERPOLATE: The programmed orientation of the
end point is accepted at the actual end point.
(Only possibility for SCIRC without specification of cir-
cular angle. If #EXTRAPOLATE is set, #INTERPO-
LATE is nonetheless executed.)
 #EXTRAPOLATE: The orientation is adapted to the cir-
cular angle:
If the circular angle makes the motion longer, the pro-
grammed orientation is accepted at the programmed
end point. The orientation is continued accordingly to
the actual end point.
If the circular angle makes the motion shorter, the pro-
grammed orientation is not reached.
(Default for SCIRC with specification of circular angle.)

Limitations  If $ORI_TYPE = #IGNORE for a SCIRC segment, $CIRC_MODE is not


evaluated.
 If a SCIRC segment is preceded by a SCIRC or SLIN segment with
$ORI_TYPE = #IGNORE, #CONSIDER cannot be used in this SCIRC
segment.
For SCIRC with circular angle:
 #INTERPOLATE must not be set for the auxiliary point.
 If $ORI_TYPE = #IGNORE, #EXTRAPOLATE must not be set for the end
point.
 If it is preceded by a spline segment with $ORI_TYPE = #IGNORE, #EX-
TRAPOLATE must not be set for the end point.

9.8.2.1 SCIRC: Orientation behavior – example: auxiliary point

Description The following orientations have been programmed for the TCP:
 Start point: 0°
 Auxiliary point: 98°

Issued: 14.01.2015 Version: KSS 8.3 SI V4 297 / 491


KUKA System Software 8.3

 End point: 197°


The re-orientation is thus 197°. If the auxiliary point is ignored, the end orien-
tation can also be achieved by means of the shorter re-orientation of 360° -
197° = 163°.
 The dotted orange arrows show the programmed orientation.
 The gray arrows indicate schematically what the actual orientation would
be where this differs from the programmed orientation.

#INTERPOLATE At the auxiliary point, the TCP adopts the programmed orientation of 98°. The
re-orientation is 197°.

Fig. 9-30: #INTERPOLATE

SP Start point
AuxP Auxiliary point
TP End point

#IGNORE The short re-orientation through 163° is used. The programmed orientation of
the auxiliary point is disregarded.

Fig. 9-31: #IGNORE

#CONSIDER
#CONSIDER is suitable if the user wants to specify the re-orientation
direction of the TCP without the need for a specific orientation at the
auxiliary point. The user can specify the direction using the auxiliary
point.

The programmed orientation of the auxiliary point is 98° and is thus on the lon-
ger path. The robot controller thus selects the longer path for the re-orienta-
tion.

298 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

Fig. 9-32: #CONSIDER

Additional example for #CONSIDER:


If the auxiliary point were to be programmed with 262°, it would be on the
shorter path. The robot controller would therefore select the shorter path for
the re-orientation. The gray arrows indicate that it does not necessarily adopt
the programmed orientation of the auxiliary point.

Fig. 9-33: #CONSIDER, additional example

9.8.2.2 SCIRC: Orientation behavior – example: end point

Description  The dotted orange arrows show the programmed orientation.


 The gray arrows show the actual orientation where this differs from the
programmed orientation.

#INTERPOLATE At TP, which is situated before TP_CA, the programmed orientation has not
yet been reached. The programmed orientation is accepted at TP_CA.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 299 / 491


KUKA System Software 8.3

Fig. 9-34: #INTERPOLATE

SP Start point
AuxP Auxiliary point
TP Programmed end point
TP_CA Actual end point. Determined by the circular angle.

#EXTRAPOLATE The programmed orientation is accepted at TP. For TP_CA, this orientation is
continued in accordance with the circular angle.

Fig. 9-35: #EXTRAPOLATE

9.9 Circular angle

A circular angle can be programmed for most circular motions.

Information about whether this is possible for a specific circular mo-


tion can be found in the description of the motion in the programming
section of this documentation.

The circular angle specifies the overall angle of the motion. This makes it pos-
sible 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.
Unit: degrees. Circular angles greater than +360° and less than -360° can be
programmed.

300 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

The preceding sign determines the direction in which the circular path is exe-
cuted:
 Positive: direction Start point › Auxiliary point › End point
 Negative: direction Start point › End point › Auxiliary point

9.10 Status and Turn

Overview The position (X, Y, Z) and orientation (A, B, C) values of the TCP are not suf-
ficient to define the robot position unambiguously, as different axis positions
are possible for the same TCP. Status and Turn serve to define an unambig-
uous position that can be achieved with different axis positions.

Fig. 9-36: Example: Same TCP position, different axis position

Status (S) and Turn (T) are integral parts of the data types POS and E6POS:
STRUC POS REAL X, Y, Z, A, B, C, INT S, T

STRUC E6POS REAL X, Y, Z, A, B, C, E1, E2, E3, E4, E5, E6, INT S, T

KRL program The robot controller only takes the programmed Status and Turn values into
consideration for PTP motions. They are ignored for CP motions.
The first motion instruction in a KRL program must therefore be one of the fol-
lowing instructions so that an unambiguous starting position is defined for the
robot:
 A complete PTP instruction of type POS or E6POS
 Or a complete PTP instruction of type AXIS or E6AXIS
“Complete” means that all components of the end point must be specified. The
default HOME position is always a complete PTP instruction.
Status and Turn can be omitted in the subsequent instructions:
 The robot controller retains the previous Status value.
 The Turn value is determined by the path in CP motions. In the case of
PTP motions, the robot controller selects the Turn value that results in the
shortest possible path.

9.10.1 Status

The Status specification prevents ambiguous axis positions.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 301 / 491


KUKA System Software 8.3

Bit 0 Bit 0 specifies the position of the intersection of the wrist axes (A4, A5, A6).

Position Value
Overhead area Bit 0 = 1
If the x-value of the intersection of the wrist axes, rela-
tive to the A1 coordinate system, is negative, the robot
is in the overhead area.
Basic area Bit 0 = 0
If the x-value of the intersection of the wrist axes, rela-
tive to the A1 coordinate system, is positive, the robot
is in the basic area.

The A1 coordinate system is identical to the $ROBROOT coordinate system if


axis 1 is at 0°. For values not equal to 0°, it moves with axis 1.

Fig. 9-37: Example: The intersection of the wrist axes (red dot) is in the
basic area.

Bit 1 Bit 1 specifies the position of axis 3. The angle at which the value of bit 1
changes depends on the robot type.
For robots whose axes 3 and 4 intersect, the following applies:

Position Value
A3 ≥ 0° Bit 1 = 1
A3 < 0° Bit 1 = 0

302 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

For robots with an offset between axis 3 and axis 4, the angle at which the val-
ue of bit 1 changes depends on the size of this offset.

Fig. 9-38: Offset between A3 and A4 – example: KR 30

Bit 2 Bit 2 specifies the position of axis 5.

Position (reference: A4 = 0°) Value


A5 is tilted upwards. Bit 2 = 1
A5 = 0° Bit 2 = 0
A5 is tilted downwards.

The sign preceding the angle of A5 is irrelevant! What counts is the direction
in which A5 is tilted, i.e. upwards or downwards. The direction is specified with
reference to the zero position of A4.

Fig. 9-39: Bit 2

Bit 3 Bit 3 is not used and is always 0.

Bit 4 Bit 4 specifies whether or not the point was taught using an absolutely accu-
rate robot.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 303 / 491


KUKA System Software 8.3

Depending on the value of the bit, the point can be executed by both absolute-
ly accurate robots and non-absolutely-accurate robots. Bit 4 is for information
purposes only and has no influence on how the robot calculates the point. This
means, therefore, that when a robot is programmed offline, bit 4 can be ig-
nored.

Description Value
The point was not taught with an absolutely accurate Bit 4 = 0
robot.
The point was taught with an absolutely accurate robot. Bit 4 = 1

9.10.2 Turn

Description The Turn specification makes it possible to move axes through angles greater
than +180° or less than -180° without the need for special motion strategies
(e.g. auxiliary points). With rotational axes, the individual bits determine the
sign before the axis value in the following way:
Bit = 0: angle ≥ 0°
Bit = 1: angle < 0°

Value Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


0 A6 ≥ 0° A5 ≥ 0° A4 ≥ 0° A3 ≥ 0° A2 ≥ 0° A1 ≥ 0°
1 A6 < 0° A5 < 0° A4 < 0° A3 < 0° A2 < 0° A1 < 0°

Example DECL POS XP1 = {X 900, Y 0, Z 800, A 0, B 0, C 0, S 6, T 19}

T 19 corresponds to T 'B010011'. This means:

Axis Angle
A1 negative
A2 negative
A3 positive
A4 positive
A5 negative
A6 positive

9.11 Singularities

KUKA robots with 6 degrees of freedom have 3 different singularity positions.


 Overhead singularity
 Extended position singularity
 Wrist axis singularity
A singularity position is characterized by the fact that unambiguous reverse
transformation (conversion of Cartesian coordinates to axis-specific values) is
not possible, even though Status and Turn are specified. In this case, or if very
slight Cartesian changes cause very large changes to the axis angles, one
speaks of singularity positions.

Overhead In the overhead singularity, the wrist root point (intersection of axes A4, A5 and
A6) is located vertically above axis 1.
The position of axis A1 cannot be determined unambiguously by means of re-
verse transformation and can thus take any value.

304 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


9 Basic principles of motion programmi...

If the end point of a PTP motion is situated in this overhead singularity position,
the robot controller may react as follows by means of the system variable
$SINGUL_POS[1]:
 0: The angle for axis A1 is defined as 0 degrees (default setting).
 1: The angle for axis A1 remains the same from the start point to the end
point.

Extended In the extended position singularity, the wrist root point (intersection of axes
position A4, A5 and A6) is located in the extension of axes A2 and A3 of the robot.
The robot is at the limit of its work envelope.
Although reverse transformation does provide unambiguous axis angles, low
Cartesian velocities result in high axis velocities for axes A2 and A3.
If the end point of a PTP motion is situated in this extended position singularity,
the robot controller may react as follows by means of the system variable
$SINGUL_POS[2]:
 0: The angle for axis A2 is defined as 0 degrees (default setting).
 1: The angle for axis A2 remains the same from the start point to the end
point.

Wrist axes In the wrist axis singularity position, the axes A4 and A6 are parallel to one an-
other and axis A5 is within the range ±0.01812°.
The position of the two axes cannot be determined unambiguously by reverse
transformation. There is an infinite number of possible axis positions for axes
A4 and A6 with identical axis angle sums.
If the end point of a PTP motion is situated in this wrist axis singularity, the ro-
bot controller may react as follows by means of the system variable
$SINGUL_POS[3]:
 0: The angle for axis A4 is defined as 0 degrees (default setting).
 1: The angle for axis A4 remains the same from the start point to the end
point.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 305 / 491


KUKA System Software 8.3

306 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

10 Programming for user group “User” (inline forms)

In the case of programs with the following axis motions


or positions, the film of lubricant on the gear units of the
axes may break down:
 Motions <3°
 Oscillating motions
 Areas of gear units permanently facing upwards
It must be ensured that the gear units have a sufficient supply of oil. For this,
in the case of oscillating motions or short motions (<3°), programming must
be carried out in such a way that the affected axes regularly move more than
40° (e.g. once per cycle).
In the case of areas of gear units permanently facing upwards, sufficient oil
supply must be achieved by programming re-orientations of the in-line wrist.
In this way, the oil can reach all areas of the gear units by means of gravity.
Required frequency of re-orientations:
 With low loads (gear unit temperature <+35 °C): daily
 With medium loads (gear unit temperature +35 °C to 55 °C): hourly
 With heavy loads (gear unit temperature >+55 °C): every 10 minutes
Failure to observe this precaution may result in damage to the gear units.

10.1 Names in inline forms

Names for data sets can be entered in inline forms. These include, for exam-
ple, point names, names for motion data sets, etc.
The following restrictions apply to names:
 Maximum length 23 characters
 No special characters are permissible, with the exception of $.
 The first character must not be a number.
The restrictions do not apply to output names.
Other restrictions may apply in the case of inline forms in technology packag-
es.

10.2 Programming PTP, LIN and CIRC motions

10.2.1 Programming a PTP motion

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Move the TCP to the position that is to be taught as the end point.
2. Position the cursor in the line after which the motion instruction is to be in-
serted.
3. Select the menu sequence Commands > Motion > PTP.
4. Set the parameters in the inline form.
(>>> 10.2.2 "Inline form “PTP”" Page 308)
5. Save instruction with Cmd Ok.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 307 / 491


KUKA System Software 8.3

10.2.2 Inline form “PTP”

Fig. 10-1: Inline form for PTP motions

Item Description
1 Motion type PTP
2 Name of the end point
The system automatically generates a name. The name can be
overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.7 "Option window “Frames”" Page 310)
3  CONT: end point is approximated.
 [Empty box]: the motion stops exactly at the end point.
4 Velocity
 1 … 100%
5 Name for the motion data set
The system automatically generates a name. The name can be
overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.8 "Option window “Motion parameters” (LIN, CIRC,
PTP)" Page 311)

10.2.3 Programming a LIN motion

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Move the TCP to the position that is to be taught as the end point.
2. Position the cursor in the line after which the motion instruction is to be in-
serted.
3. Select the menu sequence Commands > Motion > LIN.
4. Set the parameters in the inline form.
(>>> 10.2.4 "Inline form “LIN”" Page 309)
5. Save instruction with Cmd Ok.

308 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

10.2.4 Inline form “LIN”

Fig. 10-2: Inline form for LIN motions

Item Description
1 Motion type LIN
2 Name of the end point
The system automatically generates a name. The name can be
overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.7 "Option window “Frames”" Page 310)
3  CONT: end point is approximated.
 [Empty box]: the motion stops exactly at the end point.
4 Velocity
 0.001 … 2 m/s
5 Name for the motion data set
The system automatically generates a name. The name can be
overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.8 "Option window “Motion parameters” (LIN, CIRC,
PTP)" Page 311)

10.2.5 Programming a CIRC motion

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Move the TCP to the position that is to be taught as the auxiliary point.
2. Position the cursor in the line after which the motion instruction is to be in-
serted.
3. Select the menu sequence Commands > Motion > CIRC.
4. Set the parameters in the inline form.
(>>> 10.2.6 "Inline form “CIRC”" Page 310)
5. Press Teach Aux.
6. Move the TCP to the position that is to be taught as the end point.
7. Save instruction with Cmd Ok.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 309 / 491


KUKA System Software 8.3

10.2.6 Inline form “CIRC”

Fig. 10-3: Inline form for CIRC motions

Item Description
1 Motion type CIRC
2 Name of the auxiliary point
The system automatically generates a name. The name can be
overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
3 Name of the end point
The system automatically generates a name. The name can be
overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.7 "Option window “Frames”" Page 310)
4  CONT: end point is approximated.
 [Empty box]: the motion stops exactly at the end point.
5 Velocity
 0.001 … 2 m/s
6 Name for the motion data set
The system automatically generates a name. The name can be
overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.8 "Option window “Motion parameters” (LIN, CIRC,
PTP)" Page 311)

10.2.7 Option window “Frames”

Fig. 10-4: Option window: Frames

310 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Item Description
1 Tool selection.
If True in the box External TCP: workpiece selection.
Range of values: [1] … [16]
2 Base selection.
If True in the box External TCP: fixed tool selection.
Range of values: [1] … [32]
3 Interpolation mode
 False: The tool is mounted on the mounting flange.
 True: The tool is a fixed tool.
4  True: For this motion, the robot controller calculates the axis
torques. These are required for collision detection.
 False: For this motion, the robot controller does not calculate
the axis torques. Collision detection is thus not possible for this
motion.

10.2.8 Option window “Motion parameters” (LIN, CIRC, PTP)

Fig. 10-5: Option window “Motion parameters” (LIN, CIRC, PTP)

Item Description
1 Acceleration
Refers to the maximum value specified in the machine data. The
maximum value depends on the robot type and the selected oper-
ating mode.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 311 / 491


KUKA System Software 8.3

Item Description
2 This box is only displayed if it is specified in the inline form that the
point is to be approximated.
Furthest distance before the end point at which approximate posi-
tioning can begin
The maximum permissible value is half the distance between the
start point and the end point. If a higher value is entered, this is
ignored and the maximum value is used.
3 This box is only displayed for LIN and CIRC motions.
Orientation control selection.
 Standard
 Wrist PTP
 Constant orientation
(>>> 9.6 "Orientation control LIN, CIRC" Page 280)

10.3 Programming spline motions

10.3.1 Programming tips for spline motions

 It is only possible to exploit the advantages of the spline motion type to the
full if spline blocks are used.
 Interrupt programs must not contain any spline motions.
 A spline block should cover only one process (e.g. an adhesive seam).
More than one process in a spline block leads to a loss of structural clarity
within the program and makes changes more difficult.
 Use SLIN and SCIRC segments in cases where the workpiece necessi-
tates straight lines and arcs. (Exception: use SPL segments for very short
straight lines.) Otherwise, use SPL segments, particularly if the points are
close together.
 Procedure for defining the path:
a. First teach or calculate a few characteristic points. Example: points at
which the curve changes direction.
b. Test the path. At points where the accuracy is still insufficient, add
more SPL points.
 Avoid successive SLIN and/or SCIRC segments, as this often reduces the
velocity to 0.
Program SPL segments between SLIN and SCIRC segments. The length
of the SPL segments must be at least > 0.5 mm. Depending on the actual
path, significantly larger SPL segments may be required.
 Avoid successive points with identical Cartesian coordinates, as this re-
duces the velocity to 0.
 The parameters (tool, base, velocity, etc.) assigned to the spline block
have the same effect as assignments before the spline block. The assign-
ment to the spline block has the advantage, however, that the correct pa-
rameters are read in the case of a block selection.
 Use the option Ignore orientation if no specific orientation is required for
a SLIN, SCIRC or SPL segment. The robot controller calculates the opti-
mal orientation for this point on the basis of the orientations of the sur-
rounding points. This improves the cycle time.
 If there are external axes present and no specific position of the external
axis is required for a spline segment, set $EX_AX_IGNORE to “1” for that
external axis. The robot controller then calculates the optimal position for

312 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

this point on the basis of the surrounding external axis positions. This im-
proves the cycle time.
 The jerk can be modified The jerk is the change in acceleration. Proce-
dure:
a. Use the default values initially.
b. If vibrations occur at tight corners: reduce values.
If the velocity drops or the desired velocity cannot be reached: in-
crease values or increase acceleration.
 If the robot executes points which lie on a work surface, a collision with the
work surface is possible when approaching the first point.

Fig. 10-6: Collision with work surface

In order to avoid a collision, observe the recommendations for the SLIN-


SPL-SLIN transition.
(>>> 9.7.5.1 "SLIN-SPL-SLIN transition" Page 293)

Fig. 10-7: Avoiding a collision with the work surface

 In the case of PTP spline blocks with multiple SPTP segments, it is possi-
ble that the software limit switches may be violated even though the points
are within the limits!
In this case, the points must be re-taught, i.e. they must be moved further
away from the software limit switches. Alternatively, the software limit
switches can be modified, provided that the required machine protection
is still assured.

10.3.2 Programming a spline block

Description A spline block can be used to group together several motions as an overall
motion. The motions that may be included in a spline block are called spline
segments. They are taught separately.
A spline block is planned and executed by the robot controller as a single mo-
tion block.
 A CP spline block may contain SPL, SLIN and SCIRC segments.
 A PTP spline block may contain SPTP segments.
A spline block that contains no segments is not a motion statement. The num-
ber of segments in the block is only limited by the memory capacity. Apart from
the segments, a spline block may also contain the following elements:
 Inline commands from technology packages that support the spline func-
tionality

Issued: 14.01.2015 Version: KSS 8.3 SI V4 313 / 491


KUKA System Software 8.3

 Comments and blank lines


A spline block must not include any other instructions, e.g. variable assign-
ments or logic statements.

The start point of a spline block is the last point before the spline
block.
The end point of a spline block is the last point in the spline block.
A spline block does not trigger an advance run stop.

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line after which the spline block is to be inserted.
2. Select the menu sequence Commands > Motion.
 Then select SPLINE block for a CP spline block.
 Or select PTP SPLINE block for a PTP spline block.
3. Set the parameters in the inline form.
(>>> 10.3.2.1 "Inline form for CP spline block" Page 314)
(>>> 10.3.2.2 "Inline form “PTP SPLINE block”" Page 315)
4. Press Cmd OK.
5. Press Open/close fold. Spline segments can now be inserted into the
block.

10.3.2.1 Inline form for CP spline block

Fig. 10-8: Inline form for CP spline block

Item Description
1 Name of the spline block. The system automatically generates a
name. The name can be overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
Position the cursor in this box to edit the motion data. The corre-
sponding option window is opened.
(>>> 10.3.2.3 "Option window “Frames” (CP and PTP spline
block)" Page 315)
2  CONT: end point is approximated.
 [Empty box]: the motion stops exactly at the end point.
3 Cartesian velocity
 0.001 … 2 m/s
4 Name for the motion data set. The system automatically gener-
ates a name. The name can be overwritten.
Position the cursor in this box to edit the motion data. The corre-
sponding option window is opened.
(>>> 10.3.2.4 "Option window “Motion parameters” (CP spline
block)" Page 316)

314 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

10.3.2.2 Inline form “PTP SPLINE block”

Fig. 10-9: Inline form “PTP SPLINE block”

Item Description
1 Name of the spline block. The system automatically generates a
name. The name can be overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
Position the cursor in this box to edit the motion data. The corre-
sponding option window is opened.
(>>> 10.3.2.3 "Option window “Frames” (CP and PTP spline
block)" Page 315)
2  CONT: end point is approximated.
 [Empty box]: the motion stops exactly at the end point.
3 Axis velocity
 1 … 100%
4 Name for the motion data set. The system automatically gener-
ates a name. The name can be overwritten.
Position the cursor in this box to edit the motion data. The corre-
sponding option window is opened.
(>>> 10.3.2.5 "Option window “Motion parameters” (PTP spline
block)" Page 317)

10.3.2.3 Option window “Frames” (CP and PTP spline block)

Fig. 10-10: Option window “Frames” (CP and PTP spline block)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 315 / 491


KUKA System Software 8.3

Item Description
1 Tool selection.
Or: If True in the box External TCP: workpiece selection.
 [1] … [16]
2 Base selection.
Or: If True in the box External TCP: fixed tool selection.
 [1] … [32]
3 Interpolation mode
 False: The tool is mounted on the mounting flange.
 True: The tool is a fixed tool.

10.3.2.4 Option window “Motion parameters” (CP spline block)

Fig. 10-11: Option window “Motion parameters” (CP spline block)

Item Description
1 Axis velocity. The value refers to the maximum value specified in
the machine data.
 1 … 100%
2 Axis acceleration. The value refers to the maximum value speci-
fied in the machine data.
 1 … 100%
3 Gear jerk. The jerk is the change in acceleration.
The value refers to the maximum value specified in the machine
data.
 1 … 100%
4 Orientation control selection.
5 Orientation control reference system selection.
This parameter only affects SCIRC segments (if present).
6 This box is only displayed if CONT was selected in the inline form.
Furthest distance before the end point at which approximate posi-
tioning can begin.
The maximum distance is that of the last segment in the spline. If
there is only one segment present, the maximum distance is half
the segment length. If a higher value is entered, this is ignored
and the maximum value is used.

316 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

10.3.2.5 Option window “Motion parameters” (PTP spline block)

Fig. 10-12: Option window “Motion parameters” (PTP spline block)

Item Description
1 Axis acceleration. The value refers to the maximum value speci-
fied in the machine data.
 1 … 100%
2 This box is only displayed if CONT was selected in the inline form.
Furthest distance before the end point at which approximate posi-
tioning can begin.
The maximum distance is that of the last segment in the spline. If
there is only one segment present, the maximum distance is half
the segment length. If a higher value is entered, this is ignored
and the maximum value is used.
3 Gear jerk. The jerk is the change in acceleration.
The value refers to the maximum value specified in the machine
data.
 1 … 100%

10.3.3 Programming segments for a spline block

10.3.3.1 Programming an SPL or SLIN segment

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1
 The CP spline block fold is open.

Procedure 1. Move the TCP to the end point.


2. Position the cursor in the line after which the segment is to be inserted in
the spline block.
3. Select the menu sequence Commands > Motion > SPL or SLIN.
4. Set the parameters in the inline form.
(>>> 10.3.3.3 "Inline form for CP spline segment" Page 318)
5. Press Cmd OK.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 317 / 491


KUKA System Software 8.3

10.3.3.2 Programming an SCIRC segment

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1
 The CP spline block fold is open.

Procedure 1. Move the TCP to the auxiliary point.


2. Position the cursor in the line after which the segment is to be inserted in
the spline block.
3. Select the menu sequence Commands > Motion > SCIRC.
4. Set the parameters in the inline form.
(>>> 10.3.3.3 "Inline form for CP spline segment" Page 318)
5. Press Teach Aux.
6. Move the TCP to the end point.
7. Press Cmd OK.

10.3.3.3 Inline form for CP spline segment

Fig. 10-13: Inline form for CP spline segment

By default, not all boxes of the inline form are displayed. The boxes can be dis-
played or hidden using the Switch parameter button.

Item Description
1 Motion type
 SPL, SLIN or SCIRC
2 Only for SCIRC: Point name for the auxiliary point.
The system automatically generates a name. The name can be
overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
3 Point name for the end point. The system automatically generates
a name. The name can be overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.3.3.6 "Option window “Frames” (CP and PTP spline seg-
ments)" Page 321)

318 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Item Description
4 Cartesian velocity
By default, the value that is valid for the spline block is also valid
for the segment. A separate value can be assigned here for the
segment if required. The value applies only for this segment.
 0.001 … 2 m/s
5 Name for the motion data set. The system automatically gener-
ates a name. The name can be overwritten.
By default, the values that are valid for the spline block are also
valid for the segment. Separate values can be assigned here for
the segment if required. The values apply only for this segment.
Touch the arrow to edit the data. The corresponding option win-
dow is opened.
(>>> 10.3.3.7 "Option window “Motion parameters” (CP spline
segment)" Page 321)
6 Circular angle
Only available if the motion type SCIRC has been selected.
 - 9 999° … + 9 999°
If a value less than -400° or greater than +400° is entered, a
request for confirmation is generated when the inline form is
saved asking whether entry is to be confirmed or rejected.
7 Name of the data set containing logic parameters. The system
automatically generates a name. The name can be overwritten.
Touch the arrow to edit the data. The corresponding option win-
dow is opened.
(>>> 10.3.3.9 "Option window “Logic parameters”" Page 323)

10.3.3.4 Programming an SPTP segment

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1
 The PTP spline block fold is open.

Procedure 1. Move the TCP to the end point.


2. Position the cursor in the line after which the segment is to be inserted in
the spline block.
3. Select the menu sequence Commands > Motion > SPTP.
4. Set the parameters in the inline form.
(>>> 10.3.3.5 "Inline form for SPTP segment" Page 320)
5. Press Cmd OK.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 319 / 491


KUKA System Software 8.3

10.3.3.5 Inline form for SPTP segment

Fig. 10-14: Inline form for SPTP segment

By default, not all boxes of the inline form are displayed. The boxes can be dis-
played or hidden using the Switch parameter button.

Item Description
1 Motion type SPTP
2 Point name for end point. The system automatically generates a
name. The name can be overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.3.3.6 "Option window “Frames” (CP and PTP spline seg-
ments)" Page 321)
3 Axis velocity
By default, the value that is valid for the spline block is also valid
for the segment. A separate value can be assigned here for the
segment if required. The value applies only for this segment.
 1 … 100%
4 Name for the motion data set. The system automatically gener-
ates a name. The name can be overwritten.
By default, the values that are valid for the spline block are also
valid for the segment. Separate values can be assigned here for
the segment if required. The values apply only for this segment.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.3.3.8 "Option window “Motion parameters” (SPTP)"
Page 322)
5 Name of the data set containing logic parameters. The system
automatically generates a name. The name can be overwritten.
Touch the arrow to edit the data. The corresponding option win-
dow is opened.
(>>> 10.3.3.9 "Option window “Logic parameters”" Page 323)

320 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

10.3.3.6 Option window “Frames” (CP and PTP spline segments)

Fig. 10-15: Option window “Frames” (CP and PTP spline segments)

Item Description
1  True: For this motion, the robot controller calculates the axis
torques. These are required for collision detection.
 False: For this motion, the robot controller does not calculate
the axis torques. Collision detection is thus not possible for this
motion.

10.3.3.7 Option window “Motion parameters” (CP spline segment)

Motion param-
eters

Fig. 10-16: Option window “Motion parameters” (CP spline segment)

Item Description
1 Axis velocity. The value refers to the maximum value specified in
the machine data.
 1 … 100%
2 Axis acceleration. The value refers to the maximum value speci-
fied in the machine data.
 1 … 100%
3 Gear jerk. The jerk is the change in acceleration.
The value refers to the maximum value specified in the machine
data.
 1 … 100%
4 Orientation control selection
5 Only in the case of SCIRC segments: Orientation control refer-
ence system selection

Issued: 14.01.2015 Version: KSS 8.3 SI V4 321 / 491


KUKA System Software 8.3

Circle configu-
ration

Fig. 10-17: Circle configuration (SCIRC segment)

Item Description
6 Only in the case of SCIRC segments: Selection of orientation
behavior at auxiliary point
7 Only in the case of SCIRC segments: This box is only displayed if
ANGLE was selected in the inline form.
Selection of orientation behavior at end point

10.3.3.8 Option window “Motion parameters” (SPTP)

Fig. 10-18: Option window “Motion parameters” (SPTP)

Item Description
1 Axis acceleration. The value refers to the maximum value speci-
fied in the machine data.
 1 … 100%

322 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Item Description
2 This box is not available for SPTP segments. In the case of indi-
vidual SPTP motions, this box is only displayed if CONT was
selected in the inline form.
Furthest distance before the end point at which approximate posi-
tioning can begin.
The maximum permissible value is half the distance between the
start point and the end point. If a higher value is entered, this is
ignored and the maximum value is used.
3 Gear jerk. The jerk is the change in acceleration.
The value refers to the maximum value specified in the machine
data.
 1 … 100%

10.3.3.9 Option window “Logic parameters”

Trigger Trigger

Fig. 10-19: Trigger

Item Description
1 A (further) trigger can be assigned to the motion by means of the
button Select action > Add trigger. If it is the first trigger for this
motion, this command also causes the Trigger box to be dis-
played.
A maximum of 8 triggers per motion are possible.
(A trigger can be removed again by means of Select action > Re-
move trigger.)
2 Reference point of the trigger
 TRUE: Start point
 FALSE: End point
(>>> 11.11.2.1 "Reference point for approximate positioning –
overview" Page 428)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 323 / 491


KUKA System Software 8.3

Item Description
3 Spatial offset relative to the end or start point
 Negative value: Offset towards the start of the motion
 Positive value: Offset towards the end of the motion
(>>> "Max. offset" Page 426)
The shift in space can also be taught. In this case, the box Start
point is reference point is automatically set to FALSE.
(>>> 10.3.3.10 "Teaching the shift in space for logic parameters"
Page 326)
4 Shift in time relative to Offset
 Negative value: Shift towards the start of the motion.
 Positive value: Trigger is switched after Time has elapsed.
(>>> "Max. offset" Page 426)
5 Statement that is to be initiated by the trigger. The following are
possible:
 Assignment of a value to a variable
Note: There must be no runtime variable on the left-hand side
of the assignment.
 OUT statement; PULSE statement; CYCFLAG statement
 Subprogram call. In this case, the priority must be specified.
Example: my_subprogram() PRIO = 81
Priorities 1, 2, 4 to 39 and 81 to 128 are available. Priorities 40
to 80 are reserved for cases in which the priority is automati-
cally assigned by the system. If the priority is to be assigned
automatically by the system, the following is programmed:
PRIO = -1.
If several triggers call subprograms at the same time, the trig-
ger with the highest priority is processed first, then the triggers
of lower priority. 1 = highest priority.

Conditional stop Conditional stop

Further information about the conditional stop can be found in this


documentation.
(>>> 10.3.5 "Conditional stop" Page 332)

Fig. 10-20: Conditional stop

324 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Item Description
1 Stop condition. The following are permitted:
 a global Boolean variable
 a signal name
 a comparison
 a simple logic operation: NOT, OR, AND or EXOR
2 The conditional stop can refer to either the start point or the end
point of the motion.
 TRUE: Start point
 FALSE: End point
If the reference point is approximated, the same rules apply as for
the PATH trigger.
(>>> 11.11.2.1 "Reference point for approximate positioning –
overview" Page 428)
3 The stop point can be shifted in space. For this, the desired dis-
tance from the start or end point must be specified. If no shift in
space is desired, enter “0”.
 Positive value: Offset towards the end of the motion
 Negative value: Offset towards the start of the motion
There are limits to the distance the stop point can be offset. The
same limits apply as for the PATH trigger. (>>> "Max. offset"
Page 426)
The shift in space can also be taught. In this case, the box Start
point is reference point is automatically set to FALSE.
(>>> 10.3.3.10 "Teaching the shift in space for logic parameters"
Page 326)

Constant velocity Constant velocity range


range
Constant velocity range is only available for CP spline segments.

Further information about the constant velocity ranges can be found


in this documentation.
(>>> 10.3.6 "Constant velocity range in the CP spline block"
Page 335)

Fig. 10-21: Constant velocity range

Issued: 14.01.2015 Version: KSS 8.3 SI V4 325 / 491


KUKA System Software 8.3

Item Description
1  Start: Defines the start of the constant velocity range.
 End: Defines the end of the constant velocity range.
2 Start and End can refer to either the start point or the end point of
the motion.
 TRUE: Start or End refers to the start point.
If the start point is approximated, the reference point is gener-
ated in the same way as for homogenous approximate posi-
tioning with the PATH trigger.
(>>> 11.11.2.2 "Reference point for homogenous approxi-
mate positioning" Page 429)
 FALSE: Start or End refers to the end point.
If the end point is approximated, Start or End refers to the start
of the approximate positioning arc.
3 The start or end of the constant velocity range can be shifted in
space. For this, the desired distance must be specified. If no shift
in space is desired, enter “0”.
 Positive value: Offset towards the end of the motion
 Negative value: Offset towards the start of the motion
(>>> 10.3.6.2 "Maximum limits" Page 337)
The shift in space can also be taught. In this case, the box Start
point is reference point is automatically set to FALSE.
(>>> 10.3.3.10 "Teaching the shift in space for logic parameters"
Page 326)

10.3.3.10Teaching the shift in space for logic parameters

Description Shifts in space can be specified in the option window Logic parameters for
trigger, conditional stop and constant velocity range. Instead of entering these
offsets numerically, they can also be taught.

If an offset is taught, the box Start point is reference point in the cor-
responding tab is automatically set to FALSE, as the taught distance
refers to the end point of the motion.

Precondition  A program is selected.


 Operating mode T1
 The point for which the offset is to apply has already been taught.

Procedure 1. Move the TCP to the desired position.


2. Position the cursor in the line containing the motion instruction for which
the offset is to be taught.
3. Press Change. The inline form for this instruction is opened.
4. Open the option window Logic parameters and select the required tab.
5. Press Select action then one of the following buttons depending on what
the offset is to be taught for:
 Teach trigger path
 Teach conditional stop path
 Teach constant velocity range path
The distance from the end point of the current motion statement is now ap-
plied as the value for the offset.
6. Save the change by pressing Cmd OK.

326 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

10.3.4 Programming individual spline motions

10.3.4.1 Programming an individual SLIN motion

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Move the TCP to the end point.


2. Position the cursor in the line after which the motion is to be inserted.
3. Select Commands > Motion > SLIN.
4. Set the parameters in the inline form.
(>>> 10.3.4.2 "Inline form “SLIN”" Page 327)
5. Press Cmd OK.

10.3.4.2 Inline form “SLIN”

Fig. 10-22: Inline form “SLIN” (individual motion)

Item Description
1 Motion type SLIN
2 Point name for end point. The system automatically generates a
name. The name can be overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.7 "Option window “Frames”" Page 310)
3  CONT: end point is approximated.
 [Empty box]: the motion stops exactly at the end point.
4 Velocity
 0.001 … 2 m/s

Issued: 14.01.2015 Version: KSS 8.3 SI V4 327 / 491


KUKA System Software 8.3

Item Description
5 Name for the motion data set. The system automatically gener-
ates a name. The name can be overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.3.4.3 "Option window “Motion parameters” (SLIN)"
Page 328)
6 This box can be displayed or hidden by means of Switch param-
eter.
Name of the data set containing logic parameters. The system
automatically generates a name. The name can be overwritten.
Touch the arrow to edit the data. The corresponding option win-
dow is opened.
(>>> 10.3.3.9 "Option window “Logic parameters”" Page 323)

10.3.4.3 Option window “Motion parameters” (SLIN)

Fig. 10-23: Option window “Motion parameters” (SLIN)

Item Description
1 Axis velocity. The value refers to the maximum value specified in
the machine data.
 1 … 100%
2 Axis acceleration. The value refers to the maximum value speci-
fied in the machine data.
 1 … 100%
3 Gear jerk. The jerk is the change in acceleration.
The value refers to the maximum value specified in the machine
data.
 1 … 100%
4 Orientation control selection.
5 This box is only displayed if CONT was selected in the inline form.
Furthest distance before the end point at which approximate posi-
tioning can begin.
The maximum permissible value is half the distance between the
start point and the end point. If a higher value is entered, this is
ignored and the maximum value is used.

328 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

10.3.4.4 Programming an individual SCIRC motion

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Move the TCP to the auxiliary point.


2. Position the cursor in the line after which the motion is to be inserted.
3. Select the menu sequence Commands > Motion > SCIRC.
4. Set the parameters in the inline form.
(>>> 10.3.4.5 "Inline form “SCIRC”" Page 329)
5. Press Teach Aux.
6. Move the TCP to the end point.
7. Press Cmd OK.

10.3.4.5 Inline form “SCIRC”

Fig. 10-24: Inline form “SCIRC” (individual motion)

Item Description
1 Motion type SCIRC
2 Point name for the auxiliary point.
The system automatically generates a name. The name can be
overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
3 Point name for the end point.
The system automatically generates a name. The name can be
overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.7 "Option window “Frames”" Page 310)
4  CONT: end point is approximated.
 [Empty box]: the motion stops exactly at the end point.
5 Velocity
 0.001 … 2 m/s

Issued: 14.01.2015 Version: KSS 8.3 SI V4 329 / 491


KUKA System Software 8.3

Item Description
6 Name for the motion data set. The system automatically gener-
ates a name. The name can be overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.3.4.6 "Option window “Motion parameters” (SCIRC)"
Page 330)
7 Circular angle
 - 9 999° … + 9 999°
If a circular angle less than -400° or greater than +400° is entered,
a request for confirmation is generated when the inline form is
saved asking whether entry is to be confirmed or rejected.
8 This box can be displayed or hidden by means of Switch param-
eter.
Name of the data set containing logic parameters. The system
automatically generates a name. The name can be overwritten.
Touch the arrow to edit the data. The corresponding option win-
dow is opened.
(>>> 10.3.3.9 "Option window “Logic parameters”" Page 323)

10.3.4.6 Option window “Motion parameters” (SCIRC)

Motion param-
eters

Fig. 10-25: Motion parameters (SCIRC)

Item Description
1 Axis velocity. The value refers to the maximum value specified in
the machine data.
 1 … 100%
2 Axis acceleration. The value refers to the maximum value speci-
fied in the machine data.
 1 … 100%
3 Gear jerk. The jerk is the change in acceleration.
The value refers to the maximum value specified in the machine
data.
 1 … 100%
4 Orientation control selection

330 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Item Description
5 Orientation control reference system selection
6 This box is only displayed if CONT was selected in the inline form.
Furthest distance before the end point at which approximate posi-
tioning can begin.
The maximum permissible value is half the distance between the
start point and the end point. If a higher value is entered, this is
ignored and the maximum value is used.

Circle configu-
ration

Fig. 10-26: Circle configuration (SCIRC)

Item Description
7 Selection of orientation behavior at auxiliary point
8 This box is only displayed if ANGLE was selected in the inline
form.
Selection of orientation behavior at end point

10.3.4.7 Programming an individual SPTP motion

When programming motions, it must be ensured that the


energy supply system is not wound up or damaged dur-
ing program execution.

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Move the TCP to the end point.


2. Position the cursor in the line after which the motion is to be inserted.
3. Select Commands > Motion > SPTP.
4. Set the parameters in the inline form.
(>>> 10.3.4.8 "Inline form “SPTP”" Page 332)
5. Press Cmd OK.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 331 / 491


KUKA System Software 8.3

10.3.4.8 Inline form “SPTP”

Fig. 10-27: Inline form “SPTP” (individual motion)

Item Description
1 Motion type SPTP
2 Point name for end point. The system automatically generates a
name. The name can be overwritten.
(>>> 10.1 "Names in inline forms" Page 307)
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.2.7 "Option window “Frames”" Page 310)
3  CONT: end point is approximated.
 [Empty box]: the motion stops exactly at the end point.
4 Velocity
 1 … 100%
5 Name for the motion data set. The system automatically gener-
ates a name. The name can be overwritten.
Touch the arrow to edit the point data. The corresponding option
window is opened.
(>>> 10.3.3.8 "Option window “Motion parameters” (SPTP)"
Page 322)
6 This box can be displayed or hidden by means of Switch param-
eter.
Name of the data set containing logic parameters. The system
automatically generates a name. The name can be overwritten.
Touch the arrow to edit the data. The corresponding option win-
dow is opened.
(>>> 10.3.3.9 "Option window “Logic parameters”" Page 323)

10.3.5 Conditional stop

Description The “conditional stop” enables the user to define a point on the path at which
the robot stops if a certain condition is met. This point is called the “stop point”.
As soon as the condition is no longer met, the robot resumes its motion.
During the runtime, the robot controller calculates the latest point at which the
robot must brake in order to be able to stop at the stop point. From this point
(braking point) onwards, it monitors whether or not the condition is met.
 If the condition is met at the braking point, the robot brakes in order to stop
at the stop point.
If, however, the condition then switches back to “not met” before the stop
point is reached, the robot accelerates again and does not stop.
 If the condition is not met at the braking point, the robot motion is continued
without braking.
Essentially, any number of conditional stops can be programmed. A maximum
of 10 “braking point → stop point” paths may overlap, however.

332 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

While the robot is braking, the robot controller displays the following message
in T1/T2 mode: Conditional stop active (line {Line number}).
(>>> 10.3.5.2 "Stop condition: example and braking characteristics"
Page 334)

Programming Programming with KRL syntax:


 using the statement STOP WHEN PATH
Programming with inline forms:
 In the spline block (CP and PTP) or in the individual spline block:
in the option window “Logic parameters”
 Before a spline block (CP and PTP):
via the inline form Spline Stop Condition

10.3.5.1 Inline form “Spline Stop Condition”

This inline form may only be used before a spline block. There may be other
statements between the inline form and the spline block, but no motion instruc-
tions.

Fig. 10-28: Inline form “Spline Stop Condition”

Item Description
1 Point to which the conditional stop refers
 With ONSTART: last point before the spline block
 Without ONSTART: last point in the spline block
If the spline is approximated, the same rules apply as for the
PATH trigger.
Note: Information about approximate positioning with the PATH
trigger is contained in the Operating and Programming Instruc-
tions for System Integrators.
ONSTART can be set or removed using the Toggle OnStart but-
ton.
2 The stop point can be shifted in space. For this, the desired dis-
tance from the reference point must be specified. If no shift in
space is desired, enter “0”.
 Positive value: Offset towards the end of the motion
 Negative value: Offset towards the start of the motion
There are limits to the distance the stop point can be offset. The
same limits apply as for the PATH trigger.
The shift in space can also be taught.
(>>> "Teach path" Page 334)
3 Stop condition. The following are permitted:
 a global Boolean variable
 a signal name
 a comparison
 a simple logic operation: NOT, OR, AND or EXOR

Issued: 14.01.2015 Version: KSS 8.3 SI V4 333 / 491


KUKA System Software 8.3

Teach path Button Description


Teach path If an offset is desired, it is not necessary to enter
the value into the inline form numerically; the off-
set can also be taught. This is done via Teach
path.
If an offset is taught, ONSTART is automatically
removed, if set in the inline form, as the taught
distance always refers to the end point of the mo-
tion.
The teaching sequence is the same as that for
the option window Logic parameters.
(>>> 10.3.3.10 "Teaching the shift in space for
logic parameters" Page 326)

10.3.5.2 Stop condition: example and braking characteristics

Example The indentations are not present by default and have been inserted here for
greater clarity.

Fig. 10-29: Inline programming example (folds expanded)

Line Description
4 If the input $IN[77] is FALSE, the robot stops 50 mm after P2
and waits until $IN[77] is TRUE.

Fig. 10-30: Example of STOP WHEN PATH

334 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Point Description
BP Braking Point: The robot must start braking here in order to
stop at the stop point.
From this point onwards, the robot controller monitors
whether or not the stop condition is met.
The position of BP depends on the velocity and the override
setting and cannot be identified by the operator.
SP Stop Point
The distance P2 → SP is 50 mm long.

Braking charac-
Situation at BP Behavior of the robot
teristics
$IN[77] == FALSE The robot brakes and stops at SP.
$IN[77] == TRUE The robot does not brake and does
not stop at SP. The program is exe-
cuted as if the STOP WHEN PATH
statement were not present.
1. $IN[77] == FALSE at BP. 1. The robot brakes at BP.
2. The input switches to TRUE be- 2. If the input is TRUE, the robot
tween BP and SP. accelerates again and does not
stop at SP.
1. $IN[77] == TRUE at BP. 1. The robot does not brake at BP.
2. The input switches to FALSE 2. If the input is FALSE, the robot
between BP and SP. stops with a path-maintaining
EMERGENCY STOP and
comes to a standstill at an un-
predictable point.

If the stop condition is not met until the robot has already passed BP, it is too
late to stop at SP with a normal braking ramp. In this case, the robot stops with
a path-maintaining EMERGENCY STOP and comes to a standstill at an un-
predictable point.
 If the EMERGENCY STOP causes the robot to stop after SP, the program
cannot be resumed until the stop condition is no longer met.
 If the path-maintaining EMERGENCY STOP causes the robot to stop be-
fore SP, the following occurs when the program is resumed:
 If the stop condition is no longer met, the robot resumes its motion.
 If the stop condition is still met, the robot moves as far as SP and stops
there.

10.3.6 Constant velocity range in the CP spline block

Description In a CP spline block, a range can be defined in which the robot maintains the
programmed velocity constant where possible. This range is called the “con-
stant velocity range”.
 1 constant velocity range can be defined per CP spline block.
 A constant velocity range is defined by a start statement and an end state-
ment.
 The range cannot extend beyond the spline block.
 There is no lower limit to the size of the range.
If it is not possible to maintain the programmed velocity constant, the robot
controller indicates this by means of a message during program execution.
Constant velocity range over several segments:

Issued: 14.01.2015 Version: KSS 8.3 SI V4 335 / 491


KUKA System Software 8.3

A constant velocity range can extend over several segments with different pro-
grammed velocities. In this case, the lowest of the velocities is valid for the
whole range.
Even in the segments with a higher programmed velocity, the motion is exe-
cuted with the lowest velocity in this case. No message is generated indicating
that the velocity has not been maintained. This only occurs if the lowest veloc-
ity cannot be maintained.

Programming A constant velocity range can be programmed in the following ways:


 If programming with KRL syntax: by means of the statement CONST_VEL
 If programming with inline forms:
The start or end of the range is stored in the corresponding CP segment
in the option window Logic parameters.

10.3.6.1 Block selection to the constant velocity range

Description If a block selection to a constant velocity range is carried out, the robot con-
troller ignores it and generates a corresponding message. The motions are ex-
ecuted as if no constant velocity range were programmed.
A block selection to the path section defined by the offset values is considered
as a block selection to the constant velocity range. The motion blocks in which
the start and end of the range are programmed, however, are irrelevant.

Example

Fig. 10-31: Constant velocity range example (inline programming)

The folds in the program are expanded. The indentations are not present by
default and have been inserted here for greater clarity.
The start of the constant velocity range is at P1 in the program. The end is at
P4. What counts, however, when deciding what constitutes a block selection
to the constant velocity range is where the range is located on the path:

336 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Fig. 10-32: Constant velocity range example (path)

What is considered as a block selection to the constant velocity range?

Block selection to point ... P1 P2 P3 P4


= in constant velocity range? No No Yes No

10.3.6.2 Maximum limits

If the start or end point of the spline block is an exact positioning point:
 The constant velocity range starts at the start point at the earliest.
 The constant velocity range ends at the end point at the latest.
If the offset value is such that these limits would be exceeded, the robot con-
troller automatically reduces the offset and generates the following message:
CONST_VEL {Start/End} = {Offset} cannot be implemented; {New offset} will
be used.
The robot controller reduces the offset far enough to create a range in which
the constant programmed velocity can be maintained. In other words, it does
not necessarily shift the limit exactly to the start or end point of the spline block,
but possibly further inwards.
The same message is generated if the range is already in the spline block be-
forehand, but the defined velocity cannot be maintained due to the offset. In
this case, once again, the robot controller reduces the offset.
If the start or end point of the spline block is approximated:
 The constant velocity range starts at the start of the approximate position-
ing arc of the start point at the earliest.
 The constant velocity range ends at the start of the approximate position-
ing arc of the end point at the latest.

Fig. 10-33: Maximum limits for approximated SPLINE/ENDSPLINE

If the offset is such that these limits would be exceeded, the robot controller
automatically sets the limit to the start of the corresponding approximate posi-
tioning arc. It does not generate a message.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 337 / 491


KUKA System Software 8.3

10.4 Displaying the distance between points

Precondition  Program is selected or open.


 T1 or T2 operating mode
 “Expert” user group

Procedure 1. Select the points (= the motion blocks) for which the distance is to be dis-
played. Multiple consecutive blocks can also be selected.
2. Select the menu sequence Edit > Marked region > Cart. distance.
A window opens. It displays the following information:
 The Cartesian coordinates of the first selected point
 The Cartesian coordinates of the last selected point
 The distance between the coordinates in millimeters and degrees
 The distance between the TCP position at the first and last point in mil-
limeters and degrees
3. Select other points if required.
4. Press Refresh to update the display.

10.5 Modifying programmed motions

10.5.1 Modifying motion parameters

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line containing the instruction that is to be
changed.
2. Press Change. The inline form for this instruction is opened.
3. Modify parameters.
4. Save changes by pressing Cmd Ok.

10.5.2 Modifying blocks of motion parameters

Precondition  “Expert” user group


 A program is selected.
 Operating mode T1

Procedure 1. Select the motion instructions to be modified. (Only consecutive motion in-
structions can be modified as a block.)
2. Press Change. The inline form of the first selected motion block opens.
3. Modify parameters.
4. Press Cmd OK. The changes will be applied to the selected motion blocks
where possible.
Some changes will not be applied in every motion block, e.g. it is not pos-
sible to apply the PTP parameter Velocity in a LIN motion block.

10.5.3 Re-teaching a point

Description The coordinates of a taught point can be modified. This is done by moving to
the new position and overwriting the old point with the new position.

Precondition  A program is selected.


 Operating mode T1

338 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Procedure 1. Move the TCP to the desired position.


2. Position the cursor in the line containing the motion instruction that is to be
changed.
3. Press Change. The inline form for this instruction is opened.
4. For PTP and LIN motions: Press Touch Up to accept the current position
of the TCP as the new end point.
For CIRC motions:
 Press Teach Aux to accept the current position of the TCP as the new
auxiliary point.
 Or press Teach End to accept the current position of the TCP as the
new end point.
5. Confirm the request for confirmation with Yes.
6. Save change by pressing Cmd Ok.

10.5.4 Transforming blocks of coordinates

Precondition  “Expert” user group


 A program is selected.
 Operating mode T1

Procedure 1. Select the motion instructions to be modified. (Only consecutive motion in-
structions can be modified as a block.)
2. Select the menu sequence Edit > Marked region. Select transformation
type.
The corresponding window is opened.
(>>> 10.5.4.1 "“Axis mirroring” window" Page 342)
(>>> 10.5.4.2 "“Transform - Axis Specific” window" Page 343)
(>>> 10.5.4.3 "“Transform - Cartesian Base” window" Page 344)
3. Enter values for the transformation and press Calculate.

Overview The following transformation types are available:


 Transform - Cartesian base
 Transform - Cartesian tool
 Transform - Cartesian World
 Transform - Axis-specific
 Axis mirroring

Transform - Base Transform - Cartesian Base:


The transformation refers to the current BASE coordinate system.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 339 / 491


KUKA System Software 8.3

Fig. 10-34: Transform - Cartesian Base

Point P is offset by ∆ X and ∆ Y in the negative direction. The new position of


the point is P*.

Transform - TCP Transform - Cartesian TCP:


The transformation refers to the current TOOL coordinate system.

Fig. 10-35: Transform - Cartesian TCP

Point P is offset by ∆ Z and ∆ Y in the negative direction. The new position of


the point is P*.

Transform - Transform - Cartesian World:


World The transformation is relative to the WORLD coordinate system.

340 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Fig. 10-36: Transform - Cartesian World

Point P is offset by ∆ X and ∆ Y in the negative direction. The new position of


the point is P*.

Transform - Axis Transform - Axis Specific:


Specific The transformation is axis-specific.

Fig. 10-37: Transform - Axis Specific

Axis A5 is rotated by the angle ∆α. The new position of point P is P*.

Mirroring Mirroring:
Mirroring in the XY plane of the ROBROOT coordinate system.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 341 / 491


KUKA System Software 8.3

Fig. 10-38: Mirroring

Points P1, P2 and P3 are mirrored in the XY plane (1). The new positions of
the points are P1*, P2* and P3*.

10.5.4.1 “Axis mirroring” window

Fig. 10-39: Mirroring

No values need to be entered in this window. Pressing the Calculate button


mirrors the point coordinates in the XZ plane of the ROBROOT coordinate sys-
tem.

342 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Following mirroring of the coordinates, the tool used must also be mir-
rored in the XZ plane.

The following buttons are available:

Button Description
Calculate Mirrors the coordinates of the selected motion
points in the XZ plane, converts the coordinates
to axis angles and applies the new values.
Undo Undoes the mirroring and restores the old point
data.

Only selected points with a complete E6POS definition are copied. This in-
cludes, for example, all those that were generated via inline forms during pro-
gramming. Points without a complete E6POS definition are ignored during the
point offset.

10.5.4.2 “Transform - Axis Specific” window

Fig. 10-40: Point transformation - axis-specific

Item Description
1 Selection of the transformation type
2 Rotation group: input boxes for the position offset of axes A1
... A6
 Range of values: Dependent on the configuration of the
axis-specific workspaces
E1 .. E6 switches to the External axes group: input boxes for
the position offset of axes E1 ... E6
Note: Values can only be entered for configured axes.

The following buttons are available:

Button Description
E1 .. E6/A1 .. A6 Toggles between the Rotation and External
axes groups.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 343 / 491


KUKA System Software 8.3

Button Description
Undo Undoes the transformation and restores the old
point data.
Calculate Calculates the point transformation and applies it
to all selected motion points.
If the transformation would cause a point to be
situated outside the configured workspace, the
point is not transformed.

Only selected points with a complete E6POS definition are copied. This in-
cludes, for example, all those that were generated via inline forms during pro-
gramming. Points without a complete E6POS definition are ignored during the
point offset.

10.5.4.3 “Transform - Cartesian Base” window

Fig. 10-41: Point transformation - Cartesian

Item Description
1 Selection of the transformation type
2 Position group: input boxes for the point transformation in the X,
Y, Z direction
 Range of values: Dependent on the configuration of the Carte-
sian workspaces
3 Orientation group: input boxes for the transformation of the A, B,
C orientation
 Range of values: Dependent on the configuration of the Carte-
sian workspaces

The following buttons are available:

Button Description
Undo Undoes the transformation and restores the old
point data.
Calculate Calculates the point transformation and applies it
to all selected motion points.
If the transformation would cause a point to be
situated outside the configured workspace, the
point is not transformed.

344 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Only selected points with a complete E6POS definition are copied. This in-
cludes, for example, all those that were generated via inline forms during pro-
gramming. Points without a complete E6POS definition are ignored during the
point offset.

10.6 Programming logic instructions

10.6.1 Inputs/outputs

Digital inputs/outputs
The robot controller can manage up to 8192 digital inputs and 8192 digital out-
puts. 4096 inputs/outputs are available by default.
Analog inputs/outputs
The robot controller can manage 32 analog inputs and 32 analog outputs.
The inputs/outputs are managed via the following system variables:

Inputs Outputs
Digital $IN[1] … $IN[8192] $OUT[1] … $OUT[8192]
Analog $ANIN[1] … $ANIN[32] $ANOUT[1] … $ANOUT[32]

$ANIN[…] indicates the input voltage, adapted to the range between -1.0 and
+1.0. The actual voltage depends on the settings of the analog module.
$ANOUT[…] can be used to set an analog voltage. $ANOUT[…] can have val-
ues from -1.0 to +1.0 written to it. The voltage actually generated depends on
the settings of the analog module. If an attempt is made to set voltages outside
the range of values, the robot controller displays the following message: Limit
{Signal name}

10.6.2 Setting a digital output - OUT

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line after which the logic instruction is to be in-
serted.
2. Select the menu sequence Commands > Logic > OUT > OUT.
3. Set the parameters in the inline form.
(>>> 10.6.3 "Inline form “OUT”" Page 345)
4. Save instruction with Cmd Ok.

10.6.3 Inline form “OUT”

The instruction sets a digital output.

Fig. 10-42: Inline form “OUT”

Issued: 14.01.2015 Version: KSS 8.3 SI V4 345 / 491


KUKA System Software 8.3

Item Description
1 Output number
2 If a name exists for the output, this name is displayed.
Only for the user group “Expert”:
A name can be entered by pressing Long text. The name is freely
selectable.
3 State to which the output is switched
 TRUE
 FALSE
4  CONT: Execution in the advance run
 [Empty box]: Execution with advance run stop

10.6.4 Setting a pulse output - PULSE

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line after which the logic instruction is to be in-
serted.
2. Select the menu sequence Commands > Logic > OUT > PULSE.
3. Set the parameters in the inline form.
(>>> 10.6.5 "Inline form “PULSE”" Page 346)
4. Save instruction with Cmd Ok.

10.6.5 Inline form “PULSE”

The instruction sets a pulse of a defined length.

Fig. 10-43: Inline form “PULSE”

Item Description
1 Output number
2 If a name exists for the output, this name is displayed.
Only for the user group “Expert”:
A name can be entered by pressing Long text. The name is freely
selectable.
3 State to which the output is switched
 TRUE: “High” level
 FALSE: “Low” level
4  CONT: Execution in the advance run
 [Empty box]: Execution with advance run stop
5 Length of the pulse
 0.10 … 3.00 s

346 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

10.6.6 Setting an analog output - ANOUT

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line after which the instruction is to be inserted.
2. Select Commands > Analog output > Static or Dynamic.
3. Set the parameters in the inline form.
(>>> 10.6.7 "Inline form “ANOUT” (static)" Page 347)
(>>> 10.6.8 "Inline form “ANOUT” (dynamic)" Page 347)
4. Save instruction with Cmd Ok.

10.6.7 Inline form “ANOUT” (static)

This instruction sets a static analog output. The voltage is set to a fixed level
by means of a factor. The actual voltage level depends on the analog module
used. For example, a 10 V module with a factor of 0.5 provides a voltage of
5 V.
ANOUT triggers an advance run stop.

Fig. 10-44: Inline form “ANOUT” (static)

Item Description
1 Number of the analog output
 CHANNEL_1 … CHANNEL_32
2 Factor for the voltage
 0 … 1 (intervals: 0.01)

10.6.8 Inline form “ANOUT” (dynamic)

This instruction activates or deactivates a dynamic analog output.


A maximum of 4 dynamic analog outputs can be activated at any one time.
ANOUT triggers an advance run stop.
The voltage is determined by a factor. The actual voltage level depends on the
following values:
 Velocity or function generator
For example, a velocity of 1 m/s with a factor of 0.5 results in a voltage of
5 V.
 Offset
For example, an offset of +0.15 for a voltage of 0.5 V results in a voltage
of 6.5 V.

Fig. 10-45: Inline form “ANOUT” (dynamic)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 347 / 491


KUKA System Software 8.3

Item Description
1 Activation or deactivation of the analog output
 ON
 OFF
2 Number of the analog output
 CHANNEL_1 … CHANNEL_32
3 Factor for the voltage
 0 … 10 (intervals: 0.01)
4  VEL_ACT: The voltage is dependent on the velocity.
 TECHVAL[1] … TECHVAL[6]: The voltage is controlled by a
function generator.
5 Value by which the voltage is increased or decreased
 -1 … +1 (intervals: 0.01)
6 Time by which the output signal is delayed (+) or brought forward
(-)
 -0.2 … +0.5 s

10.6.9 Programming a wait time - WAIT

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line after which the logic instruction is to be in-
serted.
2. Select the menu sequence Commands > Logic > WAIT.
3. Set the parameters in the inline form.
(>>> 10.6.10 "Inline form “WAIT”" Page 348)
4. Save instruction with Cmd Ok.

10.6.10 Inline form “WAIT”

WAIT can be used to program a wait time. The robot motion is stopped for a
programmed time. WAIT always triggers an advance run stop.

Fig. 10-46: Inline form “WAIT”

Item Description
1 Wait time
 ≥0s

10.6.11 Programming a signal-dependent wait function - WAITFOR

Precondition  A program is selected.


 Operating mode T1

348 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Procedure 1. Position the cursor in the line after which the logic instruction is to be in-
serted.
2. Select the menu sequence Commands > Logic > WAITFOR.
3. Set the parameters in the inline form.
(>>> 10.6.12 "Inline form “WAITFOR”" Page 349)
4. Save instruction with Cmd Ok.

10.6.12 Inline form “WAITFOR”

The instruction sets a signal-dependent wait function.


If required, several signals (maximum 12) can be linked. If a logic operation is
added, boxes are displayed in the inline form for the additional signals and
links.

Fig. 10-47: Inline form “WAITFOR”

Item Description
1 Add external logic operation. The operator is situated between the
bracketed expressions.
 AND
 OR
 EXOR
Add NOT.
 NOT
 [Empty box]
Enter the desired operator by means of the corresponding button.
2 Add internal logic operation. The operator is situated inside a
bracketed expression.
 AND
 OR
 EXOR
Add NOT.
 NOT
 [Empty box]
Enter the desired operator by means of the corresponding button.
3 Signal for which the system is waiting
 IN
 OUT
 CYCFLAG
 TIMER
 FLAG
4 Number of the signal

Issued: 14.01.2015 Version: KSS 8.3 SI V4 349 / 491


KUKA System Software 8.3

Item Description
5 If a name exists for the signal, this name is displayed.
Only for the user group “Expert”:
A name can be entered by pressing Long text. The name is freely
selectable.
6  CONT: Execution in the advance run
 [Empty box]: Execution with advance run stop

10.6.13 Switching on the path - SYN OUT

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line after which the logic instruction is to be in-
serted.
2. Select the menu sequence Commands > Logic > OUT > SYN OUT.
3. Set the parameters in the inline form.
(>>> 10.6.14 "Inline form “SYN OUT”, option “START/END”" Page 350)
(>>> 10.6.15 "Inline form “SYN OUT”, option “PATH”" Page 353)
4. Save instruction with Cmd Ok.

10.6.14 Inline form “SYN OUT”, option “START/END”

The switching action can be triggered relative to the start or end point of the
motion. The switching action can be delayed or brought forward. The motion
can be a LIN, CIRC or PTP motion.
Possible applications include:
 Closing or opening the weld gun during spot welding
 Switching the welding current on/off during arc welding
 Starting or stopping the flow of adhesive in bonding or sealing applica-
tions.

Fig. 10-48: Inline form “SYN OUT”, option “START/END”

Item Description
1 Output number
2 If a name exists for the output, this name is displayed.
Only for the user group “Expert”:
A name can be entered by pressing Long text. The name is freely
selectable.
3 State to which the output is switched
 TRUE
 FALSE

350 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Item Description
4 Point to which SYN OUT refers:
 START: Start point of the motion
 END: End point of the motion
5 Switching action delay
 -1,000 … +1,000 ms
Note: The time specification is absolute, i.e. the switching point
varies according to the velocity of the robot.

Example 1 Start point and end point are exact positioning points.
LIN P1 VEL=0.3m/s CPDAT1
LIN P2 VEL=0.3m/s CPDAT2
SYN OUT 1 '' State= TRUE at START Delay=20ms
SYN OUT 2 '' State= TRUE at END Delay=-20ms
LIN P3 VEL=0.3m/s CPDAT3
LIN P4 VEL=0.3m/s CPDAT4

Fig. 10-49

OUT 1 and OUT 2 specify approximate positions at which switching is to oc-


cur. The dotted lines indicate the switching limits.
Switching limits:
 START: The switching point can be delayed, at most, as far as exact po-
sitioning point P3 (+ ms).
 END: The switching point can be brought forward, at most, as far as exact
positioning point P2 (- ms).
If greater values are specified for the delay, the controller automatically switch-
es at the switching limit.

Example 2 Start point is exact positioning point, end point is approximated.


LIN P1 VEL=0.3m/s CPDAT1
LIN P2 VEL=0.3m/s CPDAT2
SYN OUT 1 '' State= TRUE at START Delay=20ms
SYN OUT 2 '' State= TRUE at END Delay=-20ms
LIN P3 CONT VEL=0.3m/s CPDAT3
LIN P4 VEL=0.3m/s CPDAT4

Issued: 14.01.2015 Version: KSS 8.3 SI V4 351 / 491


KUKA System Software 8.3

Fig. 10-50

OUT 1 and OUT 2 specify approximate positions at which switching is to oc-


cur. The dotted lines indicate the switching limits. M = middle of the approxi-
mate positioning range.
Switching limits:
 START: The switching point can be delayed, at most, as far as the start of
the approximate positioning range of P3 (+ ms).
 END: The switching point can be brought forward, at most, as far as the
start of the approximate positioning range of P3 (-).
The switching point can be delayed, at most, as far as the end of the ap-
proximate positioning range of P3 (+).
If greater values are specified for the delay, the controller automatically switch-
es at the switching limit.

Example 3 Start point and end point are approximated


LIN P1 VEL=0.3m/s CPDAT1
LIN P2 CONT VEL=0.3m/s CPDAT2
SYN OUT 1 '' State= TRUE at START Delay=20ms
SYN OUT 2 '' State= TRUE at END Delay=-20ms
LIN P3 CONT VEL=0.3m/s CPDAT3
LIN P4 VEL=0.3m/s CPDAT4

Fig. 10-51

OUT 1 and OUT 2 specify approximate positions at which switching is to oc-


cur. The dotted lines indicate the switching limits. M = middle of the approxi-
mate positioning range.

352 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Switching limits:
 START: The switching point can be situated, at the earliest, at the end of
the approximate positioning range of P2.
The switching point can be delayed, at most, as far as the start of the ap-
proximate positioning range of P3 (+ ms).
 END: The switching point can be brought forward, at most, as far as the
start of the approximate positioning range of P3 (-).
The switching point can be delayed, at most, as far as the end of the ap-
proximate positioning range of P3 (+).
If greater values are specified for the delay, the controller automatically switch-
es at the switching limit.

10.6.15 Inline form “SYN OUT”, option “PATH”

The switching action refers to the end point of the motion. The switching action
can be shifted in space and delayed or brought forward. The motion can be a
LIN or CIRC motion. It must not be a PTP motion.

Fig. 10-52: Inline form “SYN OUT”, option “PATH”

Item Description
1 Output number
2 If a name exists for the output, this name is displayed.
Only for the user group “Expert”:
A name can be entered by pressing Long text. The name is freely
selectable.
3 State to which the output is switched
 TRUE
 FALSE
4  PATH: SYN OUT refers to the end point of the motion.
5 This box is only displayed if PATH has been selected.
Distance from the switching point to the end point
 -2,000 … +2,000 mm
6 Switching action delay
 -1,000 … +1,000 ms
Note: The time specification is absolute, i.e. the switching point
varies according to the velocity of the robot.

Example 1 Start point is exact positioning point, end point is approximated.


LIN P1 VEL=0.3m/s CPDAT1
SYN OUT 1 '' State= TRUE at START PATH=20mm Delay=-5ms
LIN P2 CONT VEL=0.3m/s CPDAT2
LIN P3 CONT VEL=0.3m/s CPDAT3
LIN P4 VEL=0.3m/s CPDAT4

Issued: 14.01.2015 Version: KSS 8.3 SI V4 353 / 491


KUKA System Software 8.3

Fig. 10-53

OUT 1 specifies the approximate position at which switching is to occur. The


dotted lines indicate the switching limits. M = middle of the approximate posi-
tioning range.
Switching limits:
 The switching point can be brought forward, at most, as far as exact posi-
tioning point P1.
 The switching point can be delayed, at most, as far as the next exact po-
sitioning point P4. If P3 was an exact positioning point, the switching point
could be delayed, at most, as far as P3.
If greater values are specified for the shift in space or time, the controller au-
tomatically switches at the switching limit.

Example 2 Start point and end point are approximated


LIN P1 CONT VEL=0.3m/s CPDAT1
SYN OUT 1 '' State= TRUE at START PATH=20mm Delay=-5ms
LIN P2 CONT VEL=0.3m/s CPDAT2
LIN P3 CONT VEL=0.3m/s CPDAT3
LIN P4 VEL=0.3m/s CPDAT4

Fig. 10-54

OUT 1 specifies the approximate position at which switching is to occur. The


dotted lines indicate the switching limits. M = middle of the approximate posi-
tioning range.

354 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


10 Programming for user group “User” (...

Switching limits:
 The switching point can be brought forward, at most, as far as the start of
the approximate positioning range of P1.
 The switching point can be delayed, at most, as far as the next exact po-
sitioning point P4. If P3 was an exact positioning point, the switching point
could be delayed, at most, as far as P3.
If greater values are specified for the shift in space or time, the controller au-
tomatically switches at the switching limit.

10.6.16 Setting a pulse on the path - SYN PULSE

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line after which the logic instruction is to be in-
serted.
2. Select the menu sequence Commands > Logic > OUT > SYN PULSE.
3. Set the parameters in the inline form.
(>>> 10.6.17 "Inline form “SYN PULSE”" Page 355)
4. Save instruction with Cmd Ok.

10.6.17 Inline form “SYN PULSE”

SYN PULSE can be used to trigger a pulse at the start or end point of the mo-
tion. The pulse can be shifted in time and/or space, i.e. it does not have to be
triggered exactly at the point, but can also be triggered before or after it.

Fig. 10-55: Inline form “SYN PULSE”

Item Description
1 Output number
2 If a name exists for the output, this name is displayed.
Only for the user group “Expert”:
A name can be entered by pressing Long text. The name is freely
selectable.
3 State to which the output is switched
 TRUE
 FALSE
4 Duration of the pulse
 0.1 … 3 s

Issued: 14.01.2015 Version: KSS 8.3 SI V4 355 / 491


KUKA System Software 8.3

Item Description
5 Point to which SYN PULSE refers:
 START: Start point of the motion
 END: End point of the motion
See SYN OUT for examples and switching limits.
(>>> 10.6.14 "Inline form “SYN OUT”, option “START/END”"
Page 350)
 PATH: SYN PULSE refers to the end point. An offset in space
is also possible.
See SYN OUT for examples and switching limits.
(>>> 10.6.15 "Inline form “SYN OUT”, option “PATH”" Page 353)
6 Distance from the switching point to the end point
 -2,000 … +2,000 mm
This box is only displayed if PATH has been selected.
7 Switching action delay
 -1,000 … +1,000 ms
Note: The time specification is absolute. The switching point var-
ies according to the velocity of the robot.

10.6.18 Modifying a logic instruction

Precondition  A program is selected.


 Operating mode T1

Procedure 1. Position the cursor in the line containing the instruction that is to be
changed.
2. Press Change. The inline form for this instruction is opened.
3. Change the parameters.
4. Save changes by pressing Cmd Ok.

356 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

11 Programming for user group “Expert” (KRL syntax)

In the case of programs with the following axis motions


or positions, the film of lubricant on the gear units of the
axes may break down:
 Motions <3°
 Oscillating motions
 Areas of gear units permanently facing upwards
It must be ensured that the gear units have a sufficient supply of oil. For this,
in the case of oscillating motions or short motions (<3°), programming must
be carried out in such a way that the affected axes regularly move more than
40° (e.g. once per cycle).
In the case of areas of gear units permanently facing upwards, sufficient oil
supply must be achieved by programming re-orientations of the in-line wrist.
In this way, the oil can reach all areas of the gear units by means of gravity.
Required frequency of re-orientations:
 With low loads (gear unit temperature <+35 °C): daily
 With medium loads (gear unit temperature +35 °C to 55 °C): hourly
 With heavy loads (gear unit temperature >+55 °C): every 10 minutes
Failure to observe this precaution may result in damage to the gear units.

If a selected program is edited in the user group “Expert”, the cursor


must then be removed from the edited line and positioned in any other
line!
Only in this way is it certain that the editing will be applied when the program
is deselected again.

11.1 Overview of KRL syntax

Variables and declarations


DECL (>>> 11.4.1 "DECL" Page 364)
ENUM (>>> 11.4.2 "ENUM" Page 365)
STRUC (>>> 11.4.3 "STRUC" Page 366)

Motion programming
PTP (>>> 11.5.1 "PTP" Page 368)
LIN, CIRC (>>> 11.5.3 "LIN, CIRC" Page 369)
PTP_REL (>>> 11.5.2 "PTP_REL" Page 368)
LIN_REL, CIRC_REL (>>> 11.5.4 "LIN_REL, CIRC_REL" Page 370)
SPLINE … ENDSPLINE (>>> 11.6.1 "SPLINE ... ENDSPLINE" Page 375)
PTP_SPLINE … ENDSPLINE (>>> 11.6.2 "PTP_SPLINE ... ENDSPLINE" Page 376)
SLIN, SCIRC, SPL (>>> 11.6.3 "SLIN, SCIRC, SPL" Page 377)
SLIN_REL, SCIRC_REL, SPL_REL (>>> 11.6.4 "SLIN_REL, SCIRC_REL, SPL_REL"
Page 378)
SPTP (>>> 11.6.5 "SPTP" Page 380)
SPTP_REL (>>> 11.6.6 "SPTP_REL" Page 381)
TIME_BLOCK (>>> 11.6.8 "TIME_BLOCK" Page 383)
CONST_VEL (>>> 11.6.9 "CONST_VEL" Page 386)
STOP WHEN PATH (>>> 11.6.10 "STOP WHEN PATH" Page 389)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 357 / 491


KUKA System Software 8.3

Program execution control


CONTINUE (>>> 11.7.1 "CONTINUE" Page 391)
EXIT (>>> 11.7.2 "EXIT" Page 391)
FOR … TO … ENDFOR (>>> 11.7.3 "FOR ... TO ... ENDFOR" Page 392)
GOTO (>>> 11.7.4 "GOTO" Page 392)
HALT (>>> 11.7.5 "HALT" Page 393)
IF … THEN … ENDIF (>>> 11.7.6 "IF ... THEN ... ENDIF" Page 393)
LOOP … ENDLOOP (>>> 11.7.7 "LOOP ... ENDLOOP" Page 394)
ON_ERROR_PROCEED (>>> 11.7.8 "ON_ERROR_PROCEED" Page 394)
REPEAT … UNTIL (>>> 11.7.9 "REPEAT ... UNTIL" Page 399)
SWITCH … CASE … ENDSWITCH (>>> 11.7.10 "SWITCH ... CASE ... ENDSWITCH"
Page 400)
WAIT FOR … (>>> 11.7.11 "WAIT FOR …" Page 401)
WAIT SEC … (>>> 11.7.12 "WAIT SEC …" Page 402)
WHILE … ENDWHILE (>>> 11.7.13 "WHILE ... ENDWHILE" Page 402)

Inputs/outputs
ANIN (>>> 11.8.1 "ANIN" Page 403)
ANOUT (>>> 11.8.2 "ANOUT" Page 404)
PULSE (>>> 11.8.3 "PULSE" Page 405)
SIGNAL (>>> 11.8.4 "SIGNAL" Page 409)

Subprograms and functions


DEFFCT … ENDFCT (>>> 11.9.3 "DEFFCT ... ENDFCT" Page 411)
RETURN (>>> 11.9.4 "RETURN" Page 411)

Interrupt programming
BRAKE (>>> 11.10.1 "BRAKE" Page 416)
INTERRUPT (>>> 11.10.3 "INTERRUPT" Page 418)
INTER- (>>> 11.10.2 "INTERRUPT ... DECL ... WHEN ... DO"
RUPT … DECL … WHEN … DO Page 417)
RESUME (>>> 11.10.4 "RESUME" Page 420)

Path-related switching actions (=Trigger)


TRIGGER WHEN DISTANCE (>>> 11.11.1 "TRIGGER WHEN DISTANCE" Page 421)
TRIGGER WHEN PATH (>>> 11.11.2 "TRIGGER WHEN PATH" Page 424)

Communication
(>>> 11.12 "Communication" Page 432)

Operators
Arithmetic operators (>>> 11.13.1 "Arithmetic operators" Page 433)
Geometric operator (>>> 11.13.2 "Geometric operator" Page 434)
Relational operators (>>> 11.13.3 "Relational operators" Page 437)
Logic operators (>>> 11.13.4 "Logic operators" Page 438)
Bit operators (>>> 11.13.5 "Bit operators" Page 438)
Priority of the operators (>>> 11.13.6 "Priority of the operators" Page 440)

358 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

System functions
DELETE_BACKWARD_BUFFER() (>>> 11.14.1 "DELETE_BACKWARD_BUFFER()"
Page 441)
ROB_STOP() (>>> 11.14.2 "ROB_STOP() and
ROB_STOP_RELEASE()" Page 442)
SET_BRAKE_DELAY() (>>> 11.14.3 "SET_BRAKE_DELAY()" Page 443)
VARSTATE() (>>> 11.14.4 "VARSTATE()" Page 446)

Manipulating string variables


(>>> 11.15 "Editing string variables" Page 447)

11.2 Symbols and fonts

The following symbols and fonts are used in the syntax descriptions:

Syntax element Representation


KRL code  Courier font
 Upper-case letters
Examples: GLOBAL; ANIN ON; OFFSET
Elements that must be  Italics
replaced by program-spe-  Upper/lower-case letters
cific entries
Examples: Distance; Time; Format
Optional elements  In angle brackets
Example: <STEP Increment>
Elements that are mutually  Separated by the "|" symbol
exclusive
Example: IN |OUT

11.3 Important KRL terms

11.3.1 SRC files and DAT files

A KRL program generally consists of an SRC file and a DAT file of the same
name.
 SRC file: contains the program code.
 DAT file: contains permanent data and point coordinates. The DAT file is
also called a data list.
The SRC file and associated DAT file together are called a module.
Depending on the user group, programs in the Navigator are displayed as
modules or individual files:
 User group "User"
A program is displayed as a module. The SRC file and the DAT file exist
in the background. They are not visible for the user and cannot be edited
individually.
 User group "Expert"
By default, the SRC file and the DAT file are displayed individually. They
can be edited individually.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 359 / 491


KUKA System Software 8.3

11.3.2 Naming conventions and keywords

Names Examples of names in KRL: variable names, program names, point names
 Names in KRL can have a maximum length of 24 characters.
In some cases, less than 24 characters are allowed, e.g. a maximum of
23 characters in inline forms.
 Names in KRL can consist of letters (A-Z), numbers (0-9) and the signs “_”
and “$”.
 Names in KRL must not begin with a number.
 Names in KRL must not be keywords.
Other restrictions may apply in the case of inline forms in technology packag-
es.

The names of all system variables begin with the “$” sign. To avoid
confusion, do not begin the names of user-defined variables with this
sign.

Keywords Keywords are sequences of letters having a fixed meaning. They must not be
used in programs in any way other than with this meaning. No distinction is
made between uppercase and lowercase letters. A keyword remains valid ir-
respective of the way in which it is written.
Example: The sequence of letters CASE is an integral part of the KRL syntax
SWITCH … CASE … ENDSWITCH. For this reason, CASE must not be used
in any other way, e.g. as a variable name.
The system distinguishes between reserved and non-reserved keywords:
 Reserved keywords
These may only be used with their defined meaning.
 Non-reserved keywords
With non-reserved keywords, the meaning is restricted to a particular con-
text. Outside of this context, a non-reserved keyword is interpreted by the
compiler as a name.

In practice, it is not helpful to distinguish between reserved and non-


reserved keywords. To avoid error messages or compiler problems,
keywords are thus never used other than with their defined meaning.

Overview of important keywords:


All elements of the KRL syntax described in this documentation that are not
program-specific are keywords.
The following important keywords are worth a particular mention:

AXIS ENDFCT
BOOL ENDFOR
CHAR ENDIF
CAST_FROM ENDLOOP
CAST_TO ENDSWITCH
CCLOSE ENDWHILE
CHANNEL EXT
CIOCTL EXTFCT
CONFIRM FALSE
CONST FRAME
COPEN GLOBAL
CREAD INT

360 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

CWRITE MAXIMUM
DEF MINIMUM
DEFAULT POS
DEFDAT PRIO
DEFFCT PUBLIC
E6AXIS SREAD
E6POS SWRITE
END REAL
ENDDAT TRUE

11.3.3 Data types

Overview There are 2 kinds of data types:


 User-defined data types
User-defined data types are always derived from the data types ENUM or
STRUC.
 Predefined data types, e.g.:
 Simple data types
 Data types for motion programming
The following simple data types are predefined:

Data type Keyword Description


Integer INT Integer
 -2³¹-1 … 2³¹-1
Examples: 1; 32; 345
Real REAL Floating-point number
 +1.1E-38 … +3.4E+38
Examples: 1.43; 38.50; 300.25
Boolean BOOL Logic state
 TRUE
 FALSE
Character CHAR 1 character
 ASCII character
Examples: "A"; "1"; "q"

The following data types for motion programming are predefined:


Structure type AXIS
A1 to A6 are angle values (rotational axes) or translation values (translational
axes) for the axis-specific movement of robot axes 1 to 6.
STRUC AXIS REAL A1, A2, A3, A4, A5, A6

Structure type E6AXIS


E1 to E6 are angle values or translation values of the external axes 7 to 12.
STRUC E6AXIS REAL A1, A2, A3, A4, A5, A6, E1, E2, E3, E4, E5, E6

Structure type FRAME


X, Y and Z are space coordinates, while A, B and C are the orientation of the
coordinate system.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 361 / 491


KUKA System Software 8.3

STRUC FRAME REAL X, Y, Z, A, B, C

Structure types POS and E6POS


S (Status) and T (Turn) define axis positions unambiguously.
STRUC POS REAL X, Y, Z, A, B, C, INT S, T

STRUC E6POS REAL X, Y, Z, A, B, C, E1, E2, E3, E4, E5, E6, INT S, T

11.3.4 Areas of validity

Local
Data object Area of validity
Variable  If the object was defined in an SRC file:
Signal It is valid in the program routine in which it was defined, i.e. between DEF
and END (main program OR local subprogram).
Variables defined in an SRC file are called “runtime variables”.
 If the object was defined in a DAT file:
It is valid in the SRC file that belongs to the DAT file.
Constant Valid in the module to which the data list in which the constant was declared
belongs.
User-defined  If the data type was defined in an SRC file: it is valid at, or below, the pro-
data type gram level in which it was declared.
 If the data type was defined in a DAT file: it is valid in the SRC file that be-
longs to the DAT file.
Subprogram Valid in the main program of the shared SRC file.
Function Valid in the main program of the shared SRC file.
Interrupt Valid at, or below, the programming level in which it was declared.

Global Always globally valid:


 The first program in an SRC file. By default, it bears the name of the SRC
file.
 Predefined data types
 KRL system variables
 Variables and signals defined in $CONFIG.DAT
The data objects named under “local” can be made available globally.
 (>>> 11.3.4.1 "Making subprograms, functions and interrupts available
globally" Page 362)
 (>>> 11.3.4.2 "Making variables, constants, signals and user data types
available globally" Page 363)
If there are local and global objects with the same name, the compiler uses the
local object within its area of validity.

11.3.4.1 Making subprograms, functions and interrupts available globally

Use the keyword GLOBAL in the declaration.


Example of subprogram:
...
END
-------------------------------
GLOBAL DEF MY_SUBPROG
...

362 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Example of function:
...
END
-------------------------------
GLOBAL DEFFCT INT MY_FCT(my_var:IN)
...

Example of interrupt:
GLOBAL INTERRUPT DECL 23 WHEN $IN[12]==TRUE DO UP1(20,VALUE)

11.3.4.2 Making variables, constants, signals and user data types available globally

Variables, signals and user-defined data types can be made available globally
via a data list or $CONFIG.DAT.
Constants must always be declared and, at the same time, initialized in a data
list. For this reason, they can only be made available globally via a data list.

Data list Making the object available globally via a data list:
1. Insert the keyword PUBLIC into the program header of the data list:
DEFDAT MY_PROG PUBLIC

2. Use the keyword GLOBAL in the declaration.


Example (declaration of a variable):
DEFDAT MY_PROG PUBLIC
EXTERNAL DECLARATIONS
DECL GLOBAL INT counter
...
ENDDAT

GLOBAL can only be used for variables, signals and user-defined data types
if they have been declared in a data list.
PUBLIC is used exclusively for the purpose described here, i.e. together with
GLOBAL in data lists for making specific data objects available globally. PUB-
LIC on its own has no effect.

$CONFIG.DAT  Declare the object in the USER GLOBALS section in $CONFIG.DAT.


The keyword GLOBAL is not required here, nor can it be used here.

Restriction Data types defined in a data list using the keyword GLOBAL must not be used
in $CONFIG.DAT.
Example:
In DEFDAT PROG(), the enumeration type SWITCH_TYP has been defined
with the keyword GLOBAL:
DEFDAT PROG()

GLOBAL ENUM SWITCH_TYP ON, OFF


...

If this data type is used in $CONFIG.DAT, the compiler signals the error “Type
unknown: *** DECL SWITCH_TYP MY_VAR”.

DEFDAT $CONFIG

DECL SWITCH_TYP MY_VAR


...

Issued: 14.01.2015 Version: KSS 8.3 SI V4 363 / 491


KUKA System Software 8.3

11.3.5 Constants

The value of a constant can no longer be modified during program execution


after initialization. Constants can be used to prevent a value from being
changed accidentally during program execution.
Constants must be declared and, at the same time, initialized in a data list. The
data type must be preceded by the keyword CONST.
DECL <GLOBAL> CONST Data type Variable name = Value

11.4 Variables and declarations

11.4.1 DECL

Description Declaration of variables, arrays and constants

Syntax Declaration of variables


Declaration of variables in programs:
<DECL> Data type Name1 <, ..., NameN>
Declaration of variables in data lists:
<DECL> <GLOBAL> Data type Name1 <, ..., NameN>
Declaration of variables in data lists with simultaneous initialization:
<DECL> <GLOBAL> Data type Name = Value
In the case of declaration with simultaneous initialization, a separate DECL
declaration is required for each variable. It is not possible to declare and ini-
tialize several variables with a single DECL declaration.
Declaration of arrays
Declaration of arrays in programs:
<DECL> Data type Name1 [Dimension1 <, ..., Dimension3> ] <, ..., NameN
[DimensionN1 <,..., DimensionN3>] >
Declaration of arrays in data lists:
<DECL> <GLOBAL> Data type Name1 [Dimension1 <, ..., Dimension3> ] <, ...,
NameN [DimensionN1 <,..., DimensionN3>] >
For the declaration of arrays or constant arrays in data lists with simultaneous
initialization:
 It is not permissible to declare and initialize in a single line. The initializa-
tion must, however, follow directly after the line containing the declaration.
There must be no lines, including blank lines, in between.
 If several elements of an array are initialized, the elements must be spec-
ified in ascending sequence of the array index (starting from the right-hand
array index).
 If the same character string is to be assigned to all of the elements of an
array of type CHAR as a default setting, it is not necessary to initialize each
array element individually. The right-hand array index is omitted. (No index
is written for a one-dimensional array index.)
Declaration of arrays in data lists with simultaneous initialization:
<DECL> <GLOBAL> Data type Name [Dimension1 <,..., Dimension3> ]
Name [1 <, 1, 1> ] = Value1
<Name [1 <, 1, 2> ] = Value2>
...
Name [Dimension1 <, Dimension2, Dimension3> ] = ValueN

364 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Declaration of constant arrays in data lists with simultaneous initialization:


DECL <GLOBAL> CONST Data type Name [Dimension1 <,..., Dimension3> ]
Name [1 <, 1, 1> ] = Value1
<Name [1 <, 1, 2> ] = Value2>
...
Name [Dimension1 <, Dimension2, Dimension3> ] = ValueN

Explanation of Element Description


the syntax DECL DECL can be omitted if Data type is a predefined data type.
If Data type is a user-defined data type, then DECL is oblig-
atory.
GLOBAL (>>> 11.3.4 "Areas of validity" Page 362)
CONST The keyword CONST must only be used in data lists.
Data type Specification of the desired data type
Name Name of the object (variable, array or constant) that is
being declared.
Dimension Type: INT
Dimension defines the number of array elements for the
dimension in question. Arrays have a minimum of 1 and a
maximum of 3 dimensions.
Value The data type of Value must be compatible with Data type,
but not necessarily identical. If the data types are compati-
ble, the system automatically matches them.

Example 1 Declarations with predefined data types. The keyword DECL can also be omit-
ted.
DECL INT X
DECL INT X1, X2
DECL REAL ARRAY_A[7], ARRAY_B[5], A

Example 2 Declarations of arrays with simultaneous initialization (only possible in data


lists).
INT A[7]
A[1]=27
A[2]=313
A[6]=11
CHAR TEXT1[80]
TEXT1[]="message"
CHAR TEXT2[2,80]
TEXT2[1,]="first message"
TEXT2[2,]="second message"

11.4.2 ENUM

Description Definition of an enumeration type (= ENUM data type)

Syntax <GLOBAL> ENUM NameEnumType Constant1<, ..., ConstantN>

Issued: 14.01.2015 Version: KSS 8.3 SI V4 365 / 491


KUKA System Software 8.3

Explanation of Element Description


the syntax GLOBAL (>>> 11.3.4 "Areas of validity" Page 362)
Note: Data types defined using the keyword GLOBAL must
not be used in $CONFIG.DAT.
NameEnum- Name of the new enumeration type.
Type
Recommendation: For user-defined data types, assign
names ending in _TYPE, to distinguish them from variable
names.
Constant The constants are the values that a variable of the enumer-
ation type can take. Each constant may only occur once in
the definition of the enumeration type.

Example 1 Definition of an enumeration type with the name COUNTRY_TYPE.


ENUM COUNTRY_TYP SWITZERLAND, AUSTRIA, ITALY, FRANCE

Declaration of a variable of type COUNTRY_TYPE:


DECL COUNTRY_TYP MYCOUNTRY

Initialization of the variable of type COUNTRY_TYPE:


MYCOUNTRY = #AUSTRIA

Example 2 An enumeration type with the name SWITCH_TYPE and the constants ON
and OFF is defined.
DEF PROG()
ENUM SWITCH_TYP ON, OFF
DECL SWITCH_TYP GLUE
IF A>10 THEN
GLUE=#ON
ELSE
GLUE=#OFF
ENDIF
END

Restriction Data types defined in a data list using the keyword GLOBAL must not be used
in $CONFIG.DAT.
Example:
In DEFDAT PROG(), the enumeration type SWITCH_TYP has been defined
with the keyword GLOBAL:
DEFDAT PROG()

GLOBAL ENUM SWITCH_TYP ON, OFF


...

If this data type is used in $CONFIG.DAT, the compiler signals the error “Type
unknown: *** DECL SWITCH_TYP MY_VAR”.

DEFDAT $CONFIG

DECL SWITCH_TYP MY_VAR


...

11.4.3 STRUC

Description Definition of a structure type (= STRUC data type). Several data types are
combined to form a new data type.

366 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Syntax <GLOBAL> STRUC Name structure type Data type1 Component1A<,


Component1B, ...> < , Data type2 Component2A<, Component2B, ...>>

Explanation of Element Description


the syntax GLOBAL (>>> 11.3.4 "Areas of validity" Page 362)
Note: Data types defined using the keyword GLOBAL must
not be used in $CONFIG.DAT.
Name Name of the new structure type. The names of user-
structure type defined data types should end in _TYPE, to distinguish
them from variable names.
Data type TYPE: Any data type
Structure types are also permissible as data types.
Component Name of the component. It may only be used once in the
structure type.
Arrays can only be used as components of a structure type
if they have the type CHAR and are one-dimensional. In
this case, the array limit follows the name of the array in
square brackets in the definition of the structure type.

Value assignment There are 2 ways of assigning values to variables based on a STRUC data
type:
 Assignment of values to several components of a variable: with an aggre-
gate
 Assignment of a value to a single component of a variable: with the point
separator
Information regarding the aggregate:
 The values of an aggregate can be simple constants or themselves aggre-
gates; they may not, however, be variables (see also Example 3).
 Not all components of the structure have to be specified in an aggregate.
 The components do not need to be specified in the order in which they
have been defined.
 Each component may only be contained once in an aggregate.
 The name of the structure type can be specified at the beginning of an ag-
gregate, separated by a colon.

Example 1 Definition of a structure type CAR_TYPE with the components AIR_COND,


YEAR and PRICE.
STRUC CAR_TYP BOOL AIR_COND, INT YEAR, REAL PRICE

Declaration of a variable of type CAR_TYPE:


DECL CAR_TYP MYCAR

Initialization of the variable MYCAR of type CAR_TYPE with an aggregate:


MYCAR = {CAR_TYP: PRICE 15000, AIR_COND TRUE, YEAR 2003}

A variable based on a structure type does not have to be initialized with an ag-
gregate. It is also possible to initialize the components individually with the
point separator.
Modification of an individual component using the point separator:
MYCAR.AIR_COND = FALSE

Example 2 Definition of a structure type S_TYPE with the component NUMBER of data
type REAL and of the array component TEXT[80] of data type CHAR.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 367 / 491


KUKA System Software 8.3

STRUC S_TYP REAL NUMBER, CHAR TEXT[80]

Example 3 Example of aggregates as values of an aggregate:


STRUC INNER_TYP INT A, B, C
STRUC OUTER_TYP INNER_TYP Q, R
DECL OUTER_TYP MYVAR
...
MYVAR = {Q {A 1, B 4}, R {A 3, C 2}}

11.5 Motion programming: PTP, LIN, CIRC

11.5.1 PTP

Description Executes a point-to-point motion to the end point. The coordinates of the end
point are absolute.

Syntax PTP End point <Approximation>

Explanation of Element Description


the syntax End point Type: POS, E6POS, AXIS, E6AXIS, FRAME
The end point can be specified in Cartesian or axis-specific
coordinates. Cartesian coordinates refer to the BASE coor-
dinate system.
If not all components of the end point are specified, the
controller takes the values of the previous position for the
missing components.
Approxima- Approximation causes the end point to be approximated. At
tion the same time, this parameter defines the earliest point at
which the approximate positioning can begin.
(>>> 11.5.5 "Approximation parameters for PTP, LIN CIRC
and …_REL" Page 372)

Example 1 End point specified in Cartesian coordinates.


PTP {X 12.3,Y 100.0,Z 50,A 9.2,B 50,C 0,S ’B010’,T ’B1010’}

Example 2 End point specified in axis-specific coordinates. The end point is approximat-
ed.
PTP {A1 10,A2 -80.6,A3 -50,A4 0,A5 14.2, A6 0} C_DIS

Example 3 End point specified with only 2 components. For the rest of the components,
the controller takes the values of the previous position.
PTP {Z 500,X 123.6}

11.5.2 PTP_REL

Description Executes a point-to-point motion to the end point. The coordinates of the end
point 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 en-
tire REL motion again, starting from the position at which it was inter-
rupted.

368 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

For information about the response of the robot controller in the case of infi-
nitely rotating axes: (>>> 11.5.6 "REL motions for infinitely rotating axes"
Page 374)

Syntax PTP_REL End point <Approximation> <#BASE|#TOOL>

Explanation of Element Description


the syntax End point Type: POS, E6POS, AXIS, E6AXIS
The end point can be specified in Cartesian or axis-specific
coordinates. The controller interprets the coordinates as
relative to the current position. Cartesian coordinates refer
to the BASE coordinate system.
If not all components of the end point are specified, the
controller sets the value of the missing components to 0. In
other words, the absolute values of these components
remain unchanged.
Approxima- Approximation causes the end point to be approximated. At
tion the same time, this parameter defines the earliest point at
which the approximate positioning can begin.
(>>> 11.5.5 "Approximation parameters for PTP, LIN CIRC
and …_REL" Page 372)
#BASE, Only permissible if the end point was specified in Cartesian
#TOOL coordinates.
 #BASE (default): The coordinates of this end point refer
to the coordinate system that belongs to the physical
base.
 #TOOL: The coordinates of this end point refer to the
coordinate system that belongs to the physical tool.
$IPO_MODE has no influence on the meaning of #BASE
and #TOOL.

Example 1 Axis 2 is moved 30 degrees in a negative direction. None of the other axes
moves.
PTP_REL {A2 -30}

Example 2 The robot moves 100 mm in the X direction and 200 mm in the negative Z di-
rection from the current position. Y, A, B, C and S remain constant. T is calcu-
lated in relation to the shortest path.
PTP_REL {X 100,Z -200}

11.5.3 LIN, CIRC

Description LIN:
LIN executes a linear motion to the end point. The coordinates of the end point
are absolute.
CIRC:
CIRC executes a circular motion. An auxiliary point and an end point must be
specified in order for the controller to be able to calculate the circular motion.
The coordinates of the auxiliary point and end point are absolute.

Syntax LIN:
LIN End point <Approximation>

Issued: 14.01.2015 Version: KSS 8.3 SI V4 369 / 491


KUKA System Software 8.3

CIRC:
CIRC Auxiliary point, End point<, CA Circular angle> <Approximation>

Explanation of Element Description


the syntax Auxiliary point Type: POS, E6POS, FRAME
If not all components of the auxiliary point are specified, the
controller takes the values of the previous position for the
missing components.
The orientation angles and the Status and Turn specifica-
tions for an auxiliary point are always disregarded.
The auxiliary point cannot be approximated. The motion
always stops exactly at this point.
The coordinates refer to the BASE coordinate system.
End point Type: POS, E6POS, FRAME
If not all components of the end point are specified, the
controller takes the values of the previous position for the
missing components.
The Status and Turn specifications for an end point of type
POS or E6POS are disregarded.
The coordinates refer to the BASE coordinate system.
Circular angle Unit: Degrees; without restriction
(>>> 9.9 "Circular angle" Page 300)
Approxima- Approximation causes the end point to be approximated. At
tion the same time, this parameter defines the earliest point at
which the approximate positioning can begin.
(>>> 11.5.5 "Approximation parameters for PTP, LIN CIRC
and …_REL" Page 372)

Examples End point with two components. For the rest of the components, the controller
takes the values of the previous position.
LIN {Z 500,X 123.6}

The end point of the circular motion is defined by a circular angle of 260°. The
end point is approximated.
CIRC {X 5,Y 0, Z 9.2},{X 12.3,Y 0,Z -5.3,A 9.2,B -5,C 20}, CA 260
C_ORI

11.5.4 LIN_REL, CIRC_REL

Description LIN_REL:
LIN_REL executes a linear motion to the end point. The coordinates of the end
point are relative to the current position.
CIRC_REL:
CIRC_REL executes a circular motion. An auxiliary point and an end point
must be specified in order for the controller to be able to calculate the circular
motion. The coordinates of the auxiliary point and end point are relative to the
current position.

370 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

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 en-
tire REL motion again, starting from the position at which it was inter-
rupted.

For information about the response of the robot controller in the case of infi-
nitely rotating axes: (>>> 11.5.6 "REL motions for infinitely rotating axes"
Page 374)

Syntax LIN_REL:
LIN_REL End point <Approximation> <#BASE|#TOOL>
CIRC_REL:
CIRC_REL Auxiliary point, End point<, CA Circular angle> <Approximation>
<#BASE|#TOOL>

Explanation of Element Description


the syntax Auxiliary point Type: POS, E6POS, FRAME
The auxiliary point must be specified in Cartesian coordi-
nates. The controller interprets the coordinates as relative
to the current position. The coordinates refer to the BASE
coordinate system.
If $ORI_TYPE, Status and/or Turn are specified, these
specifications are ignored.
If not all components of the auxiliary point are specified, the
controller sets the value of the missing components to 0. In
other words, the absolute values of these components
remain unchanged.
The orientation angles and the Status and Turn specifica-
tions for an auxiliary point are disregarded.
The auxiliary point cannot be approximated. The motion
always stops exactly at this point.
End point Type: POS, E6POS, FRAME
The end point must be specified in Cartesian coordinates.
The controller interprets the coordinates as relative to the
current position.
CIRC_REL: The coordinates refer to the BASE coordinate
system.
LIN_REL: The coordinates can refer to the BASE or TOOL
coordinate system.
If not all components of the end point are specified, the
controller sets the value of the missing components to 0. In
other words, the absolute values of these components
remain unchanged.
The Status and Turn specifications for an end point of type
POS or E6POS are disregarded.
Circular angle Unit: Degrees; without restriction
(>>> 9.9 "Circular angle" Page 300)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 371 / 491


KUKA System Software 8.3

Element Description
Approxima- Approximation causes the end point to be approximated. At
tion the same time, this parameter defines the earliest point at
which the approximate positioning can begin.
(>>> 11.5.5 "Approximation parameters for PTP, LIN CIRC
and …_REL" Page 372)
#BASE,  #BASE (default): The coordinates of this end point refer
#TOOL to the coordinate system that belongs to the physical
base.
 #TOOL: The coordinates of this end point refer to the
coordinate system that belongs to the physical tool.
$IPO_MODE has no influence on the meaning of #BASE
and #TOOL.

Information about $APO is contained in the System Variables docu-


mentation.

Examples Example 1:
The TCP moves 100 mm in the X direction and 200 mm in the negative Z di-
rection from the current position in the BASE coordinate system. Y, A, B, C
and S remain constant. T is determined by the motion.
LIN_REL {X 100,Z -200}

Example 2:
The TCP moves 100 mm from the current position in the negative X direction
in the TOOL coordinate system. Y, Z, A, B, C and S remain constant. T is de-
termined by the motion.
This example is suitable for moving the tool backwards against the tool direc-
tion. The precondition is that the tool direction has been calibrated along the
X axis.
LIN_REL {X -100} #TOOL

Example 3:
The end point of the circular motion is defined by a circular angle of 500°. The
end point is approximated.
CIRC_REL {X 100,Y 3.2,Z -20},{Y 50},CA 500 C_VEL

11.5.5 Approximation parameters for PTP, LIN CIRC and …_REL

Parameters Not every parameter can be used in every instruction.

Parameter Description
C_PTP Approximation starts, at the earliest, when half the dis-
tance between the start point and end point relative to
the contour of the motion without approximation has
been covered.
C_DIS Approximation starts, at the earliest, when the distance
to the end point falls below the value of $APO.CDIS.

372 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Parameter Description
C_ORI Approximation starts, at the earliest, when the dominant
orientation angle falls below the value of $APO.CORI.
C_VEL Approximation starts, at the earliest, when the velocity
in the deceleration phase to the end point falls below the
value of $APO.CVEL.

Information about $APO is contained in the System Variables docu-


mentation.

PTP, The parameter must be C_PTP or C_DIS for PTP-PTP approximation. If a


PTP_REL second parameter is specified, the robot controller ignores it.
Two parameters can be specified for PTP-CP approximation. Of the two pa-
rameters, the one resulting in the smaller approximate positioning radius in the
given situation takes effect.
Possible combinations for PTP-CP approximation:

1st parameter → C_PTP C_DIS


2nd parameter ↓
(without) Possible Possible
C_DIS Possible Not possible!
C_VEL Possible Possible
C_ORI Possible Possible

Example: PTP-CP approximation


PTP XP1 C_PTP C_DIS
LIN XP2

The robot controller calculates the approximate positioning radius which would
result from each of the two parameters C_PTP and C_DIS under the current
conditions (velocity, etc.). Only the smaller of the two radii then actually has an
effect. It is the earliest limit at which approximate positioning can begin.

LIN, CIRC, The parameter must be C_DIS, C_VEL or C_ORI for CP-CP approximation. If
LIN_REL, a second parameter is specified, the robot controller ignores it.
CIRC_REL Two parameters can be specified for CP-PTP approximation. Of the two pa-
rameters, the one resulting in the smaller approximate positioning radius in the
given situation takes effect.
Possible combinations for CP-PTP approximation:

1st parameter → C_DIS C_VEL C_ORI


2nd parameter ↓
(without) Possible Possible Possible
C_PTP Possible Possible Possible
C_DIS Possible Possible Possible

Issued: 14.01.2015 Version: KSS 8.3 SI V4 373 / 491


KUKA System Software 8.3

11.5.6 REL motions for infinitely rotating axes

Description
Motion Description
SPTP_REL The end position is calculated directly by
For external axes only: adding the start position to the value spec-
ified in the REL statement. The overall
SLIN_REL, SCIRC_REL, length of the resulting path is irrelevant.
SPL_REL
PTP_REL The axis only moves to positions with the
For external axes only: following interval:

LIN_REL, CIRC_REL  From “Start position minus 180°”


 To “Start position plus 180°”
If the addition of the start position and the
value specified in the REL statement
gives a value outside this interval, the
actual end position is calculated as the dif-
ference of the value from 360° or a multi-
ple of 360°.

Examples Let A6 and E1 be infinitely rotating axes with the start position 120°.
Let the position at X be = 1500 mm.
Example 1:

Statement End position


SPTP_REL {A6 330} A6 = 450°
PTP_REL {A6 330} A6 = 90°

Explanation of end position of PTP_REL:


The permissible interval is from -60° to 300°. The position 450° is outside this
interval and is thus not addressed.
The end position must be within the interval AND be calculated as follows:
 450° ± (x * 360°)
The end position that meets these criteria is 90°.
450° - (1 * 360°) = 90°
Example 2:

Statement End position


SPTP_REL {A6 550} A6 = 670°
PTP_REL {A6 550} A6 = -50°

Example 3:

Statement End position


SPTP_REL {E1 950} E1 = 1070°
PTP_REL {E1 950} E1 = -10°

The statements do not contain any specification of the robot position. This im-
plicitly corresponds to: {X 0, Y 0, Z 0, A 0, B 0, C 0}
The Cartesian robot position thus remains unchanged in both cases.
Example 4:

374 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Statement End position


SPTP_REL {A6 0, E1 950} A6 = 120°, E1 = 1070°
PTP_REL {A6 0, E1 950} A6 = 120°, E1 = -10°

The robot position, if not specified, is implicitly Cartesian, as explained in ex-


ample 3.
If, however, the axis-specific robot position and not the Cartesian position is to
remain unchanged, a zero motion must be specified explicitly for at least one
robot axis, as illustrated here in example 4.
Example 5:

Statement End position


SLIN_REL {X 300, E1 880} X = 1800 mm, E1 = 1000°
LIN_REL {X 300, E1 880} X = 1800 mm, E1 = 280°

External axis motions are always axis-specific. They are thus specified in de-
grees, even in these statements that only allow Cartesian coordinates for robot
positions.

11.6 Motion programming: spline

11.6.1 SPLINE ... ENDSPLINE

Description SPLINE … ENDSPLINE defines a CP spline block. A CP spline block may


contain:
 SLIN, SCIRC and SPL segments (number limited only by the memory ca-
pacity)
 PATH trigger
 1 time block (TIME_BLOCK …)
or 1 constant velocity range (CONST_VEL …)
 STOP WHEN PATH
 Comments
 Blank lines
The block must not include any other instructions, e.g. variable assignments
or logic statements.

The start point of a spline block is the last point before the spline
block.
The end point of a spline block is the last point in the spline block.
A spline block does not trigger an advance run stop.

Syntax SPLINE < WITH SysVar1 = Value1 <, SysVar2 = Value2, … > >
Segment1

<SegmentN>
ENDSPLINE <C_SPL>

Issued: 14.01.2015 Version: KSS 8.3 SI V4 375 / 491


KUKA System Software 8.3

Explanation of Element Description


the syntax SysVar (>>> 11.6.7 "System variables for WITH" Page 382)
Value Value assignment to the system variable. The value is not
valid for segments which have their own value assigned.
With this one exception, the value remains valid, in the
usual way, until a new value is assigned to the system vari-
able.
The system variables can also be assigned values by
means of a function call. The same restrictions apply to
these functions as to functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger"
Page 431)
C_SPL  With C_SPL: the end point is approximated. $APO de-
fines the earliest point at which the approximate posi-
tioning can begin.
 Without C_SPL: the motion stops exactly at the end
point.

In System Software 8.2 and earlier, the identifier for approximate po-
sitioning with spline was “C_DIS”. If programs based on 8.2 or older
versions are used in higher versions of 8.x and contain C_DIS, this
can be retained and does not have to be changed to C_SPL.

Example SPLINE
SPL P1
TRIGGER WHEN PATH=GET_PATH() ONSTART DELAY=0 DO <subprog> PRIO=-1
SPL P2
SLIN P3
SPL P4
SCIRC P5, P6 WITH $VEL.CP=0.2
SPL P7 WITH $ACC={CP 2.0, ORI1 200, ORI2 200}
SCIRC P8, P9
SPL P10
ENDSPLINE

11.6.2 PTP_SPLINE ... ENDSPLINE

Description PTP_SPLINE … ENDSPLINE defines a PTP spline block. A PTP spline block
may contain:
 SPTP segments (number limited only by the memory capacity)
 PATH trigger
 1 time block (TIME_BLOCK …)
 STOP WHEN PATH
 Comments
 Blank lines
The block must not include any other instructions, e.g. variable assignments
or logic statements.

The start point of a spline block is the last point before the spline
block.
The end point of a spline block is the last point in the spline block.
A spline block does not trigger an advance run stop.

Syntax PTP_SPLINE < WITH SysVar1 = Value1 <, SysVar2 = Value2, … > >

376 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Segment1

<SegmentN>
ENDSPLINE <C_SPL>

Explanation of Element Description


the syntax SysVar (>>> 11.6.7 "System variables for WITH" Page 382)
Value Value assignment to the system variable. The value is not
valid for segments which have their own value assigned.
With this one exception, the value remains valid, in the
usual way, until a new value is assigned to the system vari-
able.
The system variables can also be assigned values by
means of a function call. The same restrictions apply to
these functions as to functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger"
Page 431)
C_SPL  With C_SPL: the end point is approximated. $APO de-
fines the earliest point at which the approximate posi-
tioning can begin.
 Without C_SPL: the motion stops exactly at the end
point.

Example PTP_SPLINE WITH $ACC_AXIS[1]={CP 20, ORI1 80, ORI2 80}


SPTP P1
TRIGGER WHEN PATH=GET_PATH() ONSTART DELAY=0 DO <subprog> PRIO=-1
SPTP P2
SPTP P3
SPTP P4 WITH $ACC_AXIS[1]={CP 10}
ENDSPLINE C_SPL

11.6.3 SLIN, SCIRC, SPL

Description SLIN, SCIRC:


SLIN and SCIRC can be programmed as a segment in a CP spline block or as
an individual motion.
It is possible to copy an individual SLIN or SCIRC motion into a CP spline
block, but only if it does not contain an assignment to system variables that are
prohibited there.
SPL:
SPL can be programmed as a segment in a CP spline block.

Syntax SLIN:
SLIN End point <WITH SysVar1 = Value1 <, SysVar2 = Value2, …, >> <C_SPL>
SCIRC:
SCIRC Auxiliary point, End point <, CA Circular angle> <WITH SysVar1 = Value1
<,SysVar2 = Value2 , … >> <C_SPL>
SPL:
SPL End point <WITH SysVar1 = Value1 <, SysVar2 = Value2 , …>>

Issued: 14.01.2015 Version: KSS 8.3 SI V4 377 / 491


KUKA System Software 8.3

Explanation of Element Description


the syntax Auxiliary Type: POS, E6POS, FRAME
point
The coordinates refer to the BASE coordinate system.
End point
If not all components of the end point are specified, the
controller takes the values of the previous position for the
missing components. If this previous position is the end
point of a circle with a circular angle, the following distinc-
tion is made:
 If the previous position is outside a spline block, the val-
ues of the end point that is actually reached are applied,
and not those of the programmed end point.
 If the previous position is inside a spline block, the val-
ues of the programmed end point are applied, and not
those of the end point that is actually reached.
If no previous position is known to the robot controller, the
missing components are taken from the current robot posi-
tion.
Circular Unit: Degrees; without restriction
angle
(>>> 9.9 "Circular angle" Page 300)
SysVar (>>> 11.6.7 "System variables for WITH" Page 382)
Value Value assignment to the system variable.
In the case of segments: The assignment applies only for
this segment.
The system variables can also be assigned values by
means of a function call. The same restrictions apply to
these functions as to functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger"
Page 431)
C_SPL  With C_SPL: the end point is approximated. $APO de-
fines the earliest point at which the approximate posi-
tioning can begin.
Only possible for individual motions, not for segments.
 Without C_SPL: the motion stops exactly at the end
point.

In System Software 8.2 and earlier, the identifier for approximate po-
sitioning with spline was “C_DIS”. If programs based on 8.2 or older
versions are used in higher versions of 8.x and contain C_DIS, this
can be retained and does not have to be changed to C_SPL.

Examples SCIRC P2, P3 WITH $CIRC_TYPE=#PATH

SPL P4 WITH $ACC={CP 2.0, ORI1 200, ORI2 200}

11.6.4 SLIN_REL, SCIRC_REL, SPL_REL

Description SLIN_REL, SCIRC_REL:


SLIN_REL and SCIRC_REL can be programmed as a segment in a CP spline
block or as an individual motion.
It is possible to copy an individual SLIN_REL or SCIRC_REL motion into a CP
spline block, but only if it does not contain an assignment to system variables
that are prohibited there.

378 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

SPL_REL:
SPL_REL can be programmed as a segment in a CP spline block.
For information about the response of the robot controller in the case of infi-
nitely rotating axes: (>>> 11.5.6 "REL motions for infinitely rotating axes"
Page 374)

Syntax SLIN_REL:
SLIN_REL End point <WITH SysVar1 = Value1 <, SysVar2 = Value2, …, >>
<C_SPL><#BASE|#TOOL>
SCIRC_REL:
SCIRC_REL Auxiliary point, End point <, CA Circular angle> <WITH SysVar1 =
Value1 <,SysVar2 = Value2 , … >> <C_SPL><#BASE|#TOOL>
SPL_REL:
SPL_REL End point < WITH SysVar1 = Value1 <,SysVar2 = Value2 , …>><#BA-
SE|#TOOL>

Explanation of Element Description


the syntax Auxiliary point Type: POS, E6POS, FRAME
End point The point must be specified in Cartesian coordinates. The
controller interprets the coordinates as relative to the end
point of the previous motion.
If not all components of the point are specified, the control-
ler sets the value of the missing components to 0. In other
words, the absolute values of these components remain
unchanged.
Specifications of Status and Turn, if present, are ignored by
the controller. (This is in contrast to SPTP_REL where they
are taken into consideration!)
At the auxiliary point, the orientation angles are also
ignored.
The auxiliary point cannot be approximated. The motion
always stops exactly at this point.
Circular angle Unit: Degrees; without restriction
(>>> 9.9 "Circular angle" Page 300)
SysVar (>>> 11.6.7 "System variables for WITH" Page 382)
Value Value assignment to the system variable.
In the case of segments: The assignment applies only for
this segment.
The system variables can also be assigned values by
means of a function call. The same restrictions apply to
these functions as to functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger"
Page 431)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 379 / 491


KUKA System Software 8.3

Element Description
C_SPL  With C_SPL: the end point is approximated. $APO de-
fines the earliest point at which the approximate posi-
tioning can begin.
Only possible for individual motions, not for segments.
 Without C_SPL: the motion stops exactly at the end
point.
#BASE,  #BASE (default): The coordinates of this end point refer
#TOOL to the coordinate system that belongs to the physical
base.
 #TOOL: The coordinates of this end point refer to the
coordinate system that belongs to the physical tool.
$IPO_MODE has no influence on the meaning of #BASE
and #TOOL.

Example DECL E6POS P1 = {X 1500, Y -200, Z 2000, A 0, B 0, C 0, S 6, T27}

SPTP HOME
SLIN P1

SLIN_REL{X 0, Y 500, Z 0, A 0, B 0, C 0} WITH $BASE=$NULLFRAME #BASE


SLIN_REL{X 400} WITH $TOOL=$NULLFRAME C_SPL #TOOL
SLIN_REL{A 20}
SPTP_REL{A3 90} C_SPL
SPTP_REL Z 50, B -30} WITH $VEL.AXIS[4]=90 C_SPL #TOOL
SPTP_REL{A1 100}

SPLINE
SPL P1
SPL_REL{Z -300, B50} #TOOL
ENDSPLINE
PTPSPLINE
SPTP P1
SPTP_REL{A1 -100, A5 -70}
ENDSPLINE

11.6.5 SPTP

Description SPTP can be programmed as a segment in a PTP spline block or as an indi-


vidual motion.
It is possible to copy an individual SPTP motion into a PTP spline block, but
only if it does not contain an assignment to system variables that are prohibit-
ed there.

Syntax SPTP End point <WITH SysVar1 = Value1 <, SysVar2 = Value2 , …>> <C_SPL>

380 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Explanation of Element Description


the syntax End point Type: AXIS, E6AXIS, POS, E6POS, FRAME
The Cartesian coordinates refer to the BASE coordinate
system.
If not all components of the end point are specified, the
controller takes the values of the previous position for the
missing components. If this previous position is the end
point of a circle with a circular angle, the values of the end
point that is actually reached are applied, and not those of
the programmed end point.
If no previous position is known to the robot controller, the
missing components are taken from the current robot posi-
tion.
SysVar (>>> 11.6.7 "System variables for WITH" Page 382)
Value Value assignment to the system variable.
In the case of SPTP segments: The assignment applies
only for this segment.
The system variables can also be assigned values by
means of a function call. The same restrictions apply to
these functions as to functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger"
Page 431)
C_SPL  With C_SPL: the end point is approximated. $APO de-
fines the earliest point at which the approximate posi-
tioning can begin.
Only possible for individual motions, not for segments.
 Without C_SPL: the motion stops exactly at the end
point.

In System Software 8.2 and earlier, the identifier for approximate po-
sitioning with spline was “C_DIS”. If programs based on 8.2 or older
versions are used in higher versions of 8.x and contain C_DIS, this
can be retained and does not have to be changed to C_SPL.

11.6.6 SPTP_REL

Description SPTP_REL can be programmed as a segment in a PTP spline block or as an


individual motion.
It is possible to copy an individual SPTP_REL motion into a PTP spline block,
but only if it does not contain an assignment to system variables that are pro-
hibited there.
For information about the response of the robot controller in the case of infi-
nitely rotating axes: (>>> 11.5.6 "REL motions for infinitely rotating axes"
Page 374)

Syntax SPTP_REL End point <WITH SysVar1 = Value1 <, SysVar2 = Value2, …>>
<C_SPL><#BASE|#TOOL>

Issued: 14.01.2015 Version: KSS 8.3 SI V4 381 / 491


KUKA System Software 8.3

Explanation of Element Description


the syntax End point Type: AXIS, E6AXIS, POS, E6POS, FRAME
The end point can be specified in Cartesian or axis-specific
coordinates. The controller interprets the coordinates as
relative to the end point of the previous block.
If not all components of the end point are specified, the
controller sets the value of the missing components to 0. In
other words, the absolute values of these components
remain unchanged.
Specifications of Status and Turn, if present, are taken into
consideration by the controller. (This is in contrast to
SLIN_REL, SCIRC_REL and SPL_REL where they are
ignored!)
SysVar (>>> 11.6.7 "System variables for WITH" Page 382)
Value Value assignment to the system variable.
In the case of SPTP segments: The assignment applies
only for this segment.
The system variables can also be assigned values by
means of a function call. The same restrictions apply to
these functions as to functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger"
Page 431)
C_SPL  With C_SPL: the end point is approximated. $APO de-
fines the earliest point at which the approximate posi-
tioning can begin.
Only possible for individual motions, not for segments.
 Without C_SPL: the motion stops exactly at the end
point.
#BASE, Only permissible if the end point was specified in Cartesian
#TOOL coordinates.
 #BASE (default): The coordinates of this end point refer
to the coordinate system that belongs to the physical
base.
 #TOOL: The coordinates of this end point refer to the
coordinate system that belongs to the physical tool.
$IPO_MODE has no influence on the meaning of #BASE
and #TOOL.

Example (>>> "Example" Page 380)

11.6.7 System variables for WITH

Spline block, For spline blocks and individual spline motions, it is possible to write to the fol-
individual spline lowing system variables using the WITH line:
motion $ACC
$ACC_AXIS
$ACC_EXTAX
$APO
$BASE
$CIRC_TYPE

382 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

$ECO_LEVEL
$GEAR_JERK
$IPO_MODE
$JERK
$LOAD
$ORI_TYPE
$ROTSYS
$SPL_ORI_JOINT_AUTO
$SYNC_ID
$SYNC_LIST
$TOOL
$VEL
$VEL_AXIS
$VEL_EXTAX
Additionally for SCIRC and SLIN: $CIRC_MODE

Spline segment For spline segments, it is possible to write to the following system variables us-
ing the WITH line:
$ACC
$ACC_AXIS
$ACC_EXTAX
$CIRC_TYPE
$EX_AX_IGNORE
$GEAR_JERK
$JERK
$ORI_TYPE
$ROTSYS
$SYNC_ID
$VEL
$VEL_AXIS
$VEL_EXTAX
Additionally for SCIRC and SLIN: $CIRC_MODE

11.6.8 TIME_BLOCK

Description TIME_BLOCK can be used in CP and PTP spline blocks.


TIME_BLOCK can be used to execute the spline block or part of one in a de-
fined time. It is also possible to allocate time components to areas of
TIME_BLOCK.
Points can be modified in, added to or removed from the spline block without
changing the time specifications. This enables the user to correct the Carte-
sian path and retain the existing timing.
A spline block may include 1 time block, i.e. 1 statement of the type
TIME_BLOCK START … TIME_BLOCK END. This, in turn, may contain any

Issued: 14.01.2015 Version: KSS 8.3 SI V4 383 / 491


KUKA System Software 8.3

number of TIME_BLOCK PART statements. The time block may only be used
in spline blocks.
A CP spline block can contain either 1 time block or 1 constant velocity range,
but not both.

Syntax SPLINE
<Spline segments…>

TIME_BLOCK START
Spline segment
<Spline segments…>
...
< <TIME_BLOCK PART = Component_1>

Spline segment
<Spline segments…>
...
TIME_BLOCK PART = Component_N>
TIME_BLOCK END = Overall time
<Spline segments…>

ENDSPLINE

Explanation of It is not essential for there to be spline segments before TIME_BLOCK START
the syntax and after TIME_BLOCK END. It is nonetheless advisable to program as fol-
lows:
 There is at least 1 spline segment between SPLINE and TIME_BLOCK
START.
 There is at least 1 spline segment between TIME_BLOCK END and END-
SPLINE.
Advantages:
 The programmed overall time is maintained exactly even in the case of ap-
proximate positioning.
 Segments before TIME_BLOCK START make it possible to accelerate to
the required velocity.

384 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Element Description
Component Type: INT or REAL; constant, variable or function
Desired component of Overall time for the following dis-
tance:
 From the point before TIME_BLOCK
PART=Previous_component
to the point before TIME_BLOCK PART=Component
 If Previous_component does not exist:
From the point before TIME_BLOCK START
to the point before TIME_BLOCK PART=Component
“Desired component” means: the components are main-
tained as accurately as possible by the robot controller.
Generally, however, they are not maintained exactly.
The user can assign the components in such a way that
they add up to 100. The components can then be consid-
ered as percentages of Overall time.
The components do not have to add up to 100, however,
and can have any sum! The robot controller always
equates the sum of the components to Overall time. This
allows the components to be used very flexibly and also
changed.
If components are assigned, there must always be a
TIME_BLOCK PART directly before TIME_BLOCK END.
There must be no segments in between.
Overall time Type: INT or REAL; constant, variable or function; unit: s
Time in which the following distance is traveled:
 From the point before TIME_BLOCK START
to the point before TIME_BLOCK END
The value must be greater than 0. The overall time is main-
tained exactly. If this time cannot be maintained, e.g.
because too short a time has been programmed, the robot
executes the motion in the fastest possible time. In T1 and
T2, a message is also displayed.

If the value for Component or Overall time is assigned via a function, the
same restrictions apply as for the functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger" Page 431)

Example SPLINE
SLIN P1
SPL P2
TIME_BLOCK START
SLIN P3
TIME_BLOCK PART = 12.7
SPL P4
SPL P5
SPL P6
TIME_BLOCK PART = 56.4
SCIRC P7, P8
SPL P9
TIME_BLOCK PART = 27.8
TIME_BLOCK END = 3.9
SLIN P10
ENDSPLINE

Issued: 14.01.2015 Version: KSS 8.3 SI V4 385 / 491


KUKA System Software 8.3

Points P2 to P9 are executed exactly in the programmed time of 3.9 s. The ro-
bot controller equates the overall time of 3.9 s to the sum of all components,
i.e. 96.9.

Distance Time assigned by the robot controller to the distance


P2 … P3 12.7 components of 3.9 s = 0.51 s
P3 … P6 56.4 components of 3.9 s = 2.27 s
P6 … P9 27.8 components of 3.9 s = 1.12 s

Block selection Whether or not the robot controller plans the time block depends on the line to
which a block selection is carried out.

Block selection to the line ... Time block is planned?


in the spline block before Yes
TIME_BLOCK START
TIME_BLOCK START No
in the time block The spline block is executed as if
TIME_BLOCK END there were no TIME_BLOCK state-
in the spline block after ments present.
TIME_BLOCK END

If the robot controller does not plan the time block, it generates the following
message: Time block ignored due to BCO run.

$PATHTIME The data of the time-based spline can be read via the system variable $PATH-
TIME. $PATHTIME is filled with the data as soon as the robot controller has
completed the planning of the spline block. The data are retained until the next
spline block has been planned.
$PATHTIME is a structure and consists of the following components:

Component Description
REAL $PATHTIME.TOTAL Time actually required for the entire
spline block (s)
REAL $PATHTIME.SCHEDULED Overall time planned for the time
block (s)
REAL $PATHTIME.PRO- Overall time programmed for the
GRAMMED time block (s)
INT $PATHTIME.N_SECTIONS Number N of TIME_BLOCK_PART
lines
REAL $PATHTIME.MAX_DEV Maximum deviation of all
TIME_BLOCK_PARTs between the
programmed time and the planned
time (%)
INT $PATH- Number of the
TIME.MAX_DEV_SECTION TIME_BLOCK_PART with the
greatest deviation between the pro-
grammed time and the planned
time

11.6.9 CONST_VEL

Description CONST_VEL is used to define constant velocity ranges. CONST_VEL can


only be used in CP spline blocks.
There must be at least 1 spline segment between CONST_VEL END and
ENDSPLINE.

386 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

A CP spline block can contain either 1 CONST_VEL or 1 TIME_BLOCK, but


not both.

Further information about the constant velocity ranges can be found


in this documentation.
(>>> 10.3.6 "Constant velocity range in the CP spline block"
Page 335)

Syntax CONST_VEL START = Offset <ONSTART>


<Spline segments…>
...
CONST_VEL END = Offset <ONSTART>

Explanation of Element Description


the syntax ONSTART Reference point of the statement
 With ONSTART: Start point
 Without ONSTART: End point
If the start or end point is approximated, the reference point
is generated in the same way as for homogenous approxi-
mate positioning with the PATH trigger.
(>>> 11.11.2.2 "Reference point for homogenous approxi-
mate positioning" Page 429)
Offset Type: INT or REAL; constant, variable or function; unit: mm
The start of the range can be shifted in space by means of
CONST_VEL START = Offset.
The end of the range can be shifted in space by means of
CONST_VEL END = Offset.
 Positive value: Offset towards the end of the motion
 Negative value: Offset towards the start of the motion
The point to which the offset refers depends on whether
ONSTART is set or not. If no offset is desired, Offset=0
must be programmed.
(>>> 10.3.6.2 "Maximum limits" Page 337)

The value for Offset can be assigned using a function. The same re-
strictions apply as for the functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger" Page 431)

Example Here, the constant velocity range extends over several segments with different
programmed velocities. In this case, the lowest of the velocities, i.e. 0.2 m/s,
is valid for the whole range.
1 PTP P0
2 SPLINE WITH $VEL.CP = 2.5
3 SLIN P1
4 CONST_VEL START = +100
5 SPL P2 WITH $VEL.CP = 0.5
6 SLIN P3 WITH $VEL.CP = 0.2
7 SPL P4 WITH $VEL.CP = 0.4
8 CONST_VEL END = -50
9 SCIRC P5, P6
10 SLIN P7
11 ENDSPLINE

Issued: 14.01.2015 Version: KSS 8.3 SI V4 387 / 491


KUKA System Software 8.3

11.6.9.1 System variables for CONST_VEL

$STOP_CONST_ If the maximum possible constant velocity in a constant velocity range is below
VEL_RED the programmed velocity, the robot controller generates one of the following
messages:
 In the CONST_VEL END range, instead of $VEL.CP={Setpoint $VEL.CP}
m/s only {Velocity reached} m/s because line {Line of the limiting segment}
reached.
 In CONST_VEL START instead of $VEL.CP={Setpoint $VEL.CP} m/s
only {Velocity reached} m/s because line {Line of the limiting segment}
reached.
 In CONST_VEL END instead of $VEL.CP={Setpoint $VEL.CP} m/s only
{Velocity reached} m/s because line {Line of the limiting segment}
reached.
For operating modes T1/T2, it is possible to configure whether these are noti-
fication messages or acknowledgement messages. This is carried out using
the system variable $STOP_CONST_VEL_RED.

Value Description
FALSE (default) Notification message
TRUE  Operating mode T1 or T2:
Acknowledgement message
The robot stops. In the program, the block
pointer indicates the spline segment that trig-
gered the stop. Program execution cannot be
resumed until the operator has acknowl-
edged the message.
 Operating mode AUT or AUT EXT:
Notification message

$STOP_CONST_VEL_RED is initialized with FALSE in the case of a cold start


or program selection, but not if a program is reset.
$STOP_CONST_VEL_RED can be modified via the variable correction func-
tion or KRL.

$CONST_VEL $CONST_VEL specifies the velocity (mm/s) in the constant velocity range for
the CP spline block that is currently being planned. The value remains valid
until a different spline block with constant velocity range is planned.
$CONST_VEL is write-protected. $CONST_VEL is invalid if one of the follow-
ing motions is currently being planned:
 CP spline block without constant velocity range
 PTP spline block
 Individual spline motion
 PTP, LIN, CIRC

$CONST_VEL_C $CONST_VEL_C corresponds to $CONST_VEL, but with the difference that


$CONST_VEL_C refers to the CP spline block that is currently being execut-
ed.
Possible practical use:
The value of $CONST_VEL can be written to a user-specific local variable for
each constant velocity range. This provides an overview of the constant veloc-
ities that can be reached. The application can then be programmed according-
ly, e.g. the point in time at which a nozzle is to be opened, or similar.

388 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

11.6.10 STOP WHEN PATH

Description The operator can program a conditional stop with STOP WHEN PATH.

Further information about the conditional stop can be found in this


documentation.
(>>> 10.3.5 "Conditional stop" Page 332)

Positions The conditional stop can be used in the following positions:


 In the individual spline block
 In the spline block (CP and PTP)
There must be at least 1 segment between STOP WHEN PATH and END-
SPLINE.
 Before a spline block (CP and PTP)
STOP WHEN PATH refers to the spline block in this case. There may be
statements between STOP WHEN PATH and the spline block, but no mo-
tion instructions.

Syntax STOP WHEN PATH = Offset <ONSTART> IF Condition

Explanation of Element Description


the syntax ONSTART Reference point of the statement
 Without ONSTART: End point
 With ONSTART: Start point
If the reference point is approximated, the same rules
apply as for the PATH trigger.
(>>> 11.11.2.1 "Reference point for approximate position-
ing – overview" Page 428)
Offset Type: INT or REAL; constant, variable or function; unit: mm
The stop point can be shifted in space by means of Offset.
 Positive value: Shift towards the end of the motion
 Negative value: Shift towards the start of the motion
The point to which the offset refers depends on whether
ONSTART is set or not. If no offset is desired, Offset=0
must be programmed.
There are limits to the distance the stop point can be offset.
The same limits apply as for the PATH trigger. (>>> "Max.
offset" Page 426)
Condition Type: BOOL
Stop condition. The following are permitted:
 a global Boolean variable
 a signal name
 a comparison
 a simple logic operation: NOT, OR, AND or EXOR

The value for Offset can be assigned using a function. The same re-
strictions apply as for the functions in the trigger.
(>>> 11.11.3 "Constraints for functions in the trigger" Page 431)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 389 / 491


KUKA System Software 8.3

11.6.11 $EX_AX_IGNORE

Description $EX_AX_IGNORE can only be used in the WITH line of spline segments.
Each bit of $EX_AX_IGNORE corresponds to an external axis number. If a
specific bit is set to 1, the robot controller ignores the taught or programmed
position of this external axis at the end point of the segment. Instead, the robot
controller calculates the optimal position for this point on the basis of the sur-
rounding external axis positions.

Recommendation: Whenever no specific position of the external axis


is required for a point, use $EX_AX_IGNORE and set the bit for that
external axis to “1”. This reduces the cycle time.

In the program run modes MSTEP and ISTEP, the robot stops at the positions
calculated by the robot controller.
In the case of a block selection to a point with “$EX_AX_IGNORE = Bit n = 1”,
the robot adopts the position calculated by the robot controller.
“$EX_AX_IGNORE = Bit n = 1” is not allowed for the following segments:
 For the first segment in a spline block (only up to KUKA System Software
8.2)
 For the last segment in a spline block
 In the case of successive segments with identical Cartesian end points,
“$EX_AX_IGNORE = Bit n = 1” is not allowed for the first and last seg-
ments (only up to KUKA System Software 8.2).
From KUKA System Software 8.3 onwards: If $EX_AX_IGNORE is pro-
grammed for an SPTP segment and the affected external axis is mathemati-
cally coupled, the robot controller rejects $EX_AX_IGNORE, i.e. the taught or
programmed position of that axis is taken into consideration. In T1/T2, the ro-
bot controller generates the following message: Reject $EX_AX_IGNORE in
line {Block number} because {External axis number} is mathematically cou-
pled.

Syntax $EX_AX_IGNORE=Bit array

Explanation of
Element Description
the syntax
Bit array  Bit n = 1: Taught/programmed position of the external
axis is ignored.
 Bit n = 0: Taught/programmed position of the external
axis is taken into consideration.

Bit n 5 4 3 2 1 0
Axis E6 E5 E4 E3 E2 E1

Example SPLINE
SPL P1
SPL P2
SLIN P3 WITH $EX_AX_IGNORE = 'B000001'
SPL P4
ENDSPLINE

For P3, the robot controller ignores the taught position of external axis E1.

390 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

11.7 Program execution control

11.7.1 CONTINUE

Description CONTINUE can be used to prevent an advance run stop that would otherwise
occur in the following program line.
CONTINUE always applies to the following line, even if this is a blank line! Ex-
ception: If the following line contains the statement ON_ERROR_PROCEED,
CONTINUE applies to the line after.

Syntax CONTINUE

Examples Preventing both advance run stops:


CONTINUE
$OUT[1]=TRUE
CONTINUE
$OUT[2]=FALSE

In this case, the outputs are set in the advance run. When exactly they are set
cannot be foreseen.
ON_ERROR_PROCEED with CONTINUE:
ON_ERROR_PROCEED
CONTINUE
$OUT[1]=TRUE

CONTINUE
ON_ERROR_PROCEED
$OUT[1]=TRUE

The effect of both sequences of statements is identical. In both examples,


ON_ERROR_PROCEED and CONTINUE act on $OUT[1]=TRUE.

11.7.2 EXIT

Description Exit from a loop. The program is then continued after the loop. EXIT may be
used in any loop.

Syntax EXIT

Example The loop is exited when $IN[1] is set to TRUE. The program is then contin-
ued after ENDLOOP.
DEF EXIT_PROG()
PTP HOME
LOOP
PTP POS_1
PTP POS_2
IF $IN[1] == TRUE THEN
EXIT
ENDIF
CIRC HELP_1, POS_3
PTP POS_4
ENDLOOP
PTP HOME
END

Issued: 14.01.2015 Version: KSS 8.3 SI V4 391 / 491


KUKA System Software 8.3

11.7.3 FOR ... TO ... ENDFOR

Description A statement block is repeated until a counter exceeds or falls below a defined
value.
After the last execution of the statement block, the program is resumed with
the first statement after ENDFOR. The loop execution can be exited prema-
turely with EXIT.
Loops can be nested. In the case of nested loops, the outer loop is executed
completely first. The inner loop is then executed completely.

Syntax FOR Counter = Start TO End <STEP Increment>


<Statements>
ENDFOR

Explanation of Element Description


the syntax Counter Type: INT
Variable that counts the number of times the loop has been
executed. The preset value is Start. The variable must first
be declared.
The value of Counter can be used in statements inside and
outside of the loop. Once the loop has been exited, Counter
retains its most recent value.
Start; End Type: INT
Counter must be preset to the value Start. Each time the
loop is executed, the value of Counter is automatically
increased by the increment. If the value exceeds or falls
below the End value, the loop is terminated.
Increment Type: INT
Value by which Counter is changed every time the loop is
executed The value may be negative. Default value: 1.
 Positive value: the loop is ended if Counter is greater
than End.
 Negative value: the loop is ended if Counter is less than
End.
The value may not be either zero or a variable.

Example The variable B is incremented by 1 after each of 5 times the loop is executed.
INT A
...
FOR A=1 TO 10 STEP 2
B=B+1
ENDFOR

11.7.4 GOTO

Description Unconditional jump to a specified position in the program. Program execution


is resumed at this position.
The destination must be in the same subprogram or function as the GOTO
statement.
The following jumps are not possible:
 Into an IF statement from outside.

392 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

 Into a loop from outside.


 From one CASE statement to another CASE statement.

GOTO statements lead to a loss of structural clarity within a program.


It is better to work with IF, SWITCH or a loop instead.

Syntax GOTO Label


...
Label:

Explanation of Element Description


the syntax Label Position to which a jump is made. At the destination posi-
tion, Label must be followed by a colon.

Example 1 Unconditional jump to the program position GLUESTOP.


GOTO GLUESTOP
...
GLUESTOP:

Example 2 Unconditional jump from an IF statement to the program position END.


IF X>100 THEN
GOTO ENDE
ELSE
X=X+1
ENDIF
A=A*X
...
ENDE:
END

11.7.5 HALT

Description Stops the program. The last motion instruction to be executed will, however,
be completed.
Execution of the program can only be resumed using the Start key. The next
instruction after HALT is then executed.
In an interrupt program, program execution is only stopped after the advance
run has been completely executed.

Syntax HALT

11.7.6 IF ... THEN ... ENDIF

Description Conditional branch. Depending on a condition, either the first statement block
(THEN block) or the second statement block (ELSE block) is executed. The
program is then continued after ENDIF.
The ELSE block may be omitted. If the condition is not satisfied, the program
is then continued at the position immediately after ENDIF.
There is no limit on the number of statements contained in the statement
blocks. Several IF statements can be nested in each other.

Syntax IF Condition THEN


Statements

Issued: 14.01.2015 Version: KSS 8.3 SI V4 393 / 491


KUKA System Software 8.3

<ELSE
Statements>
ENDIF

Explanation of Element Description


the syntax Condition Type: BOOL
Possible:
 Variable of type BOOL
 Function of type BOOL
 Logic operation, e.g. a comparison, with a result of type
BOOL

Example 1 IF statement without ELSE


IF A==17 THEN
B=1
ENDIF

Example 2 IF statement with ELSE


IF $IN[1]==TRUE THEN
$OUT[17]=TRUE
ELSE
$OUT[17]=FALSE
ENDIF

11.7.7 LOOP ... ENDLOOP

Description Loop that endlessly repeats a statement block. The loop execution can be ex-
ited with EXIT.
Loops can be nested. In the case of nested loops, the outer loop is executed
completely first. The inner loop is then executed completely.

Syntax LOOP
Statements
ENDLOOP

Example The loop is executed until input $IN[30] is set to true.


LOOP
LIN P_1
LIN P_2
IF $IN[30]==TRUE THEN
EXIT
ENDIF
ENDLOOP

11.7.8 ON_ERROR_PROCEED

Description ON_ERROR_PROCEED can be used to suppress a runtime error message


triggered by the following program line. The robot controller skips the state-
ment that triggers the error and fills the system variable $ERR with information
about the error.
(>>> 11.7.8.1 "$ERR" Page 395)
Messages about internal errors or system errors cannot be suppressed.

394 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

ON_ERROR_PROCEED always applies to the following line, even if this is a


blank line! Exception: If the following line contains the statement CONTINUE,
ON_ERROR_PROCEED applies to the line after.
If the line after ON_ERROR_PROCEED is a subprogram call, the statement
then refers to the call itself, and not to the first line of the subprogram.

$ERR, $ERR and ERR_RAISE() are important tools when working with
ERR_RAISE() ON_ERROR_PROCEED.
The function ERR_RAISE() can subsequently generate a suppressed runtime
error message. It can only process the system variable $ERR or a variable de-
rived from $ERR as an OUT parameter.

Limitations ON_ERROR_PROCEED has no effect on motion statements:


SPLINE/ENDPLINE; PTP_SPLINE/ENDSPLINE; PTP; LIN; CIRC; PTP_REL;
LIN_REL; CIRC_REL; ASYPTP; ASYSTOP; ASYCONT; ASYCANCEL;
MOVE_EMI
ON_ERROR_PROCEED has no effect on the following control structures:
FOR/ENDFOR; GOTO; IF/ELSE/ENDIF; LOOP/ENDLOOP; REPEAT/UNTIL;
SKIP/ENDSKIP; SWITCH/CASE/DEFAULT/ENDSWITCH; WHILE/END-
WHILE

Syntax ON_ERROR_PROCEED

Examples (>>> 11.7.8.2 "Examples of $ERR, ON_ERROR_PROCEED and


ERR_RAISE()" Page 396)
ON_ERROR_PROCEED with CONTINUE:
ON_ERROR_PROCEED
CONTINUE
$OUT[1]=TRUE

CONTINUE
ON_ERROR_PROCEED
$OUT[1]=TRUE

The effect of both sequences of statements is identical. In both examples,


ON_ERROR_PROCEED and CONTINUE act on $OUT[1]=TRUE.

11.7.8.1 $ERR

Description Structure with information about the current program


The variable can be used to evaluate the currently executed program relative
to the advance run. For example, the variable can be used to evaluate errors
in the program in order to be able to respond to them with a suitable fault ser-
vice function.
The variable is write-protected and can only be read.
$ERR exists separately for the robot and submit interpreters. Each interpreter
can only access its own variable. $ERR does not exist for the command inter-
preter.
Each subprogram level has its own representation of $ERR. In this way, the
information from one level does not overwrite the information from different
levels and information can be read from different levels simultaneously.
ON_ERROR_PROCEED implicitly deletes the information from $ERR in the
current interpreter and at the current level.
(>>> 11.7.8.2 "Examples of $ERR, ON_ERROR_PROCEED and
ERR_RAISE()" Page 396)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 395 / 491


KUKA System Software 8.3

Syntax $ERR=Information

Explanation of
Element Description
the syntax
Information Type: Error_T
List with information about the program currently being
executed

Error_T STRUC Error_T INT number, PROG_INT_E interpreter,


INT_TYP_E int_type, INT int_prio, line_nr, CHAR mo-
dule[24], up_name[24], TRIGGER_UP_TYPE trigger_type

Element Description
number Only in the event of a runtime error: Message number
If no error has occurred, the value zero is displayed.
interpreter Current interpreter
 #R_INT: Robot interpreter
 #S_INT: Submit interpreter
int_type Current program type and interrupt state
 #I_NORMAL: The program is not an interrupt program.
 #I_INTERRUPT: The program is an interrupt program.
 #I_STOP_INTERRUPT: Interrupt by means of
$STOPMESS (error stop)
int_prio Priority of the interrupt
line_nr Only in the event of a runtime error: Number of the line that
triggered the error
Note: The number does not generally correspond to the
line number in the smartHMI program editor! In order to
understand the numbering, open the program with a simple
editor and do not count lines that start with “&”.
If no error has occurred, the value zero is displayed.
module[] Name of the current program
up_name[] Name of the current subprogram
trigger_type Context in which the trigger belonging to a subprogram
was triggered
 #TRG_NONE: The subprogram is not a trigger subpro-
gram.
 #TRG_REGULAR: The trigger subprogram was
switched during forward motion.
 #TRG_BACKWARD: The trigger subprogram was
switched during backward motion.
 #TRG_RESTART: The trigger subprogram was
switched on switching back to forward motion.
 #TRG_REPLAY: The trigger subprogram was switched
repeatedly after backward motion.
Note: This component is available in KUKA System Soft-
ware 8.3 or higher.

11.7.8.2 Examples of $ERR, ON_ERROR_PROCEED and ERR_RAISE()

Example 1 If you do not wish to suppress all possible runtime error messages, but only
specific ones, this distinction can be made using SWITCH … ENDSWITCH. In

396 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

this example, only message 1422 is suppressed. Any other runtime error mes-
sages would be displayed.
1 DEF myProg ()
2 DECL E6POS myPos
3 INI
4 ON_ERROR_PROCEED
5 myPos = $POS_INT
6 SWITCH ($ERR.NUMBER)
7 CASE 0
8 CASE 1422
9 ;program fault service function if required
...
10 DEFAULT
11 ERR_RAISE ($ERR)
12 ENDSWITCH
...
13 END

Line Description
4, 5 Line 5 triggers the message 1422 {$variable} value invalid (un-
less the program is called by an interrupt).
ON_ERROR_PROCEED in the preceding line suppresses the
error message.
6 … 12 Differentiation dependent on $ERR.NUMBER
7 If no error occurred in line 5, $ERR.NUMBER==0. In this case,
no action is required.
8, 9 If message 1422 has been triggered, $ERR.NUMBER==1422.
If required, a fault service function can be programmed.
10, 11 If a message other than 1422 was triggered, this message is
now (subsequently) generated via ERR_RAISE.

Example 2 This example illustrates that each program level has its own representation of
$ERR.
1 DEF myMainProg ()
2 INT myVar, myVar2
3 INI
4 ON_ERROR_PROCEED
5 mySubProg (myVar)
6 HALT
7 myVar2 = 7
8 mySubProg (myVar2)
9 END
---------------------------------------
10 DEF mySubProg (myTest:IN)
11 INT myTest
12 HALT
13 END

Issued: 14.01.2015 Version: KSS 8.3 SI V4 397 / 491


KUKA System Software 8.3

Line Description
4, 5 Line 5 triggers the message 1422 {$variable} value invalid be-
cause myVar is not initialized and can thus not be transferred
to a subprogram.
ON_ERROR_PROCEED in the preceding line suppresses the
error message.
6 If $ERR is read here using the variable correction function, the
following components have the following values:
$ERR.number == 1422
$ERR.line_nr == 15
$ERR.module[] == "MYMAINPROG"
$ERR.up_name[] == "MYMAINPROG"
12 If $ERR is read here in the subprogram using the variable cor-
rection function, the following components have the following
values:
$ERR.number == 0
$ERR.line_nr == 0
$ERR.module[] == "MYMAINPROG"
$ERR.up_name[] == "MYSUBPROG"
This clearly indicates that $ERR always has the information
from the current level, i.e. from the subprogram MySubProg in
this case. The information from MyMainProg, on the other
hand, is unknown.

Example 3 This example also shows that each program level has its own representation
of $ERR. It also shows how the $ERR information can be transferred to a dif-
ferent level.
1 DEF myMainProg2 ()
2 INI
3 ON_ERROR_PROCEED
4 $OUT[-10] = TRUE
5 myHandleErr ($ERR, $ERR)
6 END
---------------------------------------
7 DEF myHandleErr (inErr:IN, outErr:OUT)
8 DECL Error_T inErr, outErr
9 ON_ERROR_PROCEED
10 $OV_PRO=100/0
11 ERR_RAISE($ERR)
12 ERR_RAISE(outErr)
13 ERR_RAISE(inErr)
...
14 END

Line Description
3, 4 Line 4 triggers the message 1444 Array index inadmissible.
ON_ERROR_PROCEED in the preceding line suppresses the
error message.
5, 7 The contents of $ERR are transferred to a subprogram twice:
once as an IN parameter and once as an OUT parameter.

398 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Line Description
9, 10 Line 10 triggers the message 1451 Division by 0.
ON_ERROR_PROCEED in the preceding line suppresses the
error message.
11 ERR_RAISE($ERR) generates the message from line 10, and
not that from line 4.
$ERR always has the information from the current level, i.e.
from the subprogram myHandleErr in this case.
12 ERR_RAISE(outErr) generates the message from line 4 of the
main program, as outErr is a reference to $ERR in the main
program.
13 ERR_RAISE(inErr) is not permissible and thus triggers the
message 1451 {(Variable name)} invalid argument.
ERR_RAISE can only process $ERR or an OUT variable de-
rived from $ERR.

Example 4 $ERR can be used not only for error treatment, but also to determine the cur-
rent surroundings.
In this example, a parameter is transferred to a subprogram from both a robot
program and a submit program. In the subprogram, the system determines
which interpreter the parameter came from. The action that is carried out de-
pends on the result.
Robot program:
DEF Main ()
...
mySUB (55)
...
END

Submit program:
DEF SPS ()
...
LOOP
mySUB (33)
...
ENDLOOP
...
END

Subprogram:
GLOBAL DEF mySUB (par:IN)
INT par
INI
IF ($ERR.INTERPRETER==#R_INT) THEN
$OUT_C[par] = TRUE
ELSE
$OUT[par] = TRUE
ENDIF
...
END

11.7.9 REPEAT ... UNTIL

Description Non-rejecting loop. Loop that is repeated until a certain condition is fulfilled.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 399 / 491


KUKA System Software 8.3

The statement block is executed at least once. The condition is checked after
each loop execution. If the condition is met, program execution is resumed at
the first statement after the UNTIL line.
Loops can be nested. In the case of nested loops, the outer loop is executed
completely first. The inner loop is then executed completely.

Syntax REPEAT
Statements
UNTIL Termination condition

Explanation of Element Description


the syntax Termination Type: BOOL
condition
Possible:
 Variable of type BOOL
 Function of type BOOL
 Logic operation, e.g. a comparison, with a result of type
BOOL

Example 1 The loop is to be executed until $IN[1] is true.


R=1
REPEAT
R=R+1
UNTIL $IN[1]==TRUE

Example 2 The loop is executed once, even though the termination condition is already
fulfilled before the loop execution, because the termination condition is not
checked until the end of the loop. After execution of the loop, R has the value
102.
R=101
REPEAT
R=R+1
UNTIL R>100

11.7.10 SWITCH ... CASE ... ENDSWITCH

Description Selects one of several possible statement blocks, according to a selection cri-
terion. Every statement block has at least one identifier. The block whose iden-
tifier matches the selection criterion is selected.
Once the block has been executed, the program is resumed after END-
SWITCH.
If no identifier agrees with the selection criterion, the DEFAULT block is exe-
cuted. If there is no DEFAULT block, no block is executed and the program is
resumed after ENDSWITCH.
The SWITCH statement cannot be prematurely exited using EXIT.

Syntax SWITCH Selection criterion


CASE Identifier1 <,Identifier2,...>
Statement block
<CASE IdentifierM <,IdentifierN,...>
Statement block >
<DEFAULT

400 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Default statement block>


ENDSWITCH
There must be no blank line or comment between the SWITCH line and the
first CASE line. DEFAULT may only occur once in a SWITCH statement.

Explanation of Element Description


the syntax Selection cri- Type: INT, CHAR, ENUM
terion
This can be a variable, a function call or an expression of
the specified data type.
Identifier Type: INT, CHAR, ENUM
The data type of the identifier must match the data type of
the selection criterion.
A statement block can have any number of identifiers. Mul-
tiple block identifiers must be separated from each other by
a comma.

Example 1 Selection criterion and identifier are of type INT.


INT VERSION
...
SWITCH VERSION
CASE 1
UP_1()
CASE 2,3
UP_2()
UP_3()
UP_3A()
DEFAULT
ERROR_UP()
ENDSWITCH

Example 2 Selection criterion and identifier are of type CHAR. The statement SP_5() is
never executed here because the identifier C has already been used.
SWITCH NAME
CASE "A"
UP_1()
CASE "B","C"
UP_2()
UP_3()
CASE "C"
UP_5()
ENDSWITCH

11.7.11 WAIT FOR …

Description WAIT FOR stops the program until a specific condition is fulfilled. Program ex-
ecution is then resumed.
WAIT FOR triggers an advance run stop.

If, due to incorrect formulation, the expression can never take the val-
ue TRUE, the compiler does not recognize this. In this case, execu-
tion of the program will be permanently halted because the program
is waiting for a condition that cannot be fulfilled.

Syntax WAIT FOR Condition

Issued: 14.01.2015 Version: KSS 8.3 SI V4 401 / 491


KUKA System Software 8.3

Explanation of Element Description


the syntax Condition Type: BOOL
Condition, the fulfillment of which allows program execu-
tion to be resumed.
 If the condition is FALSE, program execution is stopped
until the condition is TRUE.
 If the condition is already TRUE when WAIT is called,
program execution is not halted.

Examples Interruption of program execution until $IN[17] is TRUE:


WAIT FOR $IN[17]

Interruption of program execution until BIT1 is FALSE:


WAIT FOR BIT1==FALSE

11.7.12 WAIT SEC …

Description Halts execution of the program and continues it after a wait time. The wait time
is specified in seconds.
WAIT SEC triggers an advance run stop.

Syntax WAIT SEC Wait time

Explanation of Element Description


the syntax Wait time Type: INT, REAL
Number of seconds for which program execution is to be
interrupted. If the value is negative, the program does not
wait. With small wait times, the accuracy is determined by
a multiple of 12 ms.

Example Interruption of program execution for 17.156 seconds:


WAIT SEC 17.156

Interruption of program execution in accordance with the variable value of


V_WAIT in seconds:
WAIT SEC V_ZEIT

11.7.13 WHILE ... ENDWHILE

Description Rejecting loop. Loop that is repeated as long as a certain condition is fulfilled.
If the condition is not met, program execution is resumed at the first statement
after the ENDWHILE line. The condition is checked before each loop execu-
tion. If the condition is not already fulfilled beforehand, the statement block is
not executed.
Loops can be nested. In the case of nested loops, the outer loop is executed
completely first. The inner loop is then executed completely.

Syntax WHILE Repetition condition


Statement block
ENDWHILE

402 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Explanation of Element Description


the syntax Repetition Type: BOOL
condition
Possible:
 Variable of type BOOL
 Function of type BOOL
 Logic operation, e.g. a comparison, with a result of type
BOOL

Example 1 The loop is executed 99 times. After execution of the loop, W has the value 100.
W=1
WHILE W<100
W=W+1
ENDWHILE

Example 2 The loop is executed as long as $IN[1] is true.


WHILE $IN[1]==TRUE
W=W+1
ENDWHILE

11.8 Inputs/outputs

11.8.1 ANIN

Description Cyclical reading (every 12 ms) of an analog input. ANIN triggers an advance
run stop.
The robot controller has 32 analog inputs ($ANIN[1] … $ANIN[32]).
 A maximum of three ANIN ON statements can be used at the same time.
 A maximum of two ANIN ON statements can use the same variable Value
or access the same analog input.
 All of the variables used in an ANIN statement must be declared in data
lists (locally or in $CONFIG.DAT).
$ANIN[…] indicates the input voltage, adapted to the range between -1.0 and
+1.0. The actual voltage depends on the settings of the analog module.

Syntax Starting cyclical reading:


ANIN ON Value = Factor * Signal name * <±Offset>
Ending cyclical reading:
ANIN OFF Signal name

Explanation of Element Description


the syntax Value Type: REAL
The result of the cyclical reading is stored in Value. Value
can be a variable or a signal name for an output.
Factor Type: REAL
Any factor. It can be a constant, variable or signal name.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 403 / 491


KUKA System Software 8.3

Element Description
Signal name Type: REAL
Specifies the analog input. Signal name must first have been
declared with SIGNAL . It is not possible to specify the ana-
log input $ANIN[x] directly instead of the signal name.
Offset Type: REAL
It can be a constant, variable or signal name.

Example In this example, the program override (= system variable $OV_PRO) is de-
fined by means of the analog input $ANIN[1].
$ANIN[1] must first be linked to a freely selected signal name, in this case
SIGNAL_1, in the declaration section.
SIGNAL SIGNAL_1 $ANIN[1]
...
ANIN ON $OV_PRO = 1.0 * SIGNAL_1

The cyclical scanning of SIGNAL_1 is ended using the ANIN OFF statement.
ANIN OFF SIGNAL_1

11.8.2 ANOUT

Description Cyclical writing (every 12 ms) to an analog output. ANOUT triggers an ad-
vance run stop.
The robot controller has 32 analog outputs ($ANOUT[1] … $ANOUT[32]).
 A maximum of four ANOUT ON statements can be used at the same time.
 All of the variables used in an ANOUT statement must be declared in data
lists (locally or in $CONFIG.DAT).
$ANOUT[…] can have values from -1.0 to +1.0 written to it. The voltage actu-
ally generated depends on the settings of the analog module. If an attempt is
made to set voltages outside the range of values, the robot controller displays
the following message: Limit {Signal name}

Syntax Starting cyclical writing:


ANOUT ON Signal name = Factor * Control element <±Offset> <DELAY =
±Time> <MINIMUM = Minimum value> <MAXIMUM = Maximum value>

Ending cyclical writing:


ANOUT OFF Signal name

Explanation of Element Description


the syntax Signal name Type: REAL
Specifies the analog output. Signal name must first have
been declared with SIGNAL . It is not possible to specify
the analog output $ANOUT[x] directly instead of the signal
name.
Factor Type: REAL
Any factor. It can be a constant, variable or signal name.
Control Type: REAL
element
It can be a constant, variable or signal name.
Offset Type: REAL
It can be a constant, variable or signal name.

404 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Element Description
Time Type: REAL
Unit: seconds. By using the keyword DELAY and entering a
positive or negative amount of time, the output signal can
be delayed (+) or set early (-).
Minimum Type: REAL
value,
Maximum Minimum and/or maximum value to be present at the out-
value put. The actual value does not fall below/exceed these val-
ues, even if the calculated values fall outside this range.
Permissible values: -1.0 to +1.0
It can be a constant, variable, structure component or array
element. The minimum value must always be less than the
maximum value. The sequence of the keywords MINIMUM
and MAXIMUM must be observed.

Example In this example, the output $ANOUT[5] controls the adhesive output.
A freely selected name, in this case GLUE, is assigned to the analog output in
the declaration section. The amount of adhesive is to be dependent on the cur-
rent path velocity (= system variable $VEL_ACT). Furthermore, the output sig-
nal is to be generated 0.5 seconds early. The minimum voltage is to be 3 V.
(The voltage of the module used ranges from +10 V to -10 V.)
SIGNAL GLUE $ANOUT[5]
...
ANOUT ON GLUE = 0.5 * $VEL_ACT DELAY=-0.5 MINIMUM=0.30

The cyclical analog output is ended by using ANOUT OFF:


ANOUT OFF GLUE

11.8.3 PULSE

Description Sets a pulse. The output is set to a defined level for a specified duration. The
output is then reset automatically by the system. The output is set and reset
irrespective of the previous level of the output.
At any one time, pulses may be set at a maximum of 16 outputs.
If PULSE is programmed before the first motion block, the pulse duration also
elapses if the Start key is released again and the robot has not yet reached the
BCO position.
The PULSE statement triggers an advance run stop. It is only executed con-
currently with robot motion if it is used in a TRIGGER statement.

The pulse is not terminated in the event of an EMERGENCY STOP,


an operator stop or an error stop!

Syntax PULSE (Signal, Level, Pulse duration)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 405 / 491


KUKA System Software 8.3

Explanation of Element Description


the syntax Signal Type: BOOL
Output to which the pulse is to be fed. The following are
permitted:
 OUT[No]
 Signal variable
Level Type: BOOL
Logic expression:
 TRUE represents a positive pulse (high).
 FALSE represents a negative pulse (low).
Pulse dura- Type: REAL
tion
Range of values: 0.1 to 3.0 seconds. Pulse durations out-
side this range trigger a program stop.
Pulse interval: 0.1 seconds, i.e. the pulse duration is
rounded up or down. The PULSE statement is executed in
the controller at the low-priority clock rate. This results in a
tolerance in the order of the pulse interval (0.1 seconds).
The time deviation is about 1% - 2% on average. The devi-
ation is about 13% for very short pulses.

$OUT+PULSE If an output is already set before the pulse, it will be reset by the falling edge
of the pulse.
$OUT[50] = TRUE
PULSE($OUT[50],TRUE,0.5)
Actual pulse characteristic at output 50:

Fig. 11-1: $OUT+PULSE, example 1

If a negative pulse is applied to an output that is set to Low, the output remains
Low until the end of the pulse and is then set to High:
$OUT[50] = FALSE
PULSE($OUT[50],FALSE,0.5)
Actual pulse characteristic at output 50:

Fig. 11-2: $OUT+PULSE, example 2

PULSE+$OUT If the same output is set during the pulse duration, it will be reset by the falling
edge of the pulse.
PULSE($OUT[50],TRUE,0.5)
$OUT[50] = TRUE
Actual pulse characteristic at output 50:

406 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Fig. 11-3: PULSE+$OUT, example 1

If the output is reset during the pulse duration, the pulse duration is reduced
accordingly:
PULSE($OUT[50],TRUE,0.5)
$OUT[50] = FALSE
Actual pulse characteristic at output 50:

Fig. 11-4: PULSE+$OUT, example 2

If an output is set to FALSE during a pulse and then back to TRUE, the pulse
is interrupted and then resumed when the output is set to TRUE. The overall
duration from the first rising edge to the last falling edge (i.e. including the du-
ration of the interruption) corresponds to the duration specified in the PULSE
statement.
PULSE($OUT[50],TRUE,0.8)
$OUT[50]=FALSE
$OUT[50]=TRUE
Actual pulse characteristic at output 50:

Fig. 11-5: PULSE+$OUT, example 3

The actual pulse characteristic is only specified as above if $OUT[x]=TRUE is


set during the pulse. If $OUT[x]=TRUE is not set until after the pulse (see line
3), then the actual pulse characteristic is as follows (line 4):

Fig. 11-6: PULSE+$OUT, example 4

PULSE+PULSE If several PULSE statements overlap, it is always the last PULSE statement
that determines the end of the overall pulse duration.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 407 / 491


KUKA System Software 8.3

If a pulse is activated again before the falling edge, the duration of the second
pulse starts at this moment. The overall pulse duration is thus shorter than the
sum of the values of the first and second pulses:
PULSE($OUT[50],TRUE,0.5)
PULSE($OUT[50],TRUE,0.5)
Actual pulse characteristic at output 50:

Fig. 11-7: PULSE+PULSE, example 1

If, during the pulse duration of a positive pulse, a negative pulse is sent to the
same output, only the second pulse is taken into consideration from this mo-
ment onwards:
PULSE($OUT[50],TRUE,0.5)
PULSE($OUT[50],FALSE,0.5)
Actual pulse characteristic at output 50:

Fig. 11-8: PULSE+PULSE, example 2

PULSE($OUT[50],TRUE,3.0)
PULSE($OUT[50],FALSE,1.0)
Actual pulse characteristic at output 50:

Fig. 11-9: PULSE+PULSE, example 3

PULSE+END If a pulse is programmed before the END statement, the duration of program
execution is increased accordingly.
PULSE($OUT[50],TRUE,0.8)
END
Program active
Actual pulse characteristic at output 50:

Fig. 11-10: PULSE+END, example

408 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

PULSE+RESET/ If program execution is reset (RESET) or aborted (CANCEL) while a pulse is


CANCEL active, the pulse is immediately reset:
PULSE($OUT[50],TRUE,0.8)
RESET or CANCEL
Actual pulse characteristic at output 50:

Fig. 11-11: PULSE+RESET, example

11.8.4 SIGNAL

Description SIGNAL links predefined signal variables for inputs or outputs with a name.
Such a link, i.e. a SIGNAL declaration, is required in order to be able to ad-
dress an analog input or output. An input or output may appear in several SIG-
NAL declarations.
The user can declare signals in the following files:
 In DAT files, in the section EXTERNAL DECLARATIONS
 In SRC files, in the declaration section
 In $CONFIG.DAT, in the section USER GLOBALS
There are also SIGNAL declarations that are predefined in the system. They
can be found in the file $machine.DAT in the directory KRC:\STEU\MADA.
These declarations can be deactivated in $machine.DAT using the keyword
FALSE.

Syntax Declaration of signal names for inputs and outputs:


<GLOBAL> SIGNAL Signal name Signal variable <TO Signal variable>
Deactivation of a predefined SIGNAL declaration:
SIGNAL System signal name FALSE

Explanation of Element Description


the syntax GLOBAL Only possible for signals defined in a DAT file.
(>>> 11.3.4 "Areas of validity" Page 362)
Signal name Any name
Signal Predefined signal variable. The following types are avail-
variable able:
 $IN[x]
 $OUT[x]
 $ANIN[x]
 $ANOUT[x]
TO Groups together several consecutive binary inputs or out-
puts (max. 32) to form a digital input or output. The com-
bined signals can be addressed with a decimal name, a
hexadecimal name (prefix H) or with a bit pattern name
(prefix B). They can also be processed with Boolean oper-
ators.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 409 / 491


KUKA System Software 8.3

Element Description
System signal Signal name predefined in the system, e.g. $T1.
name
FALSE Deactivates a SIGNAL declaration predefined in the sys-
tem. The inputs or outputs to which the SIGNAL declara-
tion refers are thus available again for other purposes.
FALSE is not a Boolean value here, but a keyword. The
option TRUE is not available. If the SIGNAL declaration
that has been deactivated by means of FALSE is to be
reactivated, the program line containing the entry FALSE
must be deleted.

Example 1 The output $OUT[7] is assigned the name START_PROCESS. The output
$OUT[7] is set.
SIGNAL START_PROCESS $OUT[7]
START_PROCESS = TRUE

Example 2 The outputs $OUT[1] to $OUT[8] are combined to form one digital output un-
der the name OUTWORT. The outputs $OUT[3], $OUT[4], $OUT[5] and
$OUT[7] are set.
SIGNAL OUTWORT $OUT[1] TO $OUT[8]
OUTWORT = 'B01011100'

11.9 Subprograms and functions

11.9.1 Calling a subprogram

Description Subprograms are programs which are accessed by means of branches from
the main program. Once the subprogram has been executed, the main pro-
gram is resumed from the line directly after the subprogram call.
 Local subprograms are contained in the same SRC file as the main pro-
gram. They can be made to be recognized globally using the keyword
GLOBAL.
 Global subprograms are programs with a separate SRC file of their own,
which is accessed from another program by means of a branch.
A subprogram is called in the main program by specifying the name of the sub-
program followed by round brackets.

Example In the following example, the subprogram my_subprogram is called:


my_subprogram()

11.9.2 Calling a function

Description A function is a subprogram that returns a certain value to the main program.
Functions have a data type.
A function is called in a similar way to a subprogram: specify the name of the
function in the main program followed by round brackets. A function call can
never stand alone, however; instead, the value must constantly be assigned
to a variable of the same data type.

Example Examples of calls from the main program:


REALVAR = REALFUNCTION()

410 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

INTVAR = 5 * INTFUNCTION() + 1

11.9.3 DEFFCT ... ENDFCT

Description This syntax describes the structure of a function.

Syntax DEFFCT Data type Name(<Variable:IN |OUT>)


<Statements>
RETURN Function value
ENDFCT

Explanation of Element Description


the syntax Data type Data type of the function
Name Name of the function
Variable If a value is transferred in the function: name of the variable
to which the value is transferred
(>>> 11.9.5 "Transferring parameters to a subprogram or
function" Page 412)
IN |OUT If a value is transferred in the function: type of transfer
Function (>>> 11.9.4 "RETURN" Page 411)
value

Example (>>> 11.9.4 "RETURN" Page 411)

11.9.4 RETURN

Description Jump from a subprogram or function back to the program from which the sub-
program or function was called.
Subprograms
RETURN can be used to return to the main program if a certain condition is
met in the subprogram. No values from the subprogram can be transferred to
the main program.
Functions
Functions must be ended by a RETURN statement containing the value that
has been determined. The determined value is hereby transferred to the pro-
gram from which the function was called.

Syntax For subprograms:


RETURN
For functions:
RETURN Function value

Explanation of Element Description


the syntax Function Type: The data type of Function value must match the data
value type of the function.
Function value is the value determined by the function. The
value can be specified as a constant, a variable or an
expression.

Example 1 Return from a subprogram to the program from which it was called, dependent
on a condition.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 411 / 491


KUKA System Software 8.3

DEF PROG_2()
...
IF $IN[5]==TRUE THEN
RETURN
...
END

Example 2 Return from a function to the program from which it was called. The value X is
transferred.
DEFFCT INT CALCULATE(X:IN)
INT X
X=X*X
RETURN X
ENDFCT

11.9.5 Transferring parameters to a subprogram or function

Description Parameters can be transferred from a main program to local and global sub-
programs and functions.
There are 2 ways of transferring parameters:
 As IN parameters
The value of the variable remains unchanged in the main program.
This transfer type is also called “Call by Value”.
 As OUT parameters
The subprogram reads the value, modifies it and writes the new value
back to the main program.
This transfer type is also called “Call by Reference”.

Recommendation: Always transfer a parameter to a variable of the


same data type.
It is possible to transfer parameters to a different data type, but with
certain restrictions.
(>>> 11.9.6 "Transferring a parameter to a different data type" Page 416)

Example 1 Transferring parameters to a local subprogram:


1 DEF MY_PROG( )
2 DECL REAL r,s
3 ...
4 CALC_1(r)
5 ...
6 CALC_2(s)
7 ...
8 END
_______________________________________
9 DEF CALC_1(num1:IN)
10 DECL REAL num1
11 ...
12 END
_______________________________________
13 DEF CALC_2(num2:OUT)
14 DECL REAL num2
15 ...
16 END

412 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Line Description
4 The subprogram CALC_1 is called and the parameter “r” is
transferred.
6 The subprogram CALC_2 is called and the parameter “s” is
transferred.
9 num1: The name of the variable to which the value of “r” is
transferred.
IN means: “r” is only transferred for reading.
10, 14 The variables to which values are transferred must be de-
clared.
13 num2: The name of the variable to which the value of “s” is
transferred.
OUT means: “s” is transferred, modified and written back to the
main program.

Example 2 Transferring parameters to a global function:


Main program MY_PROG( ):
1 DEF MY_PROG( )
2 DECL REAL result, value
3 value = 2.0
4 result = CALC(value)
5 ...
...
END

Line Description
3 “value” is assigned the value “2.0”.
4 The function CALC is called and the value of “value” is trans-
ferred.
The return value of the function is assigned to the variable “re-
sult”.

What happens if the value is transferred as an IN parameter?


CALC() function with IN:
1 DEFFCT REAL CALC(num:IN)
2 DECL REAL return_value, num
3 num = num + 8.0
4 return_value = num * 100.0
5 RETURN(return_value)
6 ENDFCT

Line Description
1 The value of “value” is transferred to “num” as an IN parame-
ter. The value is still 2.0.
3 The value of “num” is modified. The value is now 10.0.
4, 5 The value of “return_value” is calculated and returned to the
variable “result” in the main program. The value is 1 000.0.
6 The function is terminated and execution of the main program
is resumed from line 5.
Note: The value of “value” in the main program is unchanged:
2.0.

What happens if the value is transferred as an OUT parameter?

Issued: 14.01.2015 Version: KSS 8.3 SI V4 413 / 491


KUKA System Software 8.3

CALC() function with OUT:


1 DEFFCT REAL CALC(num:OUT)
2 DECL REAL return_value, num
3 num = num + 8.0
4 return_value = num * 100.0
5 RETURN(return_value)
6 ENDFCT

Line Description
1 The value of “value” is transferred to “num” as an OUT param-
eter. The value is still 2.0.
3 The value of “num” is modified. The value is now 10.0.
4, 5 The value of “return_value” is calculated and returned to the
variable “result” in the main program. The value is 1 000.0.
6 The function is terminated and execution of the main program
is resumed from line 5.
Note: The value of “value” in the main program is now 10.0.

Transferring Transferring multiple parameters:


multiple param- The sequence automatically determines which parameter is transferred to
eters which parameter: The first parameter is transferred to the first parameter in the
subprogram, the second to the second parameter in the subprogram, etc.
1 DEF MY_PROG( )
2 DECL REAL w
3 DECL INT a, b
4 ...
5 CALC(w, b, a)
6 ...
7 CALC(w, 30, a)
8 ...
9 END
_______________________________________
10 DEF CALC(ww:OUT, bb:IN, oo:OUT)
11 DECL REAL ww
12 DECL INT oo, bb
13 ...
14 END

Line Description
5 “w” is transferred to “ww” as an OUT parameter.
“b” is transferred to “bb” as an IN parameter.
“a” is transferred to “oo” as an OUT parameter.
7 “w” is transferred to “ww” as an OUT parameter.
“30” is transferred to “bb” as an IN parameter.
“a” is transferred to “oo” as an OUT parameter.

It is also possible not to transfer a value to a receiving variable in the


subprogram, provided that this value is not required in the subpro-
gram. This makes it easier to adapt the program to changing se-
quences.
Example: CALC (w, ,a)

414 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Transferring Transferring arrays:


arrays  Arrays may only be transferred as OUT parameters.
 Only complete arrays can be transferred to another array.
 Always declare the array in the subprogram without an array size. The ar-
ray size adapts itself to the output array.
1 DEF MY_PROG( )
2 DECL CHAR name[10]
3 ...
4 name="OKAY"
5 CALC(name[])
6 ...
7 END
_______________________________________
8 DEF CALC(my_name[]:OUT)
9 DECL CHAR my_name[]
10 ...
11 END

Line Description
5, 8 Only complete arrays can be transferred to another array.
8 Arrays may only be transferred as OUT parameters.
9 Always declare the array in the subprogram without an array
size. The array size adapts itself to the original array.

In the case of transferring multidimensional arrays, array sizes are again not
specified. However, the dimension of the array must be specified by means of
commas.
Examples:
ARRAY_1D[] (1-dimensional)
ARRAY_2D[,] (2-dimensional)
ARRAY_3D[,,] (3-dimensional)

Transferring individual array elements:


An individual array element may only be transferred to a variable, not to an ar-
ray.
1 DEF MY_PROG( )
2 DECL CHAR name[10]
3 ...
4 name="OKAY"
5 CALC(name[1])
6 ...
7 END
_______________________________________
8 DEF CALC(symbol:IN)
9 DECL CHAR symbol
10 ...
11 END

Issued: 14.01.2015 Version: KSS 8.3 SI V4 415 / 491


KUKA System Software 8.3

Line Description
2 A CHAR array with 10 elements is declared.
4 Values are assigned to the first 4 elements of the array. This
corresponds to:
name[1] = "O"
name[2] = "K"
name[3] = "A"
name[4] = "Y"
(A CHAR variable can only ever contain 1 ASCII character.)
5 The subprogram CALC is called and the value of the first ele-
ment is transferred, i.e. the value “O”.
8 Individual array elements can also be transferred as IN param-
eters.
9 The variable to which the value of the array element is trans-
ferred must be declared (a variable, not an array).

11.9.6 Transferring a parameter to a different data type

It is always possible to transfer a value to the same data type. The following
applies for transfer to a different data type:

Type in the main Type in the


Effect
program subprogram
BOOL INT, REAL, CHAR Transfer not possible; error message
INT, REAL, CHAR BOOL
INT REAL INT value is used as REAL value.
INT CHAR Character from the ASCII table is used.
CHAR INT INT value from the ASCII table is used.
CHAR REAL REAL value from the ASCII table is used.
REAL INT REAL values are rounded.
REAL CHAR REAL values are rounded; character from the
ASCII table is used.

11.10 Interrupt programming

11.10.1 BRAKE

Description BRAKE stops the robot.


BRAKE may only be used in an interrupt program. The interrupt program is not
continued until the robot has come to a stop. The robot motion is resumed as
soon as the interrupt program has been completed.

Syntax BRAKE <F>

Explanation of Element Description


the syntax F F triggers a STOP 1.
In the case of a BRAKE statement without F, the robot
brakes with a STOP 2.

Example (>>> 11.10.3 "INTERRUPT" Page 418)

416 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

11.10.2 INTERRUPT ... DECL ... WHEN ... DO

Description In the case of a defined event, e.g. an input, the controller interrupts the cur-
rent program and executes a defined subprogram. The event and the subpro-
gram are defined by INTERRUPT ... DECL ... WHEN ... DO.
Once the subprogram has been executed, the interrupted program is resumed
at the point at which it was interrupted. Exception: RESUME.
A subprogram called by an interrupt is called an interrupt program.
A maximum of 32 interrupts may be declared simultaneously. An interrupt dec-
laration may be overwritten by another at any time.

The interrupt declaration is an instruction. It must be situated in the


instruction section of the program and not in the declaration section!

When first declared, an interrupt is deactivated. The interrupt must be


activated before the system can react to the defined event!
(>>> 11.10.3 "INTERRUPT" Page 418)

Interrupt programs must not contain any spline motions.

Syntax <GLOBAL> INTERRUPT DECL Prio WHEN Event DO Subprogram

Explanation of Element Description


the syntax GLOBAL An interrupt is only recognized at, or below, the level in
which it is declared. In other words, an interrupt declared in
a subprogram is not recognized in the main program (and
cannot be activated there). If an interrupt is also to be rec-
ognized at higher levels, the declaration must be preceded
by the keyword GLOBAL.
Prio Type: INT
If several interrupts occur at the same time, the interrupt
with the highest priority is processed first, then those of
lower priority. 1 = highest priority.
Priorities 1, 2, 4 to 39 and 81 to 128 are available.
Note: Priorities 3 and 40 to 80 are reserved for use by the
system. They must not be used by the user because this
would cause system-internal interrupts to be overwritten
and result in errors.
Event Type: BOOL
Event that is to trigger the interrupt. Structure components
are impermissible. The following are permitted:
 a global Boolean variable
 a signal name
 a comparison
 a simple logic operation: NOT, OR, AND or EXOR
Subprogram The name of the interrupt program to be executed. Run-
time variables may not be transferred to the interrupt pro-
gram as parameters, with the exception of variables
declared in a data list.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 417 / 491


KUKA System Software 8.3

Example 1 Declaration of an interrupt with priority 23 that calls the subprogram SP1 if
$IN[12] is true. The parameters 20 and VALUE are transferred to the subpro-
gram.
INTERRUPT DECL 23 WHEN $IN[12]==TRUE DO UP1(20,VALUE)

Example 2 Two objects, the positions of which are detected by two sensors connected to
inputs 6 and 7, are located on a programmed path. The robot is to be moved
subsequently to these two positions.
For this purpose, the two detected positions are saved as points P_1 and P_2.
These points are then addressed in the second section of the main program.
If the robot controller detects an event defined by means of INTERRUPT ...
DECL ... WHEN ... DO, it always saves the current robot position in the system
variables $AXIS_INT (axis-specific) and $POS_INT (Cartesian).
Main program:
DEF PROG()
...
INTERRUPT DECL 10 WHEN $IN[6]==TRUE DO UP1()
INTERRUPT DECL 20 WHEN $IN[7]==TRUE DO UP2()
...
INTERRUPT ON
LIN START
LIN END
INTERRUPT OFF
LIN P_1
LIN P_2
...
END

Local interrupt program 1:


DEF UP1()
P_1=$POS_INT
END

Local interrupt program 2:


DEF UP2()
P_2=$POS_INT
END

11.10.3 INTERRUPT

Description Executes one of the following actions:


 Activates an interrupt.
 Deactivates an interrupt.
 Disables an interrupt.
 Enables an interrupt.
The interrupt must previously have been declared. (>>> 11.10.2 "INTER-
RUPT ... DECL ... WHEN ... DO" Page 417)

Syntax INTERRUPT Action <Number>

418 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Explanation of Element Description


the syntax Action  ON: Activates an interrupt.
 OFF: Deactivates an interrupt.
 DISABLE: Disables an activated interrupt.
 ENABLE: Enables a disabled interrupt.
Number Type: INT
Number (= priority) of the interrupt to which the Action is to
refer.
Number can be omitted. In this case, ON or OFF refers to all
declared interrupts, while DISABLE or ENABLE refers to all
active interrupts.

Up to 16 interrupts may be active at any one time. In this regard, par-


ticular attention must be paid to the following:
If, in the case of INTERRUPT ON, the Number is omitted, all declared
interrupts are activated. The maximum permissible total of 16 may not be
exceeded, however.
 If a trigger calls a subprogram, it counts as an active interrupt until the
subprogram has been executed.

If, in the interrupt declaration, a Boolean variable, e.g. an input, has been de-
fined as the Event:
 In this case, the interrupt is triggered by a change of state, e.g. in the case
of $IN[x]==TRUE by the change from FALSE to TRUE. The state must
therefore not already be present at INTERRUPT ON, as the interrupt is not
then triggered!
 Furthermore, the following must also be considered in this case: the
change of state must not occur until at least one interpolation cycle after
INTERRUPT ON.
(This can be achieved by programming a WAIT SEC 0.012 after INTER-
RUPT ON. If no advance run stop is desired, a CONTINUE command can
also be programmed before the WAIT SEC.)
The reason for this is that INTERRUPT ON requires one interpolation cy-
cle (= 12 ms) before the interrupt is actually activated. If the state changes
before this, the interrupt cannot detect the change.

Example 1 The interrupt with priority 2 is activated. (The interrupt must already be de-
clared.)
INTERRUPT ON 2

Example 2 A non-path-maintaining EMERGENCY STOP is executed via the hardware


during application of adhesive. The application of adhesive is stopped by the
program and the adhesive gun is repositioned onto the path after enabling (by
input 10).
DEF PROG()
...
INTERRUPT DECL 1 WHEN $STOPMESS DO STOP_PROG()
LIN P_1
INTERRUPT ON
LIN P_2
INTERRUPT OFF
...
END

Issued: 14.01.2015 Version: KSS 8.3 SI V4 419 / 491


KUKA System Software 8.3

DEF STOP_PROG()
BRAKE F
GLUE=FALSE
WAIT FOR $IN[10]
LIN $POS_RET
GLUE=TRUE
END

11.10.4 RESUME

Description RESUME cancels all running interrupt programs and subprograms up to the
level at which the current interrupt was declared.
RESUME may only occur in interrupt programs. (Not in interrupt programs,
however, that are called by an interrupt that is declared as GLOBAL.) When
the RESUME statement is activated, the advance run pointer must not be at
the level where the interrupt was declared, but at least one level lower.
Changing the variable $BASE in the interrupt program only has an effect there.
The computer advance run, i.e. the variable $ADVANCE, must not be modified
in the interrupt program.
Please note the following regarding the behavior of the robot controller after a
RESUME:
 If the first motion instruction after RESUME is a CIRC motion, this is exe-
cuted as LIN.
 If the first motion instruction after RESUME is a SCIRC motion, this is ex-
ecuted as SLIN.
Reason: Following a RESUME statement, the robot is not situated at the orig-
inal start point of the motion. The motion will thus differ from how it was origi-
nally planned; this can potentially be very dangerous, particularly in the case
of CIRC/SCIRC motions.
All other motions following a RESUME statement are executed as the motion
type they were programmed to be.

If the first motion instruction after RESUME is a CIRC or


SCIRC motion, the robot must be able to reach the end
point of the motion safely, by means of a LIN or SLIN motion, from any posi-
tion in which it could find itself when the RESUME statement is executed.
This must be taken into consideration when programming RESUME state-
ments.
Failure to take this precaution into consideration may result in death, injuries
or damage to property.

Syntax RESUME

Example The robot is to search for a part on a path. The part is detected by means of a
sensor at input 15. Once the part has been found, the robot is not to continue
to the end point of the path, but to return to the interrupt position and pick up
the part. The main program is then to be resumed.
Main program PROG():
DEF PROG()
INI
...
INTERRUPT DECL 21 WHEN $IN[15] DO FOUND()
PTP HOME
...
SEARCH()

420 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

...
END

Motions that are to be canceled by means of BRAKE and RESUME must be


located in a subprogram. For this reason, the search path is not directly pro-
grammed in the main program, but rather in the subprogram SEARCH().
Subprogram SEARCH() with search path:
DEF SEARCH()
INTERRUPT ON 21
SPLINE
SPL START_SEARCH
SPL IN_BETWEEN
SPL END_SEARCH
ENDSPLINE
WAIT FOR TRUE
...
END

When the RESUME statement is activated, the advance run pointer must not
be at the level where the current interrupt was declared. To prevent this, an
advance run stop is triggered here via WAIT FOR TRUE.
Interrupt program FOUND():
DEF FOUND()
INTERRUPT OFF 21
BRAKE
LIN $POS_INT
... ;The robot grips the found part.
RESUME
END

The braking process causes the robot to move slightly away from the position
at which the interrupt was triggered. LIN $POS_INT causes the robot to return
to the position at which the interrupt was triggered.
The motion type LIN was used here because interrupt programs must not con-
tain any spline motions.
After LIN $POS_INT, the robot grips the part. (Not programmed in this exam-
ple.)
RESUME causes the main program to be resumed after the part has been
gripped. Without the RESUME statement, the subprogram SEARCH() would
be resumed after END.

11.11 Path-related switching actions (=Trigger)

11.11.1 TRIGGER WHEN DISTANCE

Description The Trigger triggers a user-defined statement. The robot controller executes
the statement parallel to the robot motion.
The trigger can optionally refer to the start or end point of the motion. The
statement can either be triggered directly at the reference point, or it can be
shifted in time.

Syntax TRIGGER WHEN DISTANCE=Position DELAY=Time DO Statement <PRIO=Pri-


ority>

Issued: 14.01.2015 Version: KSS 8.3 SI V4 421 / 491


KUKA System Software 8.3

Explanation of Element Description


the syntax Position Type: INT; variable or constant
Reference point of the trigger
 0: Start point
 1: End point
(>>> "Reference point for approximate positioning"
Page 422)
Time Type: REAL; variable, constant or function; unit: ms
Shift in time relative to Position. If no offset is desired, set
Time = 0.

 Negative value: Offset towards the start of the motion


 Positive value: Offset towards the end of the motion
(>>> "Max. offset" Page 423)
If Time calls a function, the function is subject to con-
straints. (>>> 11.11.3 "Constraints for functions in the trig-
ger" Page 431)
Statement Possible:
 Assignment of a value to a variable
Note: There must be no runtime variable on the left-
hand side of the assignment.
 OUT statement; PULSE statement; CYCFLAG state-
ment
 Subprogram call. In this case, Priority must be specified.
Priority Type: INT; variable or constant
Priority of the trigger. Only relevant if Statement calls a sub-
program, and then obligatory.
Priorities 1, 2, 4 to 39 and 81 to 128 are available. Priorities
40 to 80 are reserved for cases in which the priority is auto-
matically assigned by the system. If the priority is to be
assigned automatically by the system, the following is pro-
grammed: PRIO = -1.
If several triggers call subprograms at the same time, the
trigger with the highest priority is processed first, then the
triggers of lower priority. 1 = highest priority.

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.

Reference point Where is the reference point if the start or end point is approximated?
for approximate  DISTANCE = 0:
positioning
If the start point is approximated, the reference point lies at the end of the
approximate positioning arc.
 DISTANCE = 1:
If the end point is approximated, the reference point lies in the middle of
the approximate positioning arc.

422 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Fig. 11-12: TRIGGER WHEN DISTANCE reference point for approximate


positioning

Max. offset There are limits to the distance the reference point can be offset. The following
table specifies the maximum possible offsets. If larger, and thus invalid, offsets
are programmed, the robot controller switches the trigger at the permissible
limit at the latest. In T1/T2, it generates a corresponding message.

Maximum negative Maximum positive


DISTANCE = …
offset … offset …
DISTANCE = 0 ---  Up to end point
(No negative offset possi-  If the end point is ap-
ble.) proximated: up to the
start of the approxi-
mate positioning arc
DISTANCE = 1  Up to start point ---
and  If the start point is ap- (No positive offset possi-
proximated: up to the ble.)
End point = end of the approxi-
exact position- mate positioning arc
ing point
DISTANCE = 1 Up to the start of the Up to the end of the
approximate positioning approximate positioning
and
arc of the end point arc of the end point
End point =
approximated

Example 1 130 milliseconds after P_2, $OUT[8] is set to TRUE.


LIN P_2
TRIGGER WHEN DISTANCE=0 DELAY=130 DO $OUT[8]=TRUE
LIN P_3

Example 2 In the middle of the approximate positioning arc of P_5, the subprogram
MY_SUBPROG with priority 5 is called.
PTP P_4
TRIGGER WHEN DISTANCE=1 DELAY=0 DO MY_SUBPROG() PRIO=5
PTP P_5 C_DIS
PTP P_6

Example 3 Explanation of the diagram (>>> Fig. 11-13 ):


In the diagram, the approximate positions in which the Triggers would be trig-
gered are indicated by arrows. Start, middle and end of each approximate po-
sitioning arc are marked (with *start, *middle and *end).

Issued: 14.01.2015 Version: KSS 8.3 SI V4 423 / 491


KUKA System Software 8.3

1 DEF PROG()
2 ...
3 PTP P_0
4 TRIGGER WHEN DISTANCE=0 DELAY=40 DO A=12
5 TRIGGER WHEN DISTANCE=1 DELAY=-20 DO UP1() PRIO=10
6 LIN P_1
7 ...
8 TRIGGER WHEN DISTANCE=0 DELAY=10 DO UP2(A) PRIO=5
9 TRIGGER WHEN DISTANCE=1 DELAY=15 DO B=1
10 LIN P_2 C_DIS
11 ...
12 TRIGGER WHEN DISTANCE=0 DELAY=10 DO UP2(B) PRIO=12
13 TRIGGER WHEN DISTANCE=1 DELAY=0 DO UP(A,B,C) PRIO=6
14 LIN P_3 C_DIS
15 ...
16 TRIGGER WHEN DISTANCE=0 DELAY=50 DO UP2(A) PRIO=4
17 TRIGGER WHEN DISTANCE=1 DELAY=-80 DO A=0
18 LIN P_4
19 ...
20 END

Line Switching ranges of the triggers


4 Switching range: P_0 to P_1
5 Switching range: P_0 to P_1
8 Switching range: P_1 to P_2*start
9 Switching range: P_2*start to P_2*end
12 Switching range: P_2*end to P_3*start
13 Switching range: P_3*start to P_3*end
16 Switching range: P_3*end to P_4
17 Switching range: P_3*end to P_4

Fig. 11-13: Example of TRIGGER WHEN DISTANCE

11.11.2 TRIGGER WHEN PATH

Description The Trigger triggers a user-defined statement. The robot controller executes
the statement parallel to the robot motion.

424 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

The trigger can optionally refer to the start or end point of the motion. The
statement can either be triggered directly at the reference point, or it can be
shifted in space and/or time.

The trigger cannot be used for PTP motions.


If the trigger is used in a spline block, it must not be between the last
segment and ENDSPLINE.

Syntax TRIGGER WHEN PATH = Distance <ONSTART> DELAY = Time DO Statement


<PRIO = Priority>

Functions PATH and DELAY can call functions. The functions are subject to constraints.
(>>> 11.11.3 "Constraints for functions in the trigger" Page 431)

Explanation of Element Description


the syntax ONSTART Reference point of the trigger
 With ONSTART: Start point
 Without ONSTART: End point
(>>> 11.11.2.1 "Reference point for approximate position-
ing – overview" Page 428)
Distance Type: REAL; variable, constant or function; unit: mm
(except in the case of PTP splines without unit)
Shift in space relative to the reference point. If no shift in
space is desired, set Distance = 0.
 Negative value: Offset towards the start of the motion
 Positive value: Offset towards the end of the motion
(>>> "Max. offset" Page 426)
Time Type: REAL; variable, constant or function; unit: ms
Shift in time relative to Distance. If no shift in time is desired,
set Time = 0.
 Negative value: Offset towards the start of the motion
 Positive value: Trigger is switched after Time has
elapsed.
(>>> "Max. offset" Page 426)

Issued: 14.01.2015 Version: KSS 8.3 SI V4 425 / 491


KUKA System Software 8.3

Element Description
Statement Possible:
 Assignment of a value to a variable
Note: There must be no runtime variable on the left-
hand side of the assignment.
 OUT statement; PULSE statement; CYCFLAG state-
ment
 Subprogram call. In this case, Priority must be specified.
Priority Type: INT; variable or constant
Priority of the trigger. Only relevant if Statement calls a sub-
program, and then obligatory.
Priorities 1, 2, 4 to 39 and 81 to 128 are available. Priorities
40 to 80 are reserved for cases in which the priority is auto-
matically assigned by the system. If the priority is to be
assigned automatically by the system, the following is pro-
grammed: PRIO = -1.
If several triggers call subprograms at the same time, the
trigger with the highest priority is processed first, then the
triggers of lower priority. 1 = highest priority.

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.

Max. offset The switching point can only be offset within certain limits. If larger, and thus
invalid, offsets are programmed, the robot controller switches the trigger at the
permissible limit at the latest. In T1/T2, it generates a corresponding message.
Maximum offset for Distance + negative Time value:
The limits apply to the entire offset, comprising shift in space and negative shift
in time.

426 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Maximum negative offset … Maximum positive offset …


Up to start point (provided that this Up to end point (provided that this is
is not approximated) not approximated)
If the start point is an approximate If the end point is an approximate
positioning point: positioning point:
 If the start point is an approxi-  In the case of homogenous ap-
mated PTP point: proximate positioning: up to the
Up to the end of the approxi- next exact positioning point after
mate positioning arc the TRIGGER statement
 If the start point is a different ap-  In the case of mixed approxi-
proximated point: mate positioning (spline): up to
the switching point an ON-
Up to the start of the approxi-
START trigger with PATH = 0
mate positioning arc
would have if it were in the mo-
tion to which approximate posi-
tioning is being carried out.
(>>> 11.11.2.3 "Reference
point for mixed approximate po-
sitioning (spline)" Page 430)
 In the case of mixed approxi-
mate positioning (LIN/CIRC/
PTP): up to the start of the ap-
proximate positioning arc

Maximum offset for positive Time value:


The maximum positive shift in time is 1,000 ms. Any shift in time between 0
and 1,000 ms will be switched, even if the program has already been deselect-
ed in the meantime!

Example LIN P_2 C_DIS


TRIGGER WHEN PATH = -20.0 DELAY= -10 DO $OUT[2]=TRUE
LIN P_3 C_DIS
LIN P_4 C_DIS
LIN P_5

In the diagram, the approximate position in which the $OUT[2]=TRUE state-


ment would be triggered is indicated by an arrow.

Fig. 11-14: Example of TRIGGER WHEN PATH

Switching range: P_2*start to P_5.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 427 / 491


KUKA System Software 8.3

If P_2 were not approximated, the switching range would be P_2 to P_5.
The switching range goes to P_5 because P_5 is the next exact positioning
point after the TRIGGER statement. If P_3 were not approximated, the switch-
ing range would be P_2 to P_3, as P_3 is the next exact positioning point in
the program after the Trigger statement.

Example 1 PTP P0
2 SPLINE
3 SPL P1
4 SPL P2
5 SPL P3
6 SPL P4
7 TRIGGER WHEN PATH=0 ONSTART DELAY=10 DO $OUT[5]=TRUE
8 SCIRC P5, P6
9 SPL P7
10 TRIGGER WHEN PATH=-20.0 DELAY=0 DO SUBPR_2() PRIO=-1
11 SLIN P8
12 ENDSPLINE

The Trigger in line 10 would have the same result if it was positioned directly
before the spline block (i.e. between line 1 and line 2). In both cases, it refers
to the last point of the spline motion: P8.
It is advisable, however, to position the trigger as shown in the example, and
not directly before the spline block.

Fig. 11-15: Example of TRIGGER WHEN PATH (for spline)

11.11.2.1Reference point for approximate positioning – overview

Where is the reference point of a PATH trigger if the start or end point is
approximated?
This depends primarily on whether homogenous or mixed approximate posi-
tioning is being carried out.

Homogenous Homogenous approximate positioning


 From a CP spline motion to a CP spline motion
 From a PTP spline motion to a PTP spline motion
 From a LIN or CIRC spline motion to a LIN or CIRC spline motion
Every spline motion can be a spline block or an individual instruction.
(>>> 11.11.2.2 "Reference point for homogenous approximate positioning"
Page 429)

428 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Mixed Mixed approximate positioning


In this case, the position of the reference point also depends on whether the
motions are spline motions or conventional motions.
 From a CP spline motion to a PTP spline motion or vice versa
Every spline motion can be a spline block or an individual instruction.
(>>> 11.11.2.3 "Reference point for mixed approximate positioning
(spline)" Page 430)
 From a PTP spline motion to a LIN or CIRC spline motion or vice versa
(>>> 11.11.2.4 "Reference point for mixed approximate positioning (LIN/
CIRC/PTP)" Page 431)

11.11.2.2Reference point for homogenous approximate positioning

The principle is explained here using an example with CP spline blocks. It also
applies to other types of homogenous approximate positioning.

Example SPLINE
...
SLIN P2
TRIGGER WHEN PATH=0 DELAY=0 DO ... ;Trigger 1
SLIN P3
ENDSPLINE C_SPL
SPLINE
TRIGGER WHEN PATH=0 ONSTART DELAY=0 DO ... ;Trigger 2
SLIN P4
...
ENDSPLINE

Triggers 1 and 2 both refer to P3. P3 is approximated. The robot controller


transfers the point onto the approximate positioning arc by a distance corre-
sponding to the approximation distance (= P3').

End point approx- Reference point of Trigger 1:


imated The robot controller calculates how far the distance would be from the start of
the approximate positioning arc to the end point with exact positioning. This
distance is then applied to the approximate positioning arc.
The distance PStartApprox → P3 is the same as PStartApprox → P3'Trigger 1.

Fig. 11-16: Trigger 1: Reference point for homogenous approximate po-


sitioning

PStartApprox Start of the approximate positioning arc


P3 Reference point for exact positioning
P3'Trigger 1 Reference point for approximate positioning

Issued: 14.01.2015 Version: KSS 8.3 SI V4 429 / 491


KUKA System Software 8.3

Start point Reference point of Trigger 2:


approximated The robot controller calculates how far the distance would be from the end of
the approximate positioning arc back to the start point with exact positioning.
This distance is then applied to the approximate positioning arc.
The distance PEndApprox → P3 is the same as PEndApprox → P3'Trigger 2.

Fig. 11-17: Trigger 2: Reference point for homogenous approximate po-


sitioning

PEndApprox End of the approximate positioning arc


P3 Reference point for exact positioning
P3'Trigger 2 Reference point for approximate positioning

11.11.2.3Reference point for mixed approximate positioning (spline)

Example PTP_SPLINE
...
SPTP P2
TRIGGER WHEN PATH=0 DELAY=0 DO ... ;Trigger 1
SPTP P3
ENDSPLINE C_SPL

SPLINE
TRIGGER WHEN PATH=0 ONSTART DELAY=0 DO ... ;Trigger 2
SLIN P4
...
ENDSPLINE

Triggers 1 and 2 both refer to P3. P3 is approximated.

Start point Reference point of Trigger 2:


approximated
This reference point must be considered first, as the reference point
of Trigger 1 refers to it!

The reference point is determined in the same way as for homogenous ap-
proximate positioning.
(>>> "Start point approximated" Page 430)

End point approx- Reference point of Trigger 1:


imated The reference point for Trigger 1 is in the same position as that for Trigger 2.
The distance PStartApprox → P3'Trigger 1 is generally shorter than PStartApprox
→ P3.

430 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Fig. 11-18: Trigger 1: Reference point for mixed approximate positioning

PStartApprox Start of the approximate positioning arc


PEndApprox End of the approximate positioning arc
P3 Reference point for exact positioning
P3' Reference point for approximate positioning

If Trigger 1 were to be shifted to between PStartApprox and P3', the exact po-
sition would be determined as follows:
The robot controller calculates the percentage of the distance PStartApprox →
P3 at which the switching point would be located if the end point were an exact
positioning point. This proportion is then applied to the approximate position-
ing arc. The switching point is thus at x% of the distance PStartApprox →
P3'Trigger 1

11.11.2.4Reference point for mixed approximate positioning (LIN/CIRC/PTP)

Start point PTP-CP approximate positioning:


approximated The reference point is at the end of the approximate positioning arc.

End point approx- CP-PTP approximate positioning:


imated The reference point is at the start of the approximate positioning arc.

11.11.3 Constraints for functions in the trigger

The values for DELAY and PATH can be assigned using functions. The follow-
ing constraints apply to these functions:
 The KRL program containing the function must have the attribute Hidden.
(>>> 7.4.2 "Displaying or modifying properties of files and folders"
Page 233)
 The function must be globally valid.
 The functions may only contain the following statements or elements:
 Value assignments
 IF statements
 Comments
 Blank lines
 RETURN
 Read system variable
 Call predefined KRL function

Issued: 14.01.2015 Version: KSS 8.3 SI V4 431 / 491


KUKA System Software 8.3

11.11.4 Useful system variables for working with PATH triggers

11.11.4.1$DIST_NEXT

Description $DIST_NEXT specifies the length of the path from the current TCP position to
the next taught point.
Type: REAL. Unit:
 For CP motions (spline and conventional): mm
 For SPTP motions: No unit
$DIST_NEXT cannot be used for PTP motions. The value is always zero in
this case.
$DIST_NEXT is write-protected.

Procedure $DIST_NEXT can be used as an aid for programming PATH triggers without
ONSTART. It can be used to determine the value that must be assigned to the
PATH parameter.
1. Move to the position on the path where the switching point is to be located.
2. Read the system variable.
3. Program the trigger before the next point.
 Program the trigger without ONSTART.
 Assign the value of the system variable to the PATH parameter.

11.11.4.2$DIST_LAST

Description $DIST_LAST specifies the length of the path from the current TCP position to
the previous taught point. The value is generally positive.
Type: REAL. Unit:
 For CP motions (spline and conventional): mm
 For SPTP motions: No unit
$DIST_LAST cannot be used for PTP motions. The value is always zero in this
case.
$DIST_LAST is write-protected.

Procedure $DIST_LAST can be used as an aid for programming PATH triggers with ON-
START. It can be used to determine the value that must be assigned to the
PATH parameter.
1. Move to the position on the path where the switching point is to be located.
2. Read the system variable.
3. Program the trigger after the previous point.
 Program the trigger with ONSTART.
 Assign the value of the system variable to the PATH parameter.

11.12 Communication

Information about the following statements is contained in the Expert docu-


mentation CREAD/CWRITE.
 CAST_FROM
 CAST_TO
 CCLOSE
 CHANNEL

432 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

 CIOCTL
 COPEN
 CREAD
 CWRITE
 SREAD
 SWRITE

11.13 Operators

In each operation, the compiler checks the legitimacy of the operands.

11.13.1 Arithmetic operators

Description All 4 basic arithmetic operations are permissible in KRL.

Operator Description
+ Addition or positive sign
- Subtraction or negative sign
* Multiplication
/ Division

The arithmetic operators can be applied to the data types INT and REAL.

Operand Operand Result


INT INT INT
INT REAL REAL
REAL REAL REAL

If the result of an INT division is not an integer, it is cut off at the decimal point.

Examples DEF ARITH()


DECL INT A,B,C,D,E
DECL REAL K,L,M
INI
A = 2 ;A=2
B = 9.8 ;B=10
C = 9.50 ;C=10
D = 9.48 ;D=9
E = 7/4 ;E=1
K = 3.5 ;K=3.5
L = 1.0 ;L=1.0
M = 3 ;M=3.0
...
A = A * E ;A=2
B = B - ’HB’ ;B=-1
E = E + K ;E=5
K = K * 10 ;K=35.0
L = 10/4 ;L=2.0
L = 10/4.0 ;L=2.5
L = 10/4. ;L=2.5
L = 10./4 ;L=2.5
E = 10./4. ;E=3
M = (10/3) * M ;M=9.0
END

Issued: 14.01.2015 Version: KSS 8.3 SI V4 433 / 491


KUKA System Software 8.3

11.13.2 Geometric operator

Description Positions can be geometrically added using the geometric operator. The geo-
metric addition is also called a “frame operation”.
The geometric operator is symbolized by a colon “:” in KRL.
The geometric operator is suitable, for example, for the following purposes:
 Shifting positions to adapt them to a modified workpiece size
 Return motion strategies

Example This statement causes the tool to retract 100 mm against the tool direction, ir-
respective of the position at which the robot is currently located.
LIN $POS_ACT : {x -100, y 0, z 0, a 0, b 0, c 0}

The precondition is that the tool direction is located along the X axis.
$POS_ACT is a system variable of structure type E6POS and contains the
current Cartesian robot position.

Linked types The geometric operator can link the data types FRAME and POS/E6POS.
The components X, Y, Z, A, B and C must be assigned a value. The compo-
nents S and T remain unaffected by the operation and therefore do not have
to be assigned a value.
The result always has the data type of the operand on the far right.
Operation with 2 operands:

Left : Right Result


POS : POS POS
POS : FRAME FRAME
FRAME : FRAME FRAME
FRAME : POS POS

Examples of operations with 3 operands:

Left : Middle : Right Result


POS : POS : POS POS
POS : POS : FRAME FRAME
POS : FRAME : FRAME FRAME
FRAME : FRAME : POS POS

Meaning of the How can one visualize what the operands mean?
operands This is illustrated using the previous example for a return motion:

Left operand : Right operand


$POS_ACT : {x -100, y0, z0, a0, b0, c0}
Go to this destination …
… relative to the coordi-
nates and orientation of
this position.

11.13.2.1Sequence of the operands

The result of a geometric addition differs according to the sequence of the op-
erands. The following example illustrates this graphically.
 A = {x 1, y 1, z 0, a 0, b 0, c 0}

434 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

 B = {x 3, y 2, z 0, a -45, b 0, c 0}
 CS = original coordinate system
The result of an operation can be calculated using KRL. It specifies the posi-
tion of the right-hand operand relative to the coordinate system of the left-hand
operand.

Sequence A:B R = A : B means:


 A refers to CS.
 B refers to A.
The result specifies the position of B relative to CS:
R = {x 4, y 3, a -45}

Fig. 11-19: R = A : B

Sequence B:A R = B : A means:


 B refers to CS.
 A refers to B.
The result specifies the position of A relative to CS:
R = {x 4.414, y 2, a -45}

Fig. 11-20: R = B : A

11.13.2.2Example of a double operation

Description This example shows how multiple coordinate systems can be linked.
In order to show the effect of the operations, the robot is moved to the origin
of each coordinate system and of the operation. The robot waits there for
2 seconds to highlight the position. In order to illustrate the change in orienta-
tion, the tip of the tool first moves 100 mm in the X direction, then 100 mm in
the Y direction and finally 100 mm in the Z direction.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 435 / 491


KUKA System Software 8.3

Program 1 DEF geo_operator( )


2 DECL AXIS home
3 DECL FRAME ref_pos_x, ref_pos_y, ref_pos_z
4 DECL FRAME My_BASE[2]
...
5 INI
6 home={AXIS: A1 0,A2 -90,A3 90,A4 0,A5 30,A6 0}
7 $BASE={X 1000,Y 0,Z 1000,A 0,B 0,C 0}
8 ref_pos_X={X 100,Y 0,Z 0,A 0,B 0,C 0}
9 ref_pos_Y={X 100,Y 100,Z 0,A 0,B 0,C 0}
10 ref_pos_Z={X 100,Y 100,Z 100,A 0,B 0,C 0}
11 My_BASE[1]={X 200,Y 100,Z 0,A 0,B 0,C 180}
12 My_BASE[2]={X 0,Y 200,Z 250,A 0,B 90,C 0}
...
13 PTP home
14 PTP $BASE
15 WAIT SEC 2
16 PTP ref_pos_X
17 PTP ref_pos_Y
18 PTP ref_pos_Z
19 PTP My_BASE[1]
20 WAIT SEC 2
21 PTP My_BASE[1]:ref_pos_X
22 PTP My_BASE[1]:ref_pos_Y
23 PTP My_BASE[1]:ref_pos_Z
24 PTP My_BASE[1]:My_BASE[2]
25 WAIT SEC 2
26 PTP My_BASE[1]:My_BASE[2]:ref_pos_X
27 PTP My_BASE[1]:My_BASE[2]:ref_pos_Y
28 PTP My_BASE[1]:My_BASE[2]:ref_pos_Z
29 PTP My_BASE[2]:My_BASE[1]
30 WAIT SEC 2
31 PTP My_BASE[2]:My_BASE[1]:ref_pos_X
32 PTP My_BASE[2]:My_BASE[1]:ref_pos_Y
33 PTP My_BASE[2]:My_BASE[1]:ref_pos_Z
34 PTP home
35 END

Line Description
8 … 10 Initialization of 3 frames for the motion in the X, Y and Z direc-
tions.
11, 12 Initialization of 2 user-specific coordinate systems. These
serve as examples for the operations.
14 Move to the origin of the $BASE coordinate system.
16 … 18 In $BASE, first move 100 mm in the X direction, then 100 mm
in the Y direction and finally 100 mm in the Z direction.
19 In $BASE, move to the origin of the coordinate system
My_BASE[1].
21 … 23 Move to the same coordinates as in lines 16 … 18, but this
time in the coordinate system My_BASE[1], not in $BASE.
i.e. the location of these points in space is different from that in
lines 16 … 18.
24 In My_BASE[1], move to the origin of the coordinate system
My_BASE[2].
My_BASE[1] itself is located in $BASE.

436 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Line Description
26 … 28 The robot moves to the same coordinates as in lines 16 … 18,
but this time in the coordinate system
My_BASE[1]:My_BASE[2].
29 In My_BASE[2], move to the origin of the coordinate system
My_BASE[1].
My_BASE[2] itself is located in $BASE.
31 … 33 The robot moves to the same coordinates as in lines 16 … 18,
but this time in the coordinate system
My_BASE[2]:My_BASE[1].

11.13.3 Relational operators

Description Using relational operators, it is possible to form logical expressions. The result
of a comparison is always of type BOOL.

Operator Description Permissible data types


== equal to INT, REAL, CHAR, ENUM, BOOL
<> not equal to
> greater than INT, REAL, CHAR, ENUM
< less than
>= greater than or
equal to
<= less than or
equal to

 Operand combinations of INT, REAL and CHAR are permissible.


The comparison of numeric values (INT, REAL) and character values
(CHAR) is permissible because each ASCII character is assigned an
ASCII code. The code is a number.
 A BOOL type may only be compared with a BOOL type.
 An ENUM type may only be compared with the same ENUM type.

In the case of REAL values, the test for equality or inequality is of only
limited use: due to the limited number of places after the floating
point, rounding errors are possible. These can result in identical for-
mulae having different values.

Examples Multiple comparisons are also permissible:


...
DECL BOOL A, B
...
B= 10 < 3 ;B=FALSE
A = 10/3 == 3 ;A=TRUE
B = ((B == A) <> (10.00001 >= 10)) == TRUE ;B=TRUE
A = "F" < "Z" ;A=TRUE
...

Example of a comparison with an ENUM type:


DEF TEST()
ENUM color_typ orange, blue
DECL BOOL A
DECL color_typ KUKA_color, my_color
INI
KUKA_color = #orange

Issued: 14.01.2015 Version: KSS 8.3 SI V4 437 / 491


KUKA System Software 8.3

my_color = #orange
...
A = my_color == KUKA_color ;A=TRUE
END

11.13.4 Logic operators

Description Logic operators are used for performing logic operations on Boolean vari-
ables, constants and simple logic expressions, as are formed with the aid of
relational operators.

Operator Number of operands Description


NOT 1 Inversion
AND 2 Logic AND
OR 2 Logic OR
EXOR 2 Exclusive OR

The operands of a logic operation must be of type BOOL. The result is also
always of type BOOL.
The following table shows the results of the possible operations:

Operation NOT A A AND B A OR B A EXOR B


A = TRUE B = TRUE FALSE TRUE TRUE FALSE
A = TRUE B = FALSE FALSE FALSE TRUE TRUE
A = FALSE B = TRUE TRUE FALSE TRUE TRUE
A = FALSE B = FALSE TRUE FALSE FALSE FALSE

The table also applies to operations with bit operators.

Examples Multiple operations are also permissible.


...
DECL BOOL A,B,C
...
A = TRUE ;A=TRUE
B = NOT A ;B=FALSE
C = (A AND B)OR NOT (B EXOR NOT A) ;C=TRUE
A = NOT NOT C ;A=TRUE
...

11.13.5 Bit operators

Description Bit operators are used to link whole numbers by performing logic operations
on the individual bits of the whole numbers.
The results of the operations correspond to those of the logic operators.
 Bit value 1 corresponds to TRUE.
 Bit value 0 corresponds to FALSE.
Operator Number of operands Description
B_NOT 1 Bit-by-bit inversion
B_AND 2 Bit-by-bit ANDing
B_OR 2 Bit-by-bit ORing
B_EXOR 2 Bit-by-bit exclusive ORing

The bit operators can be applied to the data types INT and CHAR.

438 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

INT has 32 bits in KRL and has a sign. CHAR has 8 bits and does not have a
sign.

In order to be able to follow the results of bit operations, it is neces-


sary to bear in mind that the robot controller interprets signed binary
numbers as a twos complement. The most significant bit determines
whether the number is positive or negative. For this reason, all bits must be
taken into consideration.

In the following examples for B_AND, B_OR and B_EXOR with integer values,
the results are positive numbers (most significant bit = 0). The results can be
converted directly into the decimal system in the same way as unsigned val-
ues.
The 28 leading zeros of the operands are indicated by “0 0 […]”.

B_AND

Fig. 11-21: Example: Linking the integer values 5 and 12

B_OR

Fig. 11-22: Example: Linking the integer values 5 and 12

B_EXOR

Fig. 11-23: Example: Linking the integer values 5 and 12

B_NOT In this integer example, the operation results in a negative number (most sig-
nificant bit = 1). The result can thus not be converted to the decimal system in
the same way as an unsigned number.

In order for the user to be able to understand the decimal result of the
robot controller, it is necessary to be familiar with the rules for inter-
preting twos complement numbers. The rules are not dealt with in this
documentation.

Fig. 11-24: Example: B_NOT with integer value 10

Issued: 14.01.2015 Version: KSS 8.3 SI V4 439 / 491


KUKA System Software 8.3

The decimal result of a B_NOT operation on a signed operand can also be cal-
culated as follows:
1. Decimal value of the operand plus 1
2. Invert sign

Further examples ...


DECL INT A
...
A = 10 B_AND 9 ;A=8
A = 10 B_OR 9 ;A=11
A = 10 B_EXOR 9 ;A=3
A = B_NOT 197 ;A=-198
A = B_NOT 'HC5' ;A=-198
A = B_NOT 'B11000101' ;A=-198
A = B_NOT "E" ;A=154
...

Setting and checking bits:


B_AND and B_OR can be used to set individual bits of a bit sequence to 1 or
0. The other bits remain unchanged.
 B_AND can be used to set individual bits to 0.
 B_OR can be used to set individual bits to 1.
It is also possible to check whether individual bits are set to 1 or 0.
Example:
A digital output has a bit width of 8 bits. The output can be addressed via the
INT variable DIG.
Set bits 1, 2 and 6 to 0:
DIG = DIG B_AND 'B10111001'

Set bits 0, 2, 3 and 7 to 1:


DIG = DIG B_OR 'B10001101'

Check whether bits 0 and 7 are set to 1. If so, my_result is set to TRUE:
DECL BOOL my_result
...
my_result = DIG B_AND ('B10000001') == 'B10000001'

Check whether one of the two bits 0 or 7 is set to 1. If so, my_result is set to
TRUE:
DECL BOOL my_result
...
my_result = DIG B_AND ('B10000001') > 0

11.13.6 Priority of the operators

The priority specifies the order in which the operators are evaluated within a
statement.

Priority Operator
1 NOT; B_NOT
2 *; /
3 +; -
4 AND; B_AND

440 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Priority Operator
5 EXOR; B_EXOR
6 OR; B_OR
7 ==, <>; <, >, <=, >=

The following general rules apply:


 Bracketed expressions are processed first.
 Non-bracketed expressions are evaluated in accordance with their priority.
 Logic operations with operators of the same priority are evaluated from left
to right.

11.14 System functions

11.14.1 DELETE_BACKWARD_BUFFER()

Description DELETE_BACKWARD_BUFFER() can be used to prevent backward motion for


specific motions. The function deletes the recorded forward motions. If the
user attempts to perform backward motion, the robot controller generates the
following message: Backward motion not possible: no trace available.
The function can be used with all interpreters. It can also be used in the trigger.
The function triggers an advance run stop.
DELETE_BACKWARD_BUFFER() refers to backward motion using the Start
backwards key. It has no effect on other backward motion functionalities, e.g.
backward motion as part of fault strategies in technology packages.

Example 1 In the following example, it is still possible to start backward motion during the
motion from P4 to P5. At P5, it is no longer possible:
PTP P4
PTP P5
DELETE_BACKWARD_BUFFER()

If it is desirable for backward motion already to be no longer possible during


the motion from P4 to P5, this can be achieved by means of a trigger:
PTP P4
TRIGGER WHEN DISTANCE=0 DELAY=0 do DELETE_BACKWARD_BUFFER() PRIO=-1
PTP P5

Example 2 In the following example, the following actions are possible or not possible:

Action Possible?
Move backwards to P6 Yes
Move backwards to P5 No
Move backwards from P5 Yes

PTP P3
PTP P4
PTP P5
TRIGGER WHEN DISTANCE=0 DELAY=0 do DELETE_BACKWARD_BUFFER() PRIO=-1
PTP P6
PTP P7

If, for example, it is desirable for no backward motion to be possible after P3


has been left and before P6 has been reached, several triggers must be pro-
grammed:

Issued: 14.01.2015 Version: KSS 8.3 SI V4 441 / 491


KUKA System Software 8.3

PTP P3
TRIGGER WHEN DISTANCE=0 DELAY=0 do DELETE_BACKWARD_BUFFER() PRIO=-1
PTP P4
TRIGGER WHEN DISTANCE=0 DELAY=0 do DELETE_BACKWARD_BUFFER() PRIO=-1
PTP P5
TRIGGER WHEN DISTANCE=0 DELAY=0 do DELETE_BACKWARD_BUFFER() PRIO=-1
PTP P6
PTP P7

11.14.2 ROB_STOP() and ROB_STOP_RELEASE()

Description ROB_STOP() and ROB_STOP_RELEASE() can only be used in submit pro-


grams.
 ROB_STOP() stops the robot and prevents further motions. This affects all
possible motions, irrespective of whether they arise from program execu-
tion, manual jogging or command mode.
 ROB_STOP_RELEASE() cancels a blockade caused by ROB_STOP().
If ROB_STOP() is called several times in succession without a
ROB_STOP_RELEASE() in between, only the first call has any effect. The
subsequent calls have no effect, i.e. they do not trigger a stop or cause a mes-
sage to be generated.
If ROB_STOP_RELEASE() is called without ROB_STOP() being called first,
this has no effect.

Messages ROB_STOP() triggers the following status message: Robot stopped by submit
ROB_STOP_RELEASE() in a Test mode triggers the following acknowledge-
ment message: Ackn. Robot stopped by submit
ROB_STOP_RELEASE() in an Automatic mode triggers no message.

Syntax result = ROB_STOP (stop_type: IN)

Explanation of Element Description


the syntax result Type: BOOL
Variable for the return value. Return value:
 TRUE: The stop has been executed.
 FALSE: An invalid parameter has been transferred for
stop_type.
stop_type Type: ROB_STOP_T
Stop type to be used to stop the robot:
 #RAMP_DOWN: ramp stop
 #PATH_MAINTAINING: path-maintaining EMERGEN-
CY STOP
Other stop types are not possible.

ProConOS The “Robot stop” function can also be used from ProConOS. The following
functions are available for this:
 PLC_ROB_STOP()
The desired stop type is defined with PLC_ROB_STOP_RAMP_DOWN or
PLC_ROB_STOP_PATH_MAINT.
 PLC_ROB_STOP_RELEASE()
The effect is the same, irrespective of whether a stop is triggered by submit or
by ProConOS. ProConOS generates its own message texts; these are:

442 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

 Robot stopped by SoftPLC ({Name of the task calling it})


 Ackn. Robot stopped by SoftPLC
If a stop is requested by both submit and ProConOS, this is indicated in each
case by a status message. A maximum of 2 status messages can thus be dis-
played for an executed stop. In this case, robot motion cannot be resumed un-
til the blockade has been canceled by both submit and ProConOS.
If different stop types are requested by submit and ProConOS, the type actu-
ally carried out is generally the one that was requested first.
A stop triggered by ProConOS cannot be canceled by a submit program and
vice versa.

11.14.3 SET_BRAKE_DELAY()

Description The function SET_BRAKE_DELAY can be used to reduce the brake delay
with reference to an individual point.
SET_BRAKE_DELAY is intended for use at the end of a cycle. When the robot
stops there before the next cycle begins, SET_BRAKE_DELAY can be used
to make the brakes close earlier, thereby also causing the drives to be deac-
tivated sooner. Energy can be saved in this way.
Brake delay:
The brake delay is the time after which the brakes are applied when the robot
(or the external axis) has reached an exact positioning point. It is irrelevant
whether the exact positioning point was programmed as such, or whether it
just works out that way because approximate positioning cannot be carried
out.
If the robot stops at the point until the time has elapsed, e.g. at the end of the
program, the brakes are applied. If the robot resumes motion before the time
has elapsed, the brakes are not applied.
The generally applicable brake delay is defined in system variables.
SET_BRAKE_DELAY can be used to set a lower value for an individual point,
i.e. the brakes are applied earlier.
System variables for the generally applicable brake delay:
 $BRK_DEL_COM:
Brake delay for robot axes in command mode (= jogging) (default:
10,000 ms)
 $BRK_DEL_PRO:
Brake delay for robot axes in program mode (default: 20,000 ms)
 $BRK_DEL_EX:
Brake delay for external axes (default: 200 ms)
$BRK_DEL_EX only applies if the external axis mode is set
($BRK_MODE, bit 3 =1) and the external axis is not mathematically cou-
pled. Otherwise, the brakes of the external axis respond in the same way
as the robot axes and the corresponding delay times apply.

Further information about $BRK_MODE can be found in the docu-


mentation Configuration of Kinematic Systems.

Additional SET_BRAKE_DELAY triggers an advance run stop. The advance run stop ap-
characteristics plies separately for synchronous and asynchronous axes. For example, if a
synchronous axis is specified using axes_nr, the advance run stop applies for
all synchronous axes, but not for any asynchronous axis that may be present.
SET_BRAKE_DELAY can be processed by all interpreters.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 443 / 491


KUKA System Software 8.3

SET_BRAKE_DELAY only has an effect if the robot is at an exact positioning


point:
 SET_BRAKE_DELAY must come after the point in the program to which
it is to apply. Since it triggers an advance run stop, this point is automati-
cally an exact positioning point.
 If it is triggered by a trigger, it can only take effect if the trigger refers to the
end point and this is an exact positioning point.

Syntax result = SET_BRAKE_DELAY (axes_nr, delay)

Explanation of Element Description


the syntax result Type: INT
Variable for the return value. The bits indicate the axes for
which delay has been set.
 Bit n = 0: value was not set for this axis.
 Bit n = 1: value was set for this axis.
The return value does not indicate whether the brakes
were actually applied.
axes_nr Type: INT
Bit array for the axes for which delay is to be set.
 Bit n = 0: value is not set for this axis.
 Bit n = 1: value is set for this axis.
The value can be specified in the program as an integer or
using bit notation, e.g. “63” or “ 'B111111' ” for “all robot
axes”.
By default, the brakes of robot axes are applied simultane-
ously. In this case, the value applies to all robot axes,
including those that are not specified here.
If the brakes of external axes are applied simultaneously
(dependent on $BRK_MODE), the value applies to all
external axes, including those that are not specified here.
The brakes of master/slave axes are always applied simul-
taneously.
delay Type: INT, unit: ms
Desired delay. Range of values:
 0 … defined general brake delay
If a higher value is defined, it is limited internally to the
value of the relevant system variable: $BRK_DEL_COM,
$BRK_DEL_PRO or $BRK_DEL_EX
The value 0 is permissible. The actual closing time, how-
ever, is always at least as long as the time required
mechanically for the brake to close. This is just a few frac-
tions of a second. The exact value depends on the specific
axis.

Bit n 11 … 5 4 3 2 1 0
Axis E6 … A6 A5 A4 A3 A2 A1

$BRAKE_SIG The state of the brakes (open or closed) can be displayed by means of the sys-
tem variable $BRAKE_SIG.
(>>> "$BRAKE_SIG" Page 213)

444 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Example At the end of the following program, the brakes of the robot axes are to be ap-
plied as quickly as possible. For this reason, SET_BRAKE_DELAY(63, 0) has
been programmed after the last point.
1 DEF my_test()
2 DECL INT my_result
3 DECL INT brake_state
...
4 PTP HOME Vel= 100 % DEFAULT
5 PTP P1 ...
...
6 PTP HOME Vel= 100 % DEFAULT
7 my_result = SET_BRAKE_DELAY(63, 0)
8 brake_state = $BRAKE_SIG
9 END

Line Description
6 Last point in program
7 Here, the brake delay is set to 0 ms for all robot axes for the
point in line 6.
8 The monitoring reveals that the brakes are (still) open at this
point.
The reason for this is that the brakes cannot close in 0 ms;
they require a certain time to close for mechanical reasons.
Once this time has elapsed, the brakes are closed.

Negative example It is not generally helpful to use SET_BRAKE_DELAY during a cycle. There
are often no points at which the brakes are applied and where this operation
would need to be accelerated. On the contrary, the advance run stop triggered
by SET_BRAKE_DELAY would actually have a negative effect on the cycle
time.
1 DEF my_test()
2 DECL INT my_result
...
3 PTP HOME Vel= 100 % DEFAULT
4 PTP P1 C_DIS ...
5 my_result = SET_BRAKE_DELAY(63, 0)
6 ;WAIT SEC 0.5
7 PTP P2 ...
...

Line Description
5 Here, the brake delay is set to 0 ms for all robot axes for P1.
P1 is programmed with approximate positioning. Since
SET_BRAKE_DELAY triggers an advance run stop, the mo-
tion to P1 is carried out with exact positioning.
The brakes do not close at P1, however. The reason for this is
that the brakes would need the time mechanically required to
close. However, on reaching P1, the robot controller immedi-
ately starts the next motion. The brakes are thus not applied,
even though the delay is set to 0 ms.
6 By contrast, if this line were uncommented, the brakes would
close.
The robot controller would not immediately start the next mo-
tion on reaching P1, but stop at P1 for 0.5 s. This would allow
time for the brakes to be applied.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 445 / 491


KUKA System Software 8.3

11.14.4 VARSTATE()

Description VARSTATE() can be used to monitor the state of a variable.


VARSTATE() is a function with a return value of type VAR_STATE.
VAR_STATE is an enumeration type that is defined as follows in the system:
ENUM VAR_STATE DECLARED, INITIALIZED, UNKNOWN

VARSTATE is defined as follows in the system:


VAR_STATE VARSTATE(CHAR VAR_STR[80]:IN)

Example 1 DEF PROG1()


INT MYVAR
...
IF VARSTATE("MYVAR")==#UNKNOWN THEN
$OUT[11]=TRUE
ENDIF
...
IF VARSTATE("MYVAR")==#DECLARED THEN
$OUT[12]=TRUE
ENDIF
...
IF VARSTATE("ANYVAR")==#UNKNOWN THEN
$OUT[13]=TRUE
ENDIF
...
MYVAR=9
...
IF VARSTATE("MYVAR")==#DECLARED THEN
$OUT[14]=TRUE
ENDIF
...
IF VARSTATE("MYVAR")==#INITIALIZED THEN
$OUT[15]=TRUE
ENDIF
...
END

Explanation of the state monitoring:


 The first IF condition is false, as MYVAR has already been declared. Out-
put 11 is not set.
 The second IF condition is true, as MYVAR has been declared. Output 12
is set.
 The third IF condition is true, on the condition that there is also no variable
with the name ANYVAR in $CONFIG.DAT. Output 13 is set.
 The fourth IF condition is false, as MYVAR has not only been declared, but
has also already been initialized here. Output 14 is not set.
 The fifth IF condition is true, as MYVAR has been initialized. Output 15 is
set.

Example 2 DEF PROG2()


INT MYVAR
INT YOURVAR
DECL VAR_STATE STATUS
...
STATUS=VARSTATE("MYVAR")
UP()
...
STATUS=VARSTATE("YOURVAR")

446 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

UP()
...
END

DEF UP()
...
IF VARSTATE("STATUS")==#DECLARED THEN
$OUT[100]=TRUE
ENDIF
...
END

Explanation of the state monitoring:


In this example, the state is monitored indirectly, i.e. via an additional variable.
The additional variable must be of type VAR_STATE. The keyword DECL
must not be omitted in the declaration. The name of the additional variable
may be freely selected. In this example it is STATUS.

11.15 Editing string variables

Various functions are available for editing string variables. The functions can
be used in SRC files, in SUB files and in the variable correction function.
The functions can be used within IF branches without the return value being
explicitly assigned to a variable.

11.15.1 String variable length in the declaration

Description The function StrDeclLen() determines the length of a string variable ac-
cording to its declaration in the declaration section of a program.

Syntax Length = StrDeclLen(StrVar[])

Explanation of Element Description


the syntax Length Type: INT
Variable for the return value. Return value: Length of the
string variable as declared in the declaration section
StrVar[] Type: CHAR array
String variable whose length is to be determined
Since the string variable StrVar[ ] is an array of type CHAR,
individual characters and constants are not permissible for
length determination.

Example 1 CHAR ProName[24]


2 INT StrLength

3 StrLength = StrDeclLen(ProName)
4 StrLength = StrDeclLen($Trace.Name[ ])

Line Description
3 StrLength = 24
4 StrLength = 64

Issued: 14.01.2015 Version: KSS 8.3 SI V4 447 / 491


KUKA System Software 8.3

11.15.2 String variable length after initialization

Description The function StrLen() determines the length of the character string of a
string variable as defined in the initialization section of the program.

Syntax Length = StrLen(StrVar)

Explanation of Element Description


the syntax Length Type: INT
Variable for the return value. Return value: Number of char-
acters currently assigned to the string variable
StrVar Type: CHAR
Character string or variable whose length is to be deter-
mined

Example 1 CHAR PartA[50]


2 INT AB

3 PartA[] = "This is an example"
4 AB = StrLen(PartA[])

Line Description
4 AB = 18

11.15.3 Deleting the contents of a string variable

Description The function StrClear() deletes the contents of a string variable.

Syntax Result = StrClear(StrVar[])

Explanation of Element Description


the syntax Result Type: BOOL
Variable for the return value. Return value:
 The contents of the string variable have been deleted:
TRUE
 The contents of the string variable have not been delet-
ed: FALSE
StrVar[] Type: CHAR array
Variable whose character string is to be deleted

Example IF (NOT StrClear($Loop_Msg[])) THEN


HALT
ENDIF

The function can be used within IF branches without the return value being ex-
plicitly assigned to a variable. This applies to all functions for editing string vari-
ables.

11.15.4 Extending a string variable

Description The function StrAdd() can be used to expand a string variable with the con-
tents of another string variable.

Syntax Sum = StrAdd(StrDest[], StrToAdd[])

448 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Explanation of Element Description


the syntax Sum Type: INT
Variable for the return value. Return value: Sum of StrD-
est[ ] and StrToAdd[ ]
If the sum is longer than the previously defined length of
StrDest[ ], the return value is 0. This is also the case if the
sum is greater than 470 characters.
StrDest[] Type: CHAR array
The string variable to be extended
Since the string variable StrDest[ ] is an array of type
CHAR, individual characters and constants are not permis-
sible.
StrToAdd[] Type: CHAR array
The character string by which the variable is to be
extended

Example 1 DECL CHAR A[50], B[50]


2 INT AB, AC

3 A[] = "This is an "
4 B[] = "example"
5 AB = StrAdd(A[],B[])

Line Description
5 A[ ] = “This is an example”
AB = 18

11.15.5 Searching a string variable

Description The function StrFind() can be used to search a string variable for a charac-
ter string.

Syntax Result = StrFind(StartAt, StrVar[], StrFind[], CaseSens)

Explanation of Element Description


the syntax Result Type: INT
Variable for the return value. Return value: Position of the
first character found. If no character is found, the return
value is 0.
StartAt Type: INT
The search is started from this position.
StrVar[] Type: CHAR array
The string variable to be searched
StrFind[] Type: CHAR array
The character string that is being looked for.
CaseSens  #CASE_SENS: Upper and lower case are taken into
consideration.
 #NOT_CASE_SENS: Upper and lower case are ig-
nored.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 449 / 491


KUKA System Software 8.3

Example 1 DECL CHAR A[5]


2 INT B
3 A[]="ABCDE"
4 B = StrFind(1, A[], "AC", #CASE_SENS)
5 B = StrFind(1, A[], "a", #NOT_CASE_SENS)
6 B = StrFind(1, A[], "BC", #Case_Sens)
7 B = StrFind(1, A[], "bc", #NOT_CASE_SENS)

Line Description
4 B=0
5 B=1
6 B=2
7 B=2

11.15.6 Comparing the contents of string variables

Description The function StrComp() can be used to compare two string variables.

Syntax Comp = StrComp(StrComp1[], StrComp2[], CaseSens)

Explanation of Element Description


the syntax Comp Type: BOOL
Variable for the return value. Return value:
 The character strings match: TRUE
 The character strings do not match: FALSE
StrComp1[] Type: CHAR array
String variable that is compared with StrComp2[].
StrComp2[] Type: CHAR array
String variable that is compared with StrComp1[].
CaseSens  #CASE_SENS: Upper and lower case are taken into
consideration.
 #NOT_CASE_SENS: Upper and lower case are ig-
nored.

Example 1 DECL CHAR A[5]


2 BOOL B
3 A[]="ABCDE"
4 B = StrComp(A[], "ABCDE", #CASE_SENS)
5 B = StrComp(A[], "abcde", #NOT_CASE_SENS)
6 B = StrComp(A[], "abcd", #NOT_CASE_SENS)
7 B = StrComp(A[], "acbde", #NOT_CASE_SENS)

Line Description
4 B = TRUE
5 B = TRUE
6 B = FALSE
7 B = FALSE

11.15.7 Copying a string variable

Description The function StrCopy() can be used to copy the contents of a string variable
to another string variable.

450 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


11 Programming for user group “Expert”...

Syntax Copy = StrCopy(StrDest[], StrSource[])

Explanation of Element Description


the syntax Copy Type: BOOL
Variable for the return value. Return value:
 The string variable was copied successfully: TRUE
 The string variable was not copied: FALSE
StrDest[] Type: CHAR array
The character string is copied to this string variable.
Since StrDest[ ] is an array of type CHAR, individual char-
acters and constants are not permissible.
StrSource[] Type: CHAR array
The contents of this string variable are copied.

Example 1 DECL CHAR A[25], B[25]


2 DECL BOOL C
3 A[] = ""
4 B[] = "Example"
5 C = StrCopy(A[], B[])

Line Description
5 A[ ] = “Example”
C = TRUE

Issued: 14.01.2015 Version: KSS 8.3 SI V4 451 / 491


KUKA System Software 8.3

452 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


12 Submit interpreter

12
2
Submit interpreter

12.1
t
Function of the Submit interpreter

Function 2 tasks run in parallel on the robot controller:


t

 Robot interpreter
The motion program runs in the robot interpreter.
 Submit interpreter
A SUB program runs in the submit interpreter.
A SUB program can perform operator control or monitoring tasks. Exam-
ples: monitoring of safety equipment; monitoring of a cooling circuit.
This means that no PLC is required for smaller applications, as the robot
controller can perform such tasks by itself.
The Submit interpreter starts automatically when the robot controller is
switched on. The program SPS.SUB is started.
The submit interpreter can be stopped or deselected manually and can also
be restarted.
SUB programs are always files with the extension *.SUB. The program
SPS.SUB can be edited and further SUB programs can be created.

The submit interpreter must not be used for time-critical


applications! A PLC must be used in such cases. Rea-
sons:
 The submit interpreter shares system resources with the robot interpret-
er, which has the higher priority. The submit interpreter is thus not exe-
cuted at the robot controller’s interpolation cycle rate of 12 ms.
Furthermore, the runtime of the submit interpreter is irregular.
 The runtime of the submit interpreter is influenced by the number of lines
in the SUB program. Even comment lines and blank lines have an effect.

If a system file, e.g. $config.dat or $custom.dat, is modified in such a


way that errors are introduced, the Submit interpreter is automatically
deselected. Once the error in the system file has been rectified, the
Submit interpreter must be reselected manually.

Display The program SPS.SUB is located in the directory R1\System. This directory is
visible in the user group Expert or higher.
In the Navigator, SUB programs are indicated by the following symbol:

In user group Expert or higher, the file extension sub is displayed in addition.
By default, the execution of a selected SUB program is not displayed. This can
be changed using the system variable $INTERPRETER. The SUB program
can only be displayed, however, if a motion program is selected at the same
time.

$INTERPRETER Description
1 The selected motion program is displayed in the
editor. (Default)
0 The selected SUB program is displayed in the ed-
itor.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 453 / 491


KUKA System Software 8.3

12.2 Manually stopping or deselecting the Submit interpreter

Precondition  User group "Expert".


 Operating mode T1 or T2.

Procedure  In the main menu, select Configuration > SUBMIT interpreter > Stop or
Deselect.

Alternative  In the status bar, touch the Submit interpreter status indicator. A window
procedure opens.
Select Stop or Deselect.

Description
Command Description
Stop The submit interpreter is stopped. When it is restarted, the
SUB program is resumed at the point at which it was
stopped.
Deselect The submit interpreter is deselected.

Once the submit interpreter has been stopped or deselected, the correspond-
ing icon in the status bar is red or gray.

Symbol Color Description


rot The submit interpreter has been stopped.

grau The submit interpreter is deselected.

12.3 Manually starting the Submit interpreter

Precondition  User group “Expert”


 Operating mode T1 or T2
 Submit interpreter has been stopped or deselected.

Procedure  In the main menu, select Configuration > SUBMIT interpreter > Select/
Start.

Alternative  In the status bar, touch the Submit interpreter status indicator. A window
procedure opens.
Select Select/Start.

Description If the submit interpreter is deselected, the command Start/Select selects the
program SPS.SUB.
If the submit interpreter has been stopped, the command Start/Select re-
sumes the selected program at the point at which it was stopped.
Once the submit interpreter has been started, the corresponding icon in the
status bar is green.

454 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


12 Submit interpreter

Icon Color Description


Yellow The submit interpreter is selected. The
block pointer is situated on the first line of
the selected SUB program.

Green A SUB program is selected and running.

12.4 Editing the program SPS.SUB

Description The following folds are available for user-defined adaptations in the program
SPS.SUB:
 USER INIT
 USER PLC
Other parts of the SPS.SUB program must not be modified by the user.

If other parts of SPS.SUB are changed, this can affect the functional-
ity of technology packages.

Precondition  The program SPS.SUB is not selected or has been stopped.


 User group “Expert”

Procedure 1. Select the program SPS.SUB in the Navigator and press Open.
2. Enter the changes:
 Enter initializations in the USER INIT fold. This fold is located in the INI
fold.
USER INIT
; Please insert user defined initialization commands

 Enter all other changes in the USER PLC fold.


USER PLC
; Make your modifications here

3. Close the program. Respond to the request for confirmation asking wheth-
er the changes should be saved by pressing Yes.
4. The program SPS.SUB can now be started via the main menu with Con-
figuration > SUBMIT interpreter > Select/Start.

SPS.SUB Structure of the program SPS.SUB:


1 DEF SPS ( )
2 DECLARATIONS
3 INI
4
5 LOOP
6 WAIT FOR NOT($POWER_FAIL)
7 TORQUE_MONITORING()
8
9 ATB PLC LOOP
10 USER PLC
11 ENDLOOP

Issued: 14.01.2015 Version: KSS 8.3 SI V4 455 / 491


KUKA System Software 8.3

Line Description
3 INI fold
This fold contains the USER INIT fold: here the user can enter
statements which are to be executed only once after booting.
5 … 10 LOOP statement. For programs that are to run continuously in
the background.
9 Some software options insert folds into the program
SPS.SUB. Example: KUKA.ArcTech Basic inserts the fold
ATB PLC LOOP.
The folds that are actually present depend on what options are
installed on the robot controllers.
10 USER PLC: Here the user can enter instructions that are to be
executed in the LOOP.

12.5 Creating a new SUB program

Precondition  “Expert” user group

Procedure 1. In the file list, select the folder in which the program is to be created. (Not
all folders allow the creation of programs within them.)
2. Press the New button.
The Template selection window is opened.
3. Select the template Submit or Expert Submit and confirm with OK.
4. Enter a name for the program and confirm it with OK.

Description “Submit” template:


The Submit template generates a SUB file with the following structure:
1 DECLARATIONS
2 INI
3
4 LOOP
5 USER PLC
6 ENDLOOP
7 USER SUBROUTINE

Line Description
1 Declaration section
2 Initialization section. For statements that are only to be execut-
ed once after the system has booted.
4, 5, 6 LOOP statement containing the Fold USER PLC.
USER PLC is for programs that are to run continuously in the
background.
7 For user-specific subroutines

“Expert Submit” template:


The Expert Submit template generates an empty SUB file. With this template,
everything has to be programmed by the user.

Use a LOOP statement when programming. SUB programs without a


LOOP statement are only executed once by the Submit interpreter. It
is then automatically deselected.

456 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


12 Submit interpreter

12.6 Programming

KRL code Almost all KRL instructions can be used in a SUB program. The following
statements are not possible, however:
 Instructions for robot motions
Robot motions can only be interpreted by the robot interpreter. For this
reason, SRC programs containing motion commands cannot be called as
subprograms from a SUB program.
 Instructions referring to robot motions
These include BRAKE and all TRIGGER statements.
Motion commands for external axes can be used in a SUB program. Example:
IF (($IN[12] == TRUE) AND ( NOT $IN[13] == TRUE)) THEN
ASYPTP {E2 45}
ASYPTP {E3 200}
...
IF ((NOT $IN[12] == TRUE) AND ($IN[13] == TRUE)) THEN
ASYPTP {E2 0}
ASYPTP {E3 90}

External axes E2 and E3 are moved in accordance with specific inputs.


WAIT statements or wait loops have not been used here as they stop the cy-
cle.

System variables The Submit interpreter has read-access to all system variables and write-ac-
cess to many of them. Access works even if the system variables are being
used in parallel by a motion program.
If a system variable to which the Submit interpreter does not have write-access
is modified in a SUB program, an error message is generated when the pro-
gram is started and the Submit interpreter stops.
System variables that are frequently required in SUB programs:

$MODE_OP = Value
Value Description
#T1 Robot controller is in T1 mode.
#T2 Robot controller is in T2 mode.
#AUT Robot controller is in Automatic mode.
#EX Robot controller is in Automatic External mode.
#INVALID Robot controller has no defined state.

$OV_PRO = Value
Element Data type Description
Value (%) INT Program override value

Example:
If the programmed velocity is not reached, output 2 is set to FALSE.

IF (($MODE_OP == #T1) OR ($OV_PRO < 100)) THEN
$OUT[2] = FALSE
ENDIF

Issued: 14.01.2015 Version: KSS 8.3 SI V4 457 / 491


KUKA System Software 8.3

In the test modes, $OV_PRO must not be written to by


the Submit interpreter, because the change may be un-
expected for operators working on the industrial robot. Death, injuries or
damage to property may result.

If possible, do not modify safety-relevant signals and


variables (e.g. operating mode, EMERGENCY STOP,
safety gate contact) via the Submit interpreter.
If modifications are nonetheless required, all safety-relevant signals and vari-
ables must be linked in such a way that they cannot be set to a dangerous
state by the submit interpreter or PLC.

Inputs/outputs The Submit interpreter can access the inputs and outputs of the robot control-
ler.

No check is made to see if the robot interpreter and Sub-


mit interpreter are accessing the same output simultane-
ously, as this may even be desired in certain cases.
The user must therefore carefully check the assignment of the outputs. Oth-
erwise, unexpected output signals may be generated, e.g. in safety equip-
ment. Death, serious injuries or major damage to property may result.

Subprograms Other programs can be called as subprograms in a SUB program. The follow-
ing are possible:
 Other SUB programs
 SRC programs without statements for robot motions
Example:
CELL.SRC can be called from the program SPS.SUB with a CWRITE state-
ment and RUN. The call only takes effect in the case of a cold start.

Fig. 12-1: SPS.SUB selects CELL.SRC in the robot interpreter

Further information about the program CELL.SRC can be found in


this documentation.
(>>> 6.17.1 "Configuring CELL.SRC" Page 190)
Further information about CWRITE statements can be found in the Expert
documentation CREAD/CWRITE.

458 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


12 Submit interpreter

Communication The flags of the robot controller can be used to enable the exchange of binary
information between a running motion program and a SUB program. A flag is
set by the submit interpreter and read by the robot interpreter.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 459 / 491


KUKA System Software 8.3

460 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


13 Diagnosis

13 Diagnosis

13.1
s
Logbook
s

13.1.1 Displaying the logbook

The operator actions on the smartPAD are automatically logged.

Procedure  In the main menu, select Diagnosis > Logbook > Display.
The following tabs are available:
 Log (>>> 13.1.2 "“Log” tab" Page 461)
 Filter (>>> 13.1.3 "“Filter” tab" Page 462)

13.1.2 “Log” tab

Fig. 13-1: Logbook, Log tab

Issued: 14.01.2015 Version: KSS 8.3 SI V4 461 / 491


KUKA System Software 8.3

Item Description
1 Type of log event

Example : Filter type "Note" + filter class "System" = note


originated by the kernel system of the robot.
The individual filter types and filter classes are listed on the Filter
tab.
2 Log event number
3 Date and time of the log event
4 Brief description of the log event
5 Detailed description of the selected log event
6 Indication of the active filter

The following buttons are available:

Button Description
Export Exports the log data as a text file.
(>>> 13.1.4 "Configuring the logbook"
Page 463)
Update Refreshes the log display.

13.1.3 “Filter” tab

The Filter tab is only displayed if the log User-defined has been selected.

462 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


13 Diagnosis

Fig. 13-2: Logbook, Filter tab

13.1.4 Configuring the logbook

Precondition  “Expert” user group

Procedure 1. In the main menu, select Diagnosis > Logbook > Configuration. A win-
dow opens.
2. Make the desired settings.
3. Press OK to save the configuration and close the window.

Description

Fig. 13-3: Logbook configuration window

Issued: 14.01.2015 Version: KSS 8.3 SI V4 463 / 491


KUKA System Software 8.3

Item Description
1  Check box active: the log events selected with the filter are
saved in the text file.
 Check box not active: all log events are saved in the text file.
2 Enter the path and name of the text file.
Default path: C:\KRC\ROBOTER\LOG\LOGBUCH.TXT
3  Check box active: log data deleted because of a buffer over-
flow are indicated in gray in the text file.
 Check box not active: log data deleted because of a buffer
overflow are not indicated in the text file.

13.2 Displaying the caller stack

This function displays the data for the process pointer ($PRO_IP).

Precondition  User group "Expert"


 Program is selected.

Procedure  In the main menu, select Diagnosis > Caller stack.

Description

Fig. 13-4: Caller Stack window

Item Description
1  None: Call not initiated by interrupt
 [No.]: Call initiated by interrupt with the number [No.]
2 This file contains the call.
3 The program line with this number contains the call.
Preconditions in the program for the correct line to be determined
using the number:
 Detail view (ASCII mode) is activated.
 All Point PLCs are open.
4 Source line
5 Detailed information about the entry selected in the list

464 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


13 Diagnosis

13.3 Displaying interrupts

Precondition  “Expert” user group

Procedure  In the main menu, select Diagnosis > Interrupts.

Description

Fig. 13-5: Interrupts

Item Description
1 Status of the interrupt

 Interrupt ON or ENABLE

 Interrupt DISABLE

 Interrupt OFF or not activated


2 Number/priority of the interrupt
3 Validity range of the interrupt: global or local
4 Type of interrupt, dependent on the defined event in the interrupt
declaration
 Standard: e.g. $IN[...]
 Error stop: $STOPMESS
 EMERGENCY STOP: $ALARM_STOP
 Measurement (Fast Measurement): $MEAS_PULSE[1…5]
 Trigger: Trigger subprogram
5 Module and program line of the interrupt declaration

The following buttons are available:

Button Description
Submit/ Toggles between the displays for robot interrupts and
Submit interrupts.
Robot
Refresh Refreshes the display.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 465 / 491


KUKA System Software 8.3

13.4 Displaying diagnostic data about the kernel system

Description The menu item Diagnostic monitor makes it possible to display a wide range
of diagnostic data concerning numerous software sub-areas of the kernel sys-
tem.
Examples:
 Area Kcp3 driver (= driver for the smartPAD)
 Network driver
The data displayed depend on the selected area. The display includes states,
fault counters, message counters, etc.

Procedure 1. In the main menu, select Diagnosis > Diagnostic monitor.


2. Select an area in the Module box.
Diagnostic data are displayed for the selected area.

13.5 Automatically compressing data for error analysis (KrcDiag)

Description If it is necessary for an error to be analyzed by KUKA Roboter GmbH, this pro-
cedure can be used to compress the data for sending to KUKA. The procedure
generates a ZIP file in the directory C:\KUKA\KRCDiag. This contains the data
required by KUKA Roboter GmbH to analyze an error (including information
about system resources, screenshots, and much more).

Preparation A screenshot of the current view of the smartHMI is automatically generated


for the data packet.
 For this reason, display error-relevant information on the smartHMI if pos-
sible before starting the operation, e.g. expand the message window or
display the logbook.
What information is useful here depends on the specific circumstances.

Procedure via  In the main menu, select Diagnosis > KrcDiag.


“Diagnosis” The data are compressed. Progress is displayed in a window. Once the
operation has been completed, this is also indicated in the window. The
window is then automatically hidden again.

Procedure via This procedure uses keys on the smartPAD instead of menu items. It can thus
smartPAD also be used if the smartHMI is not available, due to Windows problems for ex-
ample.
Precondition:
 The smartPAD is connected to the robot controller.
 The robot controller is switched on.

The keys must be pressed within 2 seconds. Whether or not the main
menu and keypad are displayed in the smartHMI is irrelevant.

1. Press the “Main menu” key and hold it down.


2. Press the keypad key twice.
3. Release the “Main menu” key.
The data are compressed. Progress is displayed in a window. Once the
operation has been completed, this is also indicated in the window. The
window is then automatically hidden again.

Procedure via Alternatively, the data can also be compressed via File > Archive > [...]. In this
“Archive” way, the data can be stored on a USB stick or network path.
(>>> 7.10 "Archiving and restoring data" Page 247)

466 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


14 Installation

14
4
Installation
s

The robot controller is supplied with a Windows operating system and an op-
erational version of the KUKA System Software (KSS). Therefore, no installa-
t
tion is required during initial start-up.
Installation becomes necessary, for example, in the event of the hard drive be-
ing damaged and exchanged.

The robot controller may only be operated using the software provid-
ed with the controller by KUKA.
KUKA Roboter GmbH must be consulted if different software is to be
used. (>>> 15 "KUKA Service" Page 475)

14.1 System requirements

KSS 8.3 can be run on the following robot controller:


 KR C4
 with Windows Embedded Standard 7 V4.x
 and with 2 GB RAM

14.2 Installing Windows and the KUKA System Software (KSS) (from image)

Description There are several variants for loading and finalizing the image. The most com-
monly required procedure is described here. The procedure also illustrates the
step in which a master image can be created if required.

Information about the other variants and related issues is contained


in the following documentation:
KUKA.RecoveryUSB 2.0 documentation: information about the
creation and restoration of images, configuration of the stick, and the
possible modes
 WES7 System Preparation expert documentation: information about fi-
nalizing and creating master images

Precondition  Bootable KUKA USB stick with KUKA.RecoveryUSB 2.0 software and an
image
 The stick has been configured with “Silent” mode active.
 2 GB RAM
 The robot controller is switched off.

We strongly recommend installing the desired software options (e.g.


technology packages) before Finalize Installation is started by se-
lecting Execute. The procedure below follows this approach.
During the finalizing process, the projects of the robot controller are rebuilt on
the basis of the active project. Only the options already installed by this point
are later included in all projects (active project, initial project and base proj-
ect).

The LEDs on the CSP provide information about the installation sta-
tus. Information about the LEDs is contained in the KUKA.Recovery-
USB documentation.

Procedure 1. Connect the USB stick to the robot controller.


2. Switch on the robot controller. The installation starts automatically.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 467 / 491


KUKA System Software 8.3

Observe the LEDs on the CSP! Initially, there is no image displayed on the
smartPAD.
3. Once the LEDs indicate that the Windows installation has been completed,
remove the stick.
 Following installation of Windows, the robot controller automatically re-
boots.
 After this, the robot controller automatically reboots again a second
time. (By now, at the latest, the stick must have been removed.)
4. The dialog Finalize Installation is displayed.

Fig. 14-1: Finalize Installation dialog box

5. Click on Cancel in the Finalize Installation dialog box.


A message informs the user that the dialog box will appear again the next
time the system is started.

Fig. 14-2: Message after Cancel

6. Confirm the message with OK.


7. Install the desired software options.
If required, the robot controller can be rebooted between the individual in-
stallations. Following each start, the Finalize Installation dialog box must
then again be answered with Cancel.
8. Once the last software option has been installed, reboot the robot control-
ler.
9. Now select Execute in response to the Finalize Installation dialog box.
A message informs the user that the system preparation will now be start-
ed.

468 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


14 Installation

Fig. 14-3: Message after Execute

10. Confirm the message with OK.

If a master image is to be created: Do not yet plug in a USB stick. Plug


in the stick only after the second shutdown – as described below.

The Generalize Phase is executed. After this, the robot controller reboots
automatically and then shuts down automatically.
After the shutdown:
 If a master image is to be created: Continue with step 11.
 If not: Continue with step 12.
11. Only execute this step (step 11) if a master image is to be created.
a. Plug in the USB Recovery Stick.

The configuration of the stick must now be such that an image can be
created!

b. Reboot the robot controller.


c. Create the image.
In GUI mode, the image must be created via the user interface. In Si-
lent mode, image creation starts automatically.
Once the image has been created, the robot controller shuts down au-
tomatically.
d. Once the robot controller has shut down: Remove the USB stick.
12. Now reboot the robot controller.
The Specialize Phase is executed. This causes the robot controller to au-
tomatically reboot twice.
13. Now Mini-Setup starts:
Select the desired language. Confirm with Next.
14. Information about the installation and copyright is displayed. Confirm with
Next.
15. Specify whether the robot controller is an OPS (Offline Programming Sys-
tem), also called “Office PC”. This is generally not the case, i.e. do not ac-
tivate check box. Confirm with Next.
16. The system suggests a robot type. Confirm with Next.
Or: If the suggested type does not correspond to the type that is being
used, select a different type. Then confirm with Next.
17. A summary of the setup settings is displayed. Confirm with Next.
The Initial Project Setup phase is executed. (This phase is short.)
The robot controller then shuts down automatically.
The robot controller can now be restarted in order to load the active project in
WorkVisual and configure it.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 469 / 491


KUKA System Software 8.3

The project contains the KR 210 robot by default. Make sure to re-
move the robot from the tree structure in WorkVisual and insert the
robot actually being used.
This exchange must also be performed if the robot actually being used is al-
ready the KR 210.

Once the project has been configured in WorkVisual, it can again be trans-
ferred to the robot controller.
If necessary, the computer name can now be changed.
(>>> 14.3 "Changing the computer name" Page 470)

14.3 Changing the computer name

Description KUKA.RecoveryUSB assigns a new computer name whenever an image is re-


stored. The name can be changed at any point after the finalizing process.

Precondition  User group “Expert”


 Operating mode T1 or T2.
 No program is selected.

Procedure 1. In the main menu, select Start-up > Additional software.


The Installed additional software window is opened.
2. Press the New software button.
The Selection window is opened.
3. Press the Configure button.
The Configure installation paths window is opened.
4. Select a line in the Installation paths for options area.
Note: If the line already contains a path, this path will be overwritten.
5. Press Path selection. The available drives are displayed.
6. Navigate to C:\KUKA and mark the WES7RenameComputer folder there.
7. Press Save. The Configure installation paths window is again dis-
played. It now contains the new path.
8. Mark the line with the new path and again press Save.
The Selection window is again displayed.
9. Mark the WES7RenameComputer entry.
10. Press Install. Answer the request for confirmation with Yes.
11. The W7RenCom window and a popup keyboard are displayed.
12. Enter the desired name and press the Set Computername button to con-
firm.
13. The following message is displayed: To finish the name setting you need to
reboot the PC.
Confirm the message with OK.
14. Reboot the robot controller.

14.4 Installing additional software

This function can be used to install additional software, e.g. technology pack-
ages. New programs and updates can be installed. The software is installed
from a USB stick. Alternatively, it can also be installed via a network path.
The system checks whether the additional software is relevant for the KSS. If
not, the system rejects the installation. If a software package that the system
has rejected is nonetheless to be installed, KUKA Roboter GmbH must be
contacted.

470 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


14 Installation

Precondition  “Expert” user group


 T1 or T2 mode
 No program is selected.
 USB stick with the software to be installed

We recommend using a KUKA USB stick. Data may be


lost if a stick from a different manufacturer is used.

Procedure 1. Connect the USB stick to the robot controller or smartPAD.


2. In the main menu, select Start-up > Additional software.
3. Press New software: The new software must be displayed in the Name
column and drive E:\ or K:\ in the Path column.
If not, press Refresh.
4. If the specified entries are now displayed, continue with step 5.
If not, the path from which the software is to be installed must be config-
ured first:
a. Press the Configure button.
b. Select a line in the Installation paths for options area.
Note: If the line already contains a path, this path will be overwritten.
c. Press Path selection. The available drives are displayed.
d. If the stick is connected to the robot controller: On E:\, select the level
at which the software is located. This can be E:\ directly or a sublevel.
If the stick is connected to the smartPAD: K:\ instead of E:\
e. Press Save. The Installation paths for options area is displayed
again. It now contains the new path.
f. Mark the line with the new path and again press Save.
5. Select the new software and press Install. Answer the request for confir-
mation with Yes.
6. Confirm the reboot prompt with OK.
7. Remove the stick.
8. Reboot the robot controller.

Description The following buttons are available:

Button Description
New software All programs available for installation are dis-
played.
Back Additional software already installed is displayed.
Refresh Refreshes the display, e.g. after a USB stick has
been connected.
Install Displays additional buttons:
 Yes: the selected software is installed. If it is
necessary to reboot the controller, this is indi-
cated by a message.
 No: the software is not installed.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 471 / 491


KUKA System Software 8.3

Button Description
Configure This button is only displayed if New software has
been pressed.
Paths for the installation of additional software or
KSS updates can be selected and saved here.
Displays additional buttons:
 Path selection: a new path can be selected.
 Save: saves the displayed paths.
Uninstall Displays additional buttons:
 Yes: the selected software is uninstalled.
 No: the software is not uninstalled.

14.5 KSS update

Description This function can be used to install KSS updates, e.g. from KSS 8.3.0 to KSS
8.3.1.
Following installation or update of the KUKA System Software, the robot con-
troller always performs an initial cold start.
It is advisable to archive all relevant data before updating a software package.
If necessary, the old version can be restored in this way. It is also advisable to
archive the new version after carrying out the update.

Do not use this function to install a new version, e.g. from KSS 8.2 to
KSS 8.3. Nor may this function be used to install a variant, e.g. from
KSS 8.3 to KSS 8.3 sr. KUKA Roboter GmbH must be consulted be-
fore a new version or variant is installed.
This function cannot be used to install updates of additional software, such
as technology packages.

Overview There are 2 ways of installing a KSS update:


 From USB memory stick
(>>> 14.5.1 "Update from USB stick" Page 472)
 From the network
(>>> 14.5.2 "Update from the network" Page 473)

14.5.1 Update from USB stick

A non-bootable USB stick must be used.


We recommend using a non-bootable KUKA stick. Data
may be lost if a stick from a different manufacturer is used.

Precondition  “Expert” user group


 T1 or T2 mode
 No program is selected.
 USB stick with the software to be installed

Procedure 1. Plug in USB stick.


2. In the main menu, select Start-up > Software update > Automatic.
3. A request for confirmation is displayed, asking if the update should be car-
ried out. Confirm by pressing Yes.

472 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


14 Installation

The following message is now displayed in the message window: To com-


plete software update, please REBOOT computer!
4. Select Shutdown in the main menu and then the option Reboot control
PC (Reload files is not necessary).
5. Confirm the request for confirmation with Yes. The robot controller is re-
booted and performs the update.
The robot controller then reboots again.
6. Once the robot controller has rebooted for the second time, the USB stick
can be removed.
The updated System Software is now available.

14.5.2 Update from the network

Description In the case of an update from the network, the installation data are copied to
the local drive D:\. If there is already a copy of a system software version pres-
ent on D:\, that copy will now be overwritten.
Installation is started on completion of the copying operation.

Precondition For the preparation:


 No program is selected.
 T1 or T2 operating mode
 “Expert” user group
For the procedure:
 No program is selected.
 T1 or T2 operating mode

Preparation Configure the network path from which the update installation is to be carried
out:
1. In the main menu, select Start-up > Additional software.
2. Press New software.
3. Press Configure.
4. Select the Installation path for KRC update via the network box. Press
Path selection.
5. Select the desired network path (= the directory in which the Setup.exe file
is located). Press Save.
6. The selected path is now displayed in the Installation path for KRC up-
date via the network box.
Press Save again.
7. Close the window.

It is only necessary to configure the network path once. It remains


saved for subsequent updates.

Procedure 1. In the main menu, select Start-up > Software update > Net.
2. A request for confirmation is displayed, asking if the update should be car-
ried out. Confirm by pressing Yes.
Depending on the network utilization, the procedure may take up to
15 min.
3. A message is displayed, indicating that a cold start will be forced next time
the system is booted. Switch the controller off.
4. Wait until the computer has shut down completely. Then switch the con-
troller back on.

Issued: 14.01.2015 Version: KSS 8.3 SI V4 473 / 491


KUKA System Software 8.3

5. Once the update has been completed, the computer is automatically shut
down and rebooted.

474 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


15 KUKA Service

15 KUKA Service
A

15.1 Requesting support


v

Introduction This documentation provides information on operation and operator control,


and provides assistance with troubleshooting. For further assistance, please
contact your local KUKA subsidiary.

Information The following information is required for processing a support request:


 Description of the problem, including information about the duration and
frequency of the fault
 As comprehensive information as possible about the hardware and soft-
ware components of the overall system
The following list gives an indication of the information which is relevant in
many cases:
 Model and serial number of the kinematic system, e.g. the manipulator
 Model and serial number of the controller
 Model and serial number of the energy supply system
 Designation and version of the system software
 Designations and versions of other software components or modifica-
tions
 Diagnostic package KrcDiag:
Additionally for KUKA Sunrise: Existing projects including applications
For versions of KUKA System Software older than V8: Archive of the
software (KrcDiag is not yet available here.)
 Application used
 External axes used

15.2 KUKA Customer Support

Availability KUKA Customer Support is available in many countries. Please do not hesi-
tate to contact us if you have any questions.

Argentina Ruben Costantini S.A. (Agency)


Luis Angel Huergo 13 20
Parque Industrial
2400 San Francisco (CBA)
Argentina
Tel. +54 3564 421033
Fax +54 3564 428877
[email protected]

Australia KUKA Robotics Australia Pty Ltd


45 Fennell Street
Port Melbourne VIC 3207
Australia
Tel. +61 3 9939 9656
[email protected]
www.kuka-robotics.com.au

Issued: 14.01.2015 Version: KSS 8.3 SI V4 475 / 491


KUKA System Software 8.3

Belgium KUKA Automatisering + Robots N.V.


Centrum Zuid 1031
3530 Houthalen
Belgium
Tel. +32 11 516160
Fax +32 11 526794
[email protected]
www.kuka.be

Brazil KUKA Roboter do Brasil Ltda.


Travessa Claudio Armando, nº 171
Bloco 5 - Galpões 51/52
Bairro Assunção
CEP 09861-7630 São Bernardo do Campo - SP
Brazil
Tel. +55 11 4942-8299
Fax +55 11 2201-7883
[email protected]
www.kuka-roboter.com.br

Chile Robotec S.A. (Agency)


Santiago de Chile
Chile
Tel. +56 2 331-5951
Fax +56 2 331-5952
[email protected]
www.robotec.cl

China KUKA Robotics China Co., Ltd.


No. 889 Kungang Road
Xiaokunshan Town
Songjiang District
201614 Shanghai
P. R. China
Tel. +86 21 5707 2688
Fax +86 21 5707 2603
[email protected]
www.kuka-robotics.com

Germany KUKA Roboter GmbH


Zugspitzstr. 140
86165 Augsburg
Germany
Tel. +49 821 797-4000
Fax +49 821 797-1616
[email protected]
www.kuka-roboter.de

476 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


15 KUKA Service

France KUKA Automatisme + Robotique SAS


Techvallée
6, Avenue du Parc
91140 Villebon S/Yvette
France
Tel. +33 1 6931660-0
Fax +33 1 6931660-1
[email protected]
www.kuka.fr

India KUKA Robotics India Pvt. Ltd.


Office Number-7, German Centre,
Level 12, Building No. - 9B
DLF Cyber City Phase III
122 002 Gurgaon
Haryana
India
Tel. +91 124 4635774
Fax +91 124 4635773
[email protected]
www.kuka.in

Italy KUKA Roboter Italia S.p.A.


Via Pavia 9/a - int.6
10098 Rivoli (TO)
Italy
Tel. +39 011 959-5013
Fax +39 011 959-5141
[email protected]
www.kuka.it

Japan KUKA Robotics Japan K.K.


YBP Technical Center
134 Godo-cho, Hodogaya-ku
Yokohama, Kanagawa
240 0005
Japan
Tel. +81 45 744 7691
Fax +81 45 744 7696
[email protected]

Canada KUKA Robotics Canada Ltd.


6710 Maritz Drive - Unit 4
Mississauga
L5W 0A1
Ontario
Canada
Tel. +1 905 670-8600
Fax +1 905 670-8604
[email protected]
www.kuka-robotics.com/canada

Issued: 14.01.2015 Version: KSS 8.3 SI V4 477 / 491


KUKA System Software 8.3

Korea KUKA Robotics Korea Co. Ltd.


RIT Center 306, Gyeonggi Technopark
1271-11 Sa 3-dong, Sangnok-gu
Ansan City, Gyeonggi Do
426-901
Korea
Tel. +82 31 501-1451
Fax +82 31 501-1461
[email protected]

Malaysia KUKA Robot Automation (M) Sdn Bhd


South East Asia Regional Office
No. 7, Jalan TPP 6/6
Taman Perindustrian Puchong
47100 Puchong
Selangor
Malaysia
Tel. +60 (03) 8063-1792
Fax +60 (03) 8060-7386
[email protected]

Mexico KUKA de México S. de R.L. de C.V.


Progreso #8
Col. Centro Industrial Puente de Vigas
Tlalnepantla de Baz
54020 Estado de México
Mexico
Tel. +52 55 5203-8407
Fax +52 55 5203-8148
[email protected]
www.kuka-robotics.com/mexico

Norway KUKA Sveiseanlegg + Roboter


Sentrumsvegen 5
2867 Hov
Norway
Tel. +47 61 18 91 30
Fax +47 61 18 62 00
[email protected]

Austria KUKA Roboter CEE GmbH


Gruberstraße 2-4
4020 Linz
Austria
Tel. +43 7 32 78 47 52
Fax +43 7 32 79 38 80
[email protected]
www.kuka.at

478 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


15 KUKA Service

Poland KUKA Roboter Austria GmbH


Spółka z ograniczoną odpowiedzialnością
Oddział w Polsce
Ul. Porcelanowa 10
40-246 Katowice
Poland
Tel. +48 327 30 32 13 or -14
Fax +48 327 30 32 26
[email protected]

Portugal KUKA Sistemas de Automatización S.A.


Rua do Alto da Guerra n° 50
Armazém 04
2910 011 Setúbal
Portugal
Tel. +351 265 729780
Fax +351 265 729782
[email protected]

Russia KUKA Robotics RUS


Werbnaja ul. 8A
107143 Moskau
Russia
Tel. +7 495 781-31-20
Fax +7 495 781-31-19
[email protected]
www.kuka-robotics.ru

Sweden KUKA Svetsanläggningar + Robotar AB


A. Odhners gata 15
421 30 Västra Frölunda
Sweden
Tel. +46 31 7266-200
Fax +46 31 7266-201
[email protected]

Switzerland KUKA Roboter Schweiz AG


Industriestr. 9
5432 Neuenhof
Switzerland
Tel. +41 44 74490-90
Fax +41 44 74490-91
[email protected]
www.kuka-roboter.ch

Issued: 14.01.2015 Version: KSS 8.3 SI V4 479 / 491


KUKA System Software 8.3

Spain KUKA Robots IBÉRICA, S.A.


Pol. Industrial
Torrent de la Pastera
Carrer del Bages s/n
08800 Vilanova i la Geltrú (Barcelona)
Spain
Tel. +34 93 8142-353
Fax +34 93 8142-950
[email protected]
www.kuka-e.com

South Africa Jendamark Automation LTD (Agency)


76a York Road
North End
6000 Port Elizabeth
South Africa
Tel. +27 41 391 4700
Fax +27 41 373 3869
www.jendamark.co.za

Taiwan KUKA Robot Automation Taiwan Co., Ltd.


No. 249 Pujong Road
Jungli City, Taoyuan County 320
Taiwan, R. O. C.
Tel. +886 3 4331988
Fax +886 3 4331948
[email protected]
www.kuka.com.tw

Thailand KUKA Robot Automation (M)SdnBhd


Thailand Office
c/o Maccall System Co. Ltd.
49/9-10 Soi Kingkaew 30 Kingkaew Road
Tt. Rachatheva, A. Bangpli
Samutprakarn
10540 Thailand
Tel. +66 2 7502737
Fax +66 2 6612355
[email protected]
www.kuka-roboter.de

Czech Republic KUKA Roboter Austria GmbH


Organisation Tschechien und Slowakei
Sezemická 2757/2
193 00 Praha
Horní Počernice
Czech Republic
Tel. +420 22 62 12 27 2
Fax +420 22 62 12 27 0
[email protected]

480 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


15 KUKA Service

Hungary KUKA Robotics Hungaria Kft.


Fö út 140
2335 Taksony
Hungary
Tel. +36 24 501609
Fax +36 24 477031
[email protected]

USA KUKA Robotics Corporation


51870 Shelby Parkway
Shelby Township
48315-1787
Michigan
USA
Tel. +1 866 873-5852
Fax +1 866 329-5852
[email protected]
www.kukarobotics.com

UK KUKA Automation + Robotics


Hereward Rise
Halesowen
B62 8AN
UK
Tel. +44 121 585-0800
Fax +44 121 585-0900
[email protected]

Issued: 14.01.2015 Version: KSS 8.3 SI V4 481 / 491


KUKA System Software 8.3

482 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


Index

Index
Symbols $LOAD_BWINI 275
_TYP 366 $MOVE_ENABLE 194
_TYPE 367 $NEAR_POSRET 197
#BSTEP 263 $ON_PATH 197
#CSTEP 264 $ORI_TYPE 280, 294
#IGNORE 294, 295 $OUT 345
#ISTEP 263 $PAL_MODE 99
#MSTEP 263 $PATHTIME 386
#PSTEP 264 $PERI_RDY 52, 196
$ 360 $POS_ACT 434
$ACCU_STATE 92 $PRO_ACT 196
$ADAP_ACC 181, 186 $PRO_IP 464
$ADVANCE 264 $PRO_MODE 263
$ALARM_STOP 196 $PRO_MOVE 197
$ALARM_STOP_INTERN 196 $RC_RDY1 195
$ANIN 345 $ROB_CAL 196
$ANOUT 345 $ROB_STOPPED 197
$AUT 197 $ROBRUNTIME 90, 91
$BRAKE_SIG 213 $SPL_ORI_JOINT_AUTO 295
$BRAKES_OK 226 $STOP_CONST_VEL_RED 388
$BRAKETEST_MONTIME 225 $STOPMESS 196
$BRAKETEST_REQ_EX 225 $T1 197
$BRAKETEST_REQ_INT 226 $T2 197
$BRAKETEST_WARN 226 $TOOL_DIRECTION 124
$BRAKETEST_WORK 226 $TORQ_DIFF 181, 186
$BRK_DEL_COM 443 $TORQ_DIFF2 181
$BRK_DEL_EX 443 $TORQMON_COM_DEF 181
$BRK_DEL_PRO 443 $TORQMON_DEF 181
$BRK_MODE 443 $TORQMON_TIME 182, 187
$BWD_INFO 275 $TORQUE_AXIS_ACT 212, 214
$BWDSTART 275 $TORQUE_AXIS_LIMITS 213
$CHCK_MOVENA 194 $TORQUE_AXIS_MAX 213
$CIRC_MODE 296 $TORQUE_AXIS_MAX_0 213
$CIRC_TYPE 296 $US2_VOLTAGE_ON 96
$COLL_ALARM 182 $USER_SAF 53, 196
$COLL_ENABLE 182 $VW_BACKWARD 275
$CONF_MESS 194 $VW_CYCFLAG 275
$CONST_VEL 388 $VW_MOVEMENT 275
$CONST_VEL_C 388 $VW_RETRACE_AMF 275
$COOLDOWN_TIME 180 $WARMUP_CURR_LIMIT 180
$COULD_START_MOTION 52 $WARMUP_MIN_FAC 180
$DIST_LAST 432 $WARMUP_RED_VEL 179
$DIST_NEXT 432 $WARMUP_SLEW_RATE 180
$DRIVES_OFF 194 $WARMUP_TIME 179
$DRIVES_ON 194
$ECO_LEVEL 170 Numbers
$ERR 395 2004/108/EC 43
$EX_AX_IGNORE 390 2006/42/EC 43
$EXT 197 3-point method 132
$EXT_START 194 89/336/EEC 43
$HOLDING_TORQUE 214 95/16/EC 43
$I_O_ACT 195 97/23/EC 43
$I_O_ACTCONF 196
$IN 345 A
$IN_HOME 197 A6, mastering position 115
$LDC_CONFIG 151 ABC 2-point method 129
$LDC_LOADED 150 ABC World method 129
$LDC_RESULT 151 Accessories 17, 21

Issued: 14.01.2015 Version: KSS 8.3 SI V4 483 / 491


KUKA System Software 8.3

Activation, project 251 BrakeTestStart.SRC 224, 228


Actual position 79 Braking distance 22
Addition 433 Branch, conditional 393
Addition, geometric 434
Administrator 63 C
Advance run 264 Calibrating an external kinematic system 142
Advance run stop 391 Calibration 124
Analog inputs 403 Calibration points (menu item) 89
Analog outputs 404 Calibration tolerances, defining 187
ANIN 403 Calibration, base 131
ANOUT 347, 404 Calibration, external TCP 135
ANSI/RIA R.15.06-2012 44 Calibration, fixed tool 134
APPL_RUN 197 Calibration, linear unit 140
Applied norms and regulations 43 Calibration, root point, kinematic system 142
Approximate positioning 279, 312 Calibration, tool 124
Approximate positioning, homogenous 428 Calibration, TOOL kinematic system 146
Approximate positioning, mixed 429 Calibration, workpiece 134
Archiving overview 247 Call by Reference 412
Archiving, logbook 249 Call by Value 412
Archiving, network 249 Caller stack 464
Archiving, to USB stick 248 Caller stack (menu item) 464
Areas of validity 362 Cancel program 237
AUT and EXT Consistency 220 CASE 400
AUT and EXT consistency 220 CAST_FROM 432
Automatic mode 40 CAST_TO 432
Auxiliary point 278, 369, 370 CCLOSE 432
Axis monitoring functions, checking 165 CE mark 22
Axis monitoring functions, configuring 163 CELL.SRC 269
Axis range 22 CHANNEL 432
Axis range limitation 32 Checksum , safety configuration 167
Axis range monitoring 32 CIOCTL 433
CIRC 369
B CIRC motion 309
Backup configuration (window) 258 CIRC_REL 370
Backup Manager 254 CIRC, motion type 278
Backup Manager, configuring 258 Circular angle 300
Backward motion 270 Circular motion 369, 370
Backward motion, configuring 188 Cleaning work 41
Backward motion, prevention 441 Close all FOLDs (menu item) 243
BACKWARD_STEP 189 Cold start 58
Base calibration 131 Cold start, initial 55, 57, 58, 472
BASE coordinate system 64, 131 Collision detection 180, 182, 311
Battery state 92 Collision detection (menu item) 182, 183
Bit operators 438 Collision detection, Automatic External 184
Block pointer 238, 264 Collision detection, offset 182
Block selection 268, 286 Collision detection, system variables 181
BRAKE 416 Collision detection, variable 184
Brake defect 34 Comment 244
Brake delay 443 Comparison, data from kernel system and hard
Brake release device 32 drive 220
Brake test 222 Conditional branch 393
Brake test cycle time 223 Configuration 157
Brake test, function test 229 Configuration (menu item) 168
Brake test, programs 224 Configuring CELL.SRC 190
Brake test, signals 225, 226 Connecting cables 17, 21
Brake test, teaching positions 227 Connection manager 45
Brake, defective 228 CONST 364
BrakeTestBack.SRC 225, 228 CONST_VEL 386
BrakeTestPark.SRC 224, 228 Constant velocity range 325, 335, 386
BrakeTestReq.SRC 224, 229 Constants 363, 364
BrakeTestSelfTest.SRC 225, 230 CONTINUE 391

484 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


Index

Continuous Path 277 ELSE 393


Coordinate system for jog keys 50 EMC Directive 22, 43
Coordinate system for Space Mouse 49 EMERGENCY STOP 46
Coordinate systems 64 EMERGENCY STOP device 28, 29, 34
Coordinate systems, angles 65 EMERGENCY STOP, external 29, 36
Coordinate systems, orientation 65 EMERGENCY STOP, local 36
COPEN 433 EN 60204-1 + A1 44
Copy 246 EN 61000-6-2 44
Counterbalancing system 41 EN 61000-6-4 + A1 44
Counters, displaying 87 EN 614-1 44
CP motions 277 EN ISO 10218-1 44
CP spline block 313, 375 EN ISO 12100 43
CREAD 433 EN ISO 13849-1 43
Creating a new folder 231 EN ISO 13849-2 43
Creating a new program 231 EN ISO 13850 43
Cut 246 Enabling device 30, 34
CWRITE 433 Enabling device, external 30
Enabling switch 47
D Enabling switches 30
Danger zone 23 ENDFCT 411
DAT 359 ENDFOR 392
Data list 359 ENDIF 393
Data type, user-defined 363, 365, 366 Endless loop 394
Data types 361 ENDLOOP 394
Data, restoring 250 ENDSPLINE 375, 376
DECL 364 ENDSWITCH 400
Declaration of conformity 22 ENDWHILE 402
Declaration of incorporation 21, 22 Energy consumption, measuring 77
Decommissioning 42 ENUM 365
DEF line (menu item) 241 Enumeration type 365
DEF line, displaying/hiding 241 ERR_RAISE 395
DEFAULT 400 Even parity 195
DEFFCT ... ENDFCT 411 Event planner (menu item) 220
Delay time, power failure 58 EXIT 391, 394
Delay time, power-off 57, 59 Exiting, KSS 55
DELETE_BACKWARD_BUFFER 441 Expert Submit (template) 456
Deleting mastering 121 Export (button) 168
Detail view (ASCII) (menu item) 241 External axes 21, 24, 79, 90
Detail view, activating 241 External kinematic system, calibration 142
Diagnosis 461
Diagnostic monitor (menu item) 466 F
Dial gauge 112 F 416
Directory structure 232 FALSE 410
Display (menu item) 84 Faults 35
Displaying a variable, single 82, 83 File list 232
Displaying the logbook 461 File, properties 233
Displaying variables, in overview 84 Filter 233
Displaying, robot controller information 90 Find 247
Displaying, robot information 90 First mastering 107, 116
Disposal 42 Fixed tool, calibration 134
DISTANCE 421 Flags, displaying 85, 86
Division 433 FLANGE coordinate system 65, 125
Documentation, industrial robot 15 Folder, creating 231
Drive bus 57 Folder, properties 233
Drives, switching on/off 53 Folds 242
Folds, creating 245
E Folds, displaying 242
EC declaration of conformity 22 Fonts 359
Edit (button) 50 FOR 401
Editor 237 FOR ... TO ... ENDFOR 392
Electromagnetic compatibility (EMC) 44 Frame operation 434

Issued: 14.01.2015 Version: KSS 8.3 SI V4 485 / 491


KUKA System Software 8.3

Function test 36 Jump 392


Function, calling 410
Function, syntax 411 K
Keyboard 46
G Keyboard key 46
General safety measures 34 Keypad 50
Geometric addition 434 Keywords 360
Global 362 Kinematics group 50, 68
GLOBAL (interrupt declaration) 417 KLI, configuring 157
GOTO 392 KrcDiag 466
Guard interlock 28 KRL syntax 357
KUKA Customer Support 90, 475
H KUKA Line Interface, configuring 157
HALT 393 KUKA smartHMI 49
Hardware, options 96 KUKA smartPAD 23, 45
Hazardous substances 41 KUKA.Load 148
Header 232 KUKA.LoadDataDetermination 148
Hibernate 58
HOME position 240 L
Homogenous approximate positioning 428 Labeling 33
HOV 70 Language 59
Liability 21
I LIN 369
I/O driver, reconfiguring 163 LIN motion 308
I/Os, reconfiguring 163 LIN_REL 370
Identification plate 47 LIN, motion type 278
IF ... THEN ... ENDIF 393 Line break (menu item) 242
Impact 181, 183 Line mark for mastering 116
IN parameters 412 Linear motion 369, 370
Increment 75 Linear unit 21, 139
Incremental jogging 75 Load data 148
Indirect method 133 Logbook 461
Industrial robot 17, 21 Logbook, configuring 463
Info (menu item) 90 Logic Consistency 221
Inline forms 307 Logic consistency 220
Inputs/outputs, analog 81, 345 Long texts, exporting 152
Inputs/outputs, Automatic External 81, 191 Long texts, importing 152
Inputs/outputs, digital 79, 345 LOOP ... ENDLOOP 394
Installation 467 Loss of mastering 107, 111, 115, 120
Intended use 18, 21 Low Voltage Directive 22
INTERN.ZIP 248, 249
Interpolation mode 311, 316 M
INTERRUPT 417, 418 Machine data 37, 90, 91, 95
Interrupt 416 Machinery Directive 22, 43
Interrupt program 417 Main menu, calling 54
Interrupts 465 Maintenance 40, 154
Introduction 15 Manipulator 17, 21, 23
IP addresses 157 Manual mode 39
Marked region 247
J Mastering 100
Jerk 316, 317, 321, 323, 328, 330 Mastering after maintenance work 113
Jog keys 46, 66, 71 Mastering marks 103
Jog mode 31, 34 Mastering methods 101
Jog mode “Jog keys” 68 Mastering position, A6 115
Jog mode “Space Mouse” 68 Mechanical axis range limitation 32
Jog mode, activating 70 Mechanical end stops 31
Jog override 70 MEMD 102, 114
Jogging, axis-specific 65, 71 Message window 49
Jogging, Cartesian 65, 71, 75 Messages, show help 60
Jogging, external axes 76 Micro Electronic Mastering Device 102, 114
Jogging, robot 65 Minimizing KUKA smartHMI 54

486 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


Index

Mixed approximate positioning 429 Overload 34


Mode selection 26, 27 Override 70, 267
Modifying a logic instruction 356 Override (menu item) 77
Modifying a variable 82 Overriding, power failure 57, 58
Modifying coordinates 338 Overview of the industrial robot 17
Modifying motion parameters 338
Modifying variables 84 P
Module 61, 359 Palletizing robots 99, 126, 131
Monitoring, velocity 31 Panic position 30
Motion conditions (window) 52 Parameters, transferring 412
Motion programming, basic principles 277 Parity 195
Motion types 277 Parity bit 195
Motor, exchange 114 Parity, even 195
Multiplication 433 Parity, odd 195
Password, changing 170
N Paste 246
Name, archive 91 PATH 424
Name, control PC 90 Payload data 148
Name, robot 90, 91 Payload data (menu item) 149
Names 360 Performance Level 26
Navigator 232 Performing a manual brake test 228
Non-rejecting loop 399 Peripheral contactor 38, 96, 98
Numeric entry, external TCP 136 Personnel 24
Numeric entry, external tool 147 PGNO_FBIT 193
Numeric entry, linear unit 141 PGNO_FBIT_REFL 196
Numeric entry, root point, kinematic system 144 PGNO_LENGTH 193
Numeric input, base 134 PGNO_PARITY 193
Numeric input, tool 131 PGNO_REQ 197
PGNO_TYPE 192
O PGNO_VALID 193
Odd parity 195 Pinning 250, 254
Offset 107, 110, 115, 119, 347 Plant integrator 24
OLDC 149 PLC_ROB_STOP_RELEASE() 442
ON_ERROR_PROCEED 394 PLC_ROB_STOP() 442
Online documentation 59 Point correction, defining limits 176
Online help 59 Point-to-point 277
Online load data check 149 Point-to-point motion 368
Online optimizing 220, 222 Positionally accurate robot, checking activation
Open all FOLDs (menu item) 243 99
Opening a program 237 Positioner 21, 142
Operating hours 91 POV 267
Operating hours meter 91 Power failure delay time 58
Operating mode, changing 63 Power failure, overriding 57, 58
Operation 45 Power-off delay time 57, 59
Operator 25, 63 Pre-mastering position 103, 104
Operator safety 26, 28, 34, 53 Pressure Equipment Directive 41, 43
Operator safety acknowledgement 96 Preventive maintenance work 41
Operator, geometric 434 Printing, program 247
Operators for bit operations 438 Priority 417, 422, 426
Operators for comparison operations 437 Probe 102
Operators, arithmetic 433 Product description 17
Operators, logic 438 PROFIenergy 77
Operators, priority 440 PROFINET interface 158
Options 17, 21 Program execution 263
Orientation behavior, SCIRC 296 Program execution control 391
Orientation control, LIN, CIRC 280 Program lines, deleting 245
Orientation control, spline 294 Program override 267
OUT 345 Program run mode, selecting 263
OUT parameters 412 Program run modes 263
Output, analog 347 Program, cancel 237
Output, digital 345 Program, closing 238

Issued: 14.01.2015 Version: KSS 8.3 SI V4 487 / 491


KUKA System Software 8.3

Program, creating 231 Safety configuration, Checksum 167


Program, editing 243 Safety configuration, export 168
Program, opening 237 Safety configuration, import 168
Program, printing 247 Safety controller 27
Program, selecting 237 Safety functions 26, 34
Program, starting 267, 268 Safety functions, overview 26
Program, stopping 268, 269 Safety instructions 15
Programmer 63 Safety of machinery 43
Programming, Expert 357 Safety options 23
Programming, inline forms 307 Safety STOP 0 23
Programming, KRL syntax 357 Safety STOP 1 23
Programming, User 307 Safety STOP 2 23
Project management (window) 252 Safety STOP 0 23
Project, activation 251 Safety STOP 1 23
Project, inactive 253 Safety STOP 2 23
Properties, file or folder 233 Safety stop, external 31
Protective equipment 31 Safety zone 23, 25
PTP 368 Safety, general 21
PTP motion 307 SCIRC 377, 378
PTP spline block 313, 376 SCIRC motion, programming 329
PTP_REL 368 SCIRC segment, programming 318
PTP_SPLINE ... ENDSPLINE 376 SEC 402
PTP, motion type 277 Selecting a program 237
PUBLIC 363 Selecting the base 71
PULSE 346, 405 Selecting the tool 71
Pulse 346, 405 SEMD 102, 106
Pulse, path-related 355 Serial number 91
Service life 23, 90
R Service, KUKA Roboter 475
Rating plate 95 SET_BRAKE_DELAY() 443
RDC data backup 92 SET_TORQUE_LIMITS 208, 211
RDC, exchange 114 SGTLCRC.XML 167
Re-teaching 338 Shutdown (menu item) 56
Reaction distance 22 SIGNAL 409
Recommissioning 36, 95 Signal diagrams 199
Reference mastering 113 Signals, brake test 225
REFLECT_PROG_NR 193 Signals,brake test 226
Rejecting loop 402 Simulation 40
Release device 32 Single (menu item) 82, 83, 186
Renaming a file 231 Single point of control 42
Renaming a folder 231 Singularities 304
Renaming the base 139 Singularity, CP spline 294, 295
Renaming the tool 139 Singularity, LIN/CIRC 280
Repair 40 SLIN 377, 378
REPEAT ... UNTIL 399 SLIN motion, programming 327
Replace 247 SLIN segment, programming 317
Resetting a program 269 smartHMI 17, 49
RESUME 420 smartPAD 23, 35, 45
Reteaching, defining limits 176 Soft axes 205
RETURN 411 Software 17, 21
ROB_STOP_RELEASE() 442 Software limit switches 31, 34, 121
ROB_STOP() 442 Software limit switches, modifying 121
Robot controller 17, 21 Space Mouse 46, 66, 72, 74, 75
Robot data (menu item) 90 Special characters 307
ROBROOT coordinate system 64 SPL 377, 378
Runtime variable 362 SPL segment, programming 317
SPLINE ... ENDSPLINE 375
S Spline block, programming 313
Safe operational stop 23, 30 Spline segment 283
Safeguards, external 33 Spline, motion type 283
Safety 21 SPOC 42

488 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


Index

SPS.SUB, editing 455 Switching on the robot controller 54


SPTP 380 SWRITE 433
SPTP motion, programming 331 Symbols 359
SPTP segment, programming 319 SYN OUT 350
SPTP_REL 381 SYN PULSE 355
SRC 359 System integrator 22, 24, 25
SREAD 433 System requirements 18, 467
Stamp 244 System variables 274
Standard Electronic Mastering Device 102, 106
Standstill monitoring 164 T
Start backwards key 46 T1 24
Start key 46, 47 T1 and T2 Consistency 220
Start type, KSS 55 T1 and T2 consistency 220
Start types 58 T2 24
Start-up 36, 95 TCP 124
Start-up mode 38 TCP, external 134
Start-up wizard 95 Teach pendant 17, 21
Starting a program, automatic 268 Teaching 338
Starting a program, manual 267 Technology packages 17, 90, 307, 360
Starting Automatic External mode 269 Terms used, safety 22
Starting the KSS 54 Time block 384
Status 301 TIME_BLOCK 383
Status bar 49, 51, 232 Timers, displaying 88
Status keys 46 tm_useraction 180
STEP 392 tm_useraction, editing 185
STOP 0 22, 24 TMx 184
STOP 1 22, 24 Tool calibration 124
STOP 2 22, 24 Tool Center Point 124
Stop category 0 24 TOOL coordinate system 64, 124
Stop category 1 24 Tool direction 124
Stop category 2 24 Tool, external 146
STOP key 46 Torque 181, 182
Stop reactions 26 Torque mode, diagnosis 212
STOP WHEN PATH 389 Torque mode, examples 207, 215
Stopping a program 268, 269 Torque mode, overview 205
Stopping distance 22, 25 Torque monitoring 186
Stopping the robot 416, 442 Torque monitoring (menu item) 186
Storage 42 Touch screen 45, 50
Storage capacities 90 Trademarks 16
String variable length after initialization 448 Training 15
String variable length in the declaration 447 Transforming coordinates 339
String variable, deleting contents 448 Transportation 35
String variables 447 TRIGGER 421, 424
String variables, comparing contents 450 Trigger, for spline inline form 323
String variables, copying 450 Turn 301
String variables, extending 448 Turn-tilt table 21, 142
String variables, searching 449 Type, robot 90
STRUC 366 Type, robot controller 90
Structure type 366
SUB program, creating 456 U
Submit (template) 456 Unmastering 121
Submit interpreter 51, 453 UNTIL 399
Submit interpreter, editing SPS.SUB 455 Update 472
Submit interpreter, starting 454 US2 38, 96, 98
Submit interpreter, stopping 454 USB connection 47
Subprogram, calling 410 USB sticks 18
Subtraction 433 Use, contrary to intended use 21
Supplementary load data (menu item) 149 Use, improper 21
Support request 475 User 23, 24
SWITCH ... CASE ... ENDSWITCH 400 User group, changing 62
Switching action, path-related 350 User group, default 63

Issued: 14.01.2015 Version: KSS 8.3 SI V4 489 / 491


KUKA System Software 8.3

User interface 49

V
Variable correction 82
Variable overview, configuring 168
VARSTATE() 83, 446
Velocity 71, 267
Velocity monitoring 31
Version, kernel system 90
Version, operating system 90
Version, robot controller 90
Version, user interface 90
Voltage 81, 347, 348

W
WAIT 348, 401, 402
WAIT FOR 401
Wait function, signal-dependent 348
WAIT SEC 402
Wait time 348, 402
WAITFOR 348
Warm-up 177
Warnings 15
WHILE ... ENDWHILE 402
Windows interface 54, 157, 158
WITH (permissible system variables 382
Working range limitation 32
Workpiece base calibration 144
Workpiece base, numeric entry 146
Workspace 22, 25
Workspace monitoring, bypassing 76
Workspaces, axis-specific 171
Workspaces, Cartesian 171
Workspaces, cubic 171
Workspaces, mode 176
WORLD coordinate system 64
Wrist root point 176

X
XML export 168
XML import 168
XYZ 4-point method 126
XYZ Reference method 128

490 / 491 Issued: 14.01.2015 Version: KSS 8.3 SI V4


KUKA System Software 8.3

Issued: 14.01.2015 Version: KSS 8.3 SI V4 491 / 491

You might also like