Download as pdf or txt
Download as pdf or txt
You are on page 1of 92

KUKA System Technology

KUKA.UserTech 4.0
For KUKA System Software 8.6 and 8.7

Issued: 27.10.2020
KST UserTech 4.0 V3
KUKA Deutschland GmbH
KUKA.UserTech 4.0

© Copyright 2020
KUKA Deutschland GmbH
Zugspitzstraße 140
D-86165 Augsburg
Germany

This documentation or excerpts therefrom may not be reproduced or disclosed to third parties
without the express permission of KUKA Deutschland GmbH.
Other functions not described in this documentation may be operable in the controller. The user
has no claims to these functions, however, in the case of a replacement or service work.
We have checked the content of this documentation for conformity with the hardware and soft-
ware described. Nevertheless, discrepancies cannot be precluded, for which reason we are not
able to guarantee total conformity. The information in this documentation is checked on a regu-
lar basis, however, and necessary corrections will be incorporated in the subsequent edition.
Subject to technical alterations without an effect on the function.
KIM-PS5-DOC
Translation of the original documentation

Publication: Pub KST UserTech 4.0 (PDF) en


PB11491

Book structure: KST UserTech 4.0 V3.1


BS10539

Version: KST UserTech 4.0 V3

2/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Contents

1 Introduction.............................................................................................. 7
1.1 Target group.......................................................................................................... 7
1.2 Industrial robot documentation.............................................................................. 7
1.3 Representation of warnings and notes................................................................. 7
1.4 Terms used............................................................................................................ 8
1.5 Trademarks............................................................................................................ 8
1.6 Licenses................................................................................................................. 8

2 Product description................................................................................. 9
2.1 Product description................................................................................................ 9
2.2 Overview of KUKA.UserTech 4.0.......................................................................... 9
2.3 Intended use and misuse...................................................................................... 10

3 Safety......................................................................................................... 11

4 Installation................................................................................................ 13
4.1 System requirements............................................................................................. 13
4.2 Installation via WorkVisual.................................................................................... 13
4.2.1 Installing or updating KUKA.UserTech 4.0........................................................... 13
4.2.2 Uninstalling KUKA.UserTech 4.0........................................................................... 14
4.3 Installation via smartHMI....................................................................................... 14
4.3.1 Installing or updating KUKA.UserTech 4.0........................................................... 14
4.3.2 Uninstalling KUKA.UserTech 4.0........................................................................... 16

5 Operation.................................................................................................. 17
5.1 Converter............................................................................................................... 17
5.1.1 Converting a KFD file............................................................................................ 17
5.1.2 Converting the smartHMI configuration file.......................................................... 17

6 Programming............................................................................................ 19
6.1 Overview of KFDx syntax..................................................................................... 19
6.2 Special characters................................................................................................. 20
6.3 Strings.................................................................................................................... 21
6.4 Parameter references............................................................................................ 22
6.5 Naming conventions and keywords...................................................................... 22
6.6 Areas of validity..................................................................................................... 22
6.7 Language files....................................................................................................... 23
6.8 Overview: programming a technology package................................................... 24
6.8.1 Creating a KFDx file.............................................................................................. 25
6.8.2 <Application>: defining a technology package..................................................... 26
6.8.3 <Param>: defining a parameter............................................................................ 27
6.8.4 Parameter types.................................................................................................... 29
6.8.4.1 Parameter type STATIC........................................................................................ 29
6.8.4.2 Parameter type FREE........................................................................................... 29
6.8.4.3 Parameter type NAME.......................................................................................... 30
6.8.4.4 Parameter type NUMBER..................................................................................... 30
6.8.4.5 Parameter type REAL........................................................................................... 31
6.8.4.6 Parameter type LIST............................................................................................. 33

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 3/92


KUKA.UserTech 4.0

6.8.4.7 Parameter type BOOL........................................................................................... 34


6.8.5 <Fold>: defining a fold.......................................................................................... 36
6.8.6 <InlineForm>: defining an inline form................................................................... 37
6.8.6.1 Inline form with OnOpen and OnAccept script.................................................... 41
6.8.7 Format types.......................................................................................................... 42
6.8.7.1 Format type WYSIWYG........................................................................................ 42
6.8.7.2 Format type SUB................................................................................................... 42
6.8.7.3 Format type DSUB................................................................................................ 43
6.8.7.4 Format type FCT................................................................................................... 44
6.8.7.5 Format type DFCT................................................................................................ 45
6.8.7.6 Format type ASS................................................................................................... 46
6.8.7.7 Format type ASSAGG........................................................................................... 46
6.9 Programming the parameter list........................................................................... 47
6.9.1 <Param Name="PL_">: defining the data set structure for a parameter list....... 48
6.9.2 <PList>: defining a parameter list......................................................................... 48
6.9.3 Defining the structure data type........................................................................... 49
6.9.4 MyTech technology................................................................................................ 50
6.10 Programming status keys...................................................................................... 54
6.10.1 <StatKey>: defining a status key.......................................................................... 55
6.10.1.1 Image sizes........................................................................................................... 58
6.10.1.2 Layout.................................................................................................................... 59
6.10.2 <StatkeyBar>: defining a status key bar.............................................................. 61
6.10.3 <Set>: setting a status key or status key bar...................................................... 61
6.11 Programming scripts.............................................................................................. 62
6.11.1 <Script>: defining a script..................................................................................... 62
6.11.2 <SetVar…/>: setting a variable............................................................................. 63
6.11.3 <ShowVar…/>: reading a variable........................................................................ 64
6.11.4 <Redecl…/>: creating or overwriting a variable................................................... 64
6.11.5 <Do Script…/>: executing a script........................................................................ 65
6.11.5.1 Predefined scripts.................................................................................................. 66
6.11.6 <Message…/>: defining a message..................................................................... 66
6.11.7 <Switch Dialog ="FALSE"…>: requesting a variable and executing a script...... 67
6.11.7.1 OnOpen script with IsChange request................................................................. 68
6.11.7.2 OnOpen script with DoAlways request................................................................. 69
6.11.8 <Switch Dialog ="TRUE"...>: displaying a dialog and executing a script............ 70

7 Configuration............................................................................................ 71
7.1 Integrating inline forms and status keys into smartHMI....................................... 71
7.1.1 Menu structure for inline forms............................................................................. 72
7.1.2 Menu structure for status key bars....................................................................... 73
7.2 Integrating inline forms in WorkVisual.................................................................. 74
7.3 Examples of integration of technology packages................................................. 78
7.3.1 Twinkle technology................................................................................................ 78
7.3.1.1 Integrating the Twinkle technology in a menu..................................................... 79
7.3.1.2 Integrating the Twinkle technology in a submenu................................................ 80
7.3.2 Glue technology..................................................................................................... 81
7.3.2.1 Integrating the Glue technology in a menu.......................................................... 82
7.3.3 DispSet technology................................................................................................ 82
7.3.3.1 Integrating the DispSet technology in a menu..................................................... 84

4/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

8 Archiving................................................................................................... 87
8.1 Archiving files........................................................................................................ 87
8.2 Restoring files........................................................................................................ 88

9 KUKA Service........................................................................................... 89
9.1 Requesting support............................................................................................... 89
9.2 KUKA Customer Support...................................................................................... 89

Index 91

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 5/92


KUKA.UserTech 4.0

6/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Introduction
1 Introduction

1.1 Target group

This documentation is aimed at users with the following knowledge and


skills:
• Knowledge of the robot controller system
• Advanced KRL programming skills
• Basic knowledge of XML

For optimal use of KUKA products, we recommend the training courses


offered by KUKA College. Information about the training program can be
found at www.kuka.com or can be obtained directly from our subsidia-
ries.

1.2 Industrial robot documentation

The industrial robot documentation consists of the following parts:

• Documentation for the robot arm


• Documentation for the robot controller
• Documentation for the smartPAD-2 (if used)
• Operating and programming instructions for the System Software
• Instructions for options and accessories
• Spare parts overview in KUKA Xpert
Each of these sets of instructions is a separate document.

1.3 Representation of warnings and notes

Safety

These warnings are provided for safety purposes and must be observed.
DANGER
These warnings mean that it is certain or highly probable that death or
severe injuries will occur, if no precautions are taken.

WARNING
These warnings mean that death or severe injuries may occur, if no
precautions are taken.

CAUTION
These warnings mean that minor injuries may occur, if no precautions
are taken.

NOTICE
These warnings mean that damage to property may occur, if no precau-
tions are taken.

These warnings contain references to safety-relevant information or gen-


eral safety measures.
These warnings do not refer to individual hazards or individual precau-
tionary measures.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 7/92


KUKA.UserTech 4.0

This warning draws attention to procedures which serve to prevent or rem-


Introduction

edy emergencies or malfunctions:


SAFETY INSTRUCTION
The following procedure must be followed exactly!

Procedures marked with this warning must be followed exactly.

Notices

These notices serve to make your work easier or contain references to


further information.
Tip to make your work easier or reference to further information.

1.4 Terms used

Term Description

KFD KUKA Form Description


ASCII file format for the definition of technologies

KFDx KUKA Form Descriptionx


XML file format for the definition of technologies

KRL KUKA Robot Language


KUKA robot programming language

smartHMI smart Human-Machine Interface


User interface on the smartPAD

smartPAD Programming device for the robot controller


The smartPAD has all the operator control and display functions re-
quired for operating and programming the manipulator.

String Sequence of alphanumeric characters of fixed or variable length

1.5 Trademarks

Windows is a trademark of Microsoft Corporation.

1.6 Licenses

The KUKA license conditions and the license conditions of the open-
source software used can be found in the following folders:
• Under .\LICENSE on the data storage medium with the installation
files of the KUKA software
• On the KUKA smartHMI, in the main menu under Help > Info, tab Li-
censes
• Under D:\KUKA_OPT\Option package name\LICENSE on the robot
controller
• In the license folder under the name of the option package in the Op-
tions catalog in WorkVisual

Further information about open-source licenses can be requested from


the following address: [email protected]

8/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Product description
2 Product description

2.1 Product description

Description

The KUKA.UserTech 4.0 option package enables users to create their own
technology packages and programs.

Functions

• Definition of user-specific inline forms


• Definition of user-specific messages
• Definition of user-specific status keys, status key bars and buttons
• Definition of user-specific scripts for inline forms and status keys
• Definition of user-specific folds for inline forms
• Integration of user-defined inline forms, status keys and status key
bars into the KUKA smartHMI
• Integration of user-defined inline forms in WorkVisual

2.2 Overview of KUKA.UserTech 4.0

The technologies and their elements are defined in KFDx files (XML for-
mat).

Converter

Technologies that were defined with an earlier UserTech version for KSS
8.1, 8.2, 8.3 or 8.5 can still be used. A converter is available for convert-
ing KFD files to the new file format. The corresponding smartHMI configu-
ration files can also be converted.
(>>> 5.1 "Converter" Page 17)

Scripts

Scripts can be defined for inline forms and status keys. These scripts can
be used to perform the following actions:
• Create KRL variables
• Read and write KRL variables
• Read and set the state of outputs
• Read and set the state of inputs
• Generate messages
• Generate user dialogs

Parameter types

The following parameter types can be defined for inline forms:


• Static boxes without a user input
• Boxes with integer values with identifier and unit
• Boxes with real values with identifier and unit
• Text boxes
• Text boxes that are subject to the limitations of KRL identifiers
• Text boxes that are subject to the limitations of KRL identifiers and are
linked to parameter lists

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 9/92


Product description KUKA.UserTech 4.0

• List boxes
• Check boxes that return a truth value

Folds

For inline forms, it is possible to define KRL macros (folds) that can be in-
serted into the module that is open in the editor:
• Values of parameters can be inserted.
• Scripts can be executed on opening and closing an inline form and on
pressing Touch-up.
• Folds that have been inserted can be opened again and the values
modified.
• The Touch-up script assigned to an inline form can be executed when
the fold is closed.

Language files

Message texts that are generated are used as a key for a language-spe-
cific message system:
• For this, there must be corresponding entries in a language file. The
data are stored in an XML format in a KXR file.
(>>> 6.7 "Language files" Page 23)

Directories

The following directories are created under C:\KRC\TP\UserTech\:


Directory Description
Kxr Directory for the KXR language files
smartHMI Directory for the smartHMI configuration files
TEMPLATE Directory for the KFDx files

Templates

KUKA.UserTech 4.0 provides programming and configuration examples for


inline forms and status keys.
(>>> 7.1 "Integrating inline forms and status keys into smartHMI"
Page 71)

2.3 Intended use and misuse

Use

KUKA.UserTech 4.0 is a software package for programming user-defined


inline forms and status keys. It may only be used for this purpose and
must be operated exclusively in accordance with the specified system re-
quirements.

Misuse

Any use or application deviating from the intended use is deemed to be


misuse and is not allowed. It will result in the loss of warranty and liability
claims. KUKA is not liable for any damage resulting from such misuse.

10/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Safety
3 Safety
The safety information for the industrial robot can be found in the “Safety”
chapter of the Operating and Programming Instructions for System Inte-
grators or the Operating and Programming Instructions for End Users.
Comply with safety-relevant information
The safe use of this product requires knowledge of and compliance with
fundamental safety measures. Death, severe injuries or damage to prop-
erty may otherwise result.
• The “Safety” chapter in the operating and programming instructions
of the KUKA System Software (KSS) must be observed.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 11/92


Safety KUKA.UserTech 4.0

12/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Installation
4 Installation
The option package can either be installed on the robot controller via the
smartHMI or via WorkVisual.

4.1 System requirements

Hardware

• KR C4 or KR C5 robot controller

Software

KR C4 robot controller:
• KUKA System Software 8.6.x
KR C5 robot controller:
• KUKA System Software 8.7.x
Laptop/PC:
• WorkVisual 6.0.x
The numbers of the required releases/versions must be taken from the file
ReleaseNotes_[…].txt. The file is located on the data storage medium
containing KUKA.UserTech 4.0.

4.2 Installation via WorkVisual

4.2.1 Installing or updating KUKA.UserTech 4.0

Description

The option package is installed in WorkVisual and added to the project.


During project deployment, the option package is automatically installed
on the robot controller.
It is advisable to archive all relevant data before updating a software
package.

Precondition

• User group “Expert”


• T1 or T2 mode
• No program is selected.
• Network connection to the robot controller
• The option package is available as a KOP file.

Procedure

1. Install the KUKA.UserTech 4.0 option package in WorkVisual.


2. Load the active project from the robot controller.
3. Insert the KUKA.UserTech 4.0 option package into the project.
4. Deploy the project from WorkVisual to the robot controller and activate
it.
5. The request for confirmation Do you want to activate the project […]?
is displayed on the smartHMI. The active project is overwritten during

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 13/92


KUKA.UserTech 4.0

activation. If no relevant project will be overwritten: Answer the query


Installation

with Yes.
6. An overview with the changes and a request for confirmation are dis-
played on the smartHMI. Answer this with Yes. The option package is
installed and the robot controller carries out a reboot.

Information about procedures in WorkVisual is contained in the WorkVi-


sual documentation.

LOG file

A LOG file is created under C:\KRC\ROBOTER\LOG.

4.2.2 Uninstalling KUKA.UserTech 4.0

Description

The option package can be uninstalled via WorkVisual.


It is advisable to archive all relevant data before uninstalling a software
package.

Precondition

• User group “Expert”


• T1 or T2 mode
• No program is selected.
• Network connection to the robot controller

Procedure

1. Load the project from the robot controller.


2. Remove the KUKA.UserTech 4.0 option package from the project. A
window with modifications is displayed.
3. Deploy the project from WorkVisual to the robot controller and activate
it.
4. Answer the request for confirmation Do you want to activate the
project […]? on the smartHMI with Yes.
5. An overview with the changes and a request for confirmation are dis-
played on the smartHMI. Answer this with Yes. The option package is
uninstalled and the robot controller carries out a reboot.

Information about procedures in WorkVisual is contained in the WorkVi-


sual documentation.

LOG file

A LOG file is created under C:\KRC\ROBOTER\LOG.

4.3 Installation via smartHMI

4.3.1 Installing or updating KUKA.UserTech 4.0

It is advisable to archive all relevant data before updating a software


package.

14/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Installation
Precondition

• User rights: Function group General configuration


But at least the user group “Expert”
• T1 or T2 mode
• No program is selected.
• USB stick with the option package (KOP file)

NOTICE
Data loss due to USB sticks from third-party manufacturers
Data may be lost if USB sticks from manufacturers other than KUKA
are used for activities on the robot controller.
• For activities on the robot controller requiring a USB stick, use a
KUKA stick.
The KUKA sticks are validated for use with the robot controller.

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 entry “KUKA.UserTech 4.0” must be dis-
played 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.
Otherwise, the path from which the software is to be installed must be
configured 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 overwrit-
ten.
c. Press Path selection. The available drives are displayed.
d. If the stick is connected to the robot controller: On E:\, select the
directory in which the software is located.
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 press Save again.
5. Set the check mark at “KUKA.UserTech 4.0” and press Install. Con-
firm the installation query with OK.
6. The request for confirmation Do you want to activate the project […]?
is displayed. The active project is overwritten during activation. If no
relevant project will be overwritten: Answer the query with Yes.
7. An overview with the changes and a request for confirmation are dis-
played. Answer this with Yes. The option package is installed and the
robot controller carries out a reboot.
8. Remove the stick.

LOG file

A LOG file is created under C:\KRC\ROBOTER\LOG.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 15/92


Installation KUKA.UserTech 4.0

4.3.2 Uninstalling KUKA.UserTech 4.0

It is advisable to archive all relevant data before uninstalling a software


package.

Precondition

• User rights: Function group General configuration


But at least the user group “Expert”
• T1 or T2 mode
• No program is selected.

Procedure

1. In the main menu, select Start-up > Additional software.


2. Activate the check mark at KUKA.UserTech 4.0 and press Uninstall.
Answer the request for confirmation with Yes.
3. Answer the request for confirmation Do you want to activate the
project […]? with Yes.
4. An overview with the changes and a request for confirmation are dis-
played. Answer this with Yes. The option package is uninstalled and
the robot controller carries out a reboot.

LOG file

A LOG file is created under C:\KRC\ROBOTER\LOG.

16/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Operation
5 Operation

5.1 Converter

5.1.1 Converting a KFD file

Description

The converter generates a KFDx file (new file format) from a KFD file (old
file format).
KUKA.UserTech 4.0 detects when a conversion is required and performs it
automatically:
• On booting the smartHMI
• On opening a UserTech inline form via the menu
• On switching the active UserTech status key bar

Search paths

The converter searches for KFD files in the following directories:


• Default directory for UserTech: C:\KRC\TP\UserTech\TEMPLATE
• Installation directory of the robot controller: C:\KRC
• Folders that are stored in the Windows registry database under
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\KUKA Robot-
erGmbH\Options\KFD

LOG file

During conversion, the log file UserTechConverter.log is created under


C:\KRC\ROBOTER\LOG.
If errors are detected in a KFD file, a copy of the log file is additionally
created and saved with a specification of the date and time. The number
of copies is limited to 10. If this number is exceeded, older files will be
deleted until there are only 10 copies remaining in the LOG directory.

5.1.2 Converting the smartHMI configuration file

Description

Conversion of the smartHMI configuration files created for the inline forms
and status keys defined in KFD files (old file format) is not carried out au-
tomatically. This must be started manually by executing a conversion file.

Conversion file

Directory C:\KRC\TP\UserTech\SmartHMI
File KukaRoboter.UserTech.KfdConverter.exe

Search paths

The converter searches for smartHMI configuration files in the following di-
rectories:
• C:\KRC\USER (SmartHMI.User.config)
• Folders that are stored in the Windows registry database under
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\KUKA Robot-
erGmbH\Options\KFD

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 17/92


Operation KUKA.UserTech 4.0

Procedure

• Double-click on the file KukaRoboter.UserTech.KfdConverter.exe.

18/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
6 Programming

6.1 Overview of KFDx syntax

KFDx is an XML format. If individual attributes of an XML element are


not defined, the stored default values are generally used. These are
specified in the syntax descriptions.
Undefined means:
• Attribute is missing entirely.
• Or attribute value remains blank: ""
• Or attribute value only contains spaces: " "

Technologies
<Application>…</Application> Defining a technology package.
(>>> 6.8.2 "<Application>: defining a technology pack-
age" Page 26)

Inline forms
<Fold>…</Fold> Defining a fold.
(>>> 6.8.5 "<Fold>: defining a fold" Page 36)
<InlineForm>…</InlineForm> Defining an inline form.
(>>> 6.8.6 "<InlineForm>: defining an inline form"
Page 37)
<Param>…</Param> Defining a parameter.
(>>> 6.8.3 "<Param>: defining a parameter" Page 27)

Parameter lists
<Param Name="PL_">…</Param> Defining a data set structure for a parameter list.
(>>> 6.9.1 "<Param Name="PL_">: defining the data
set structure for a parameter list" Page 48)
<PList>…</PList> Defining a parameter list.
(>>> 6.9.2 "<PList>: defining a parameter list"
Page 48)

Status keys
<StatKey>…</StatKey> Defining a status key.
(>>> 6.10.1 "<StatKey>: defining a status key"
Page 55)
<StatkeyBar>…</StatkeyBar> Defining a status key bar.
(>>> 6.10.2 "<StatkeyBar>: defining a status key bar"
Page 61)
<Set>…</Set> Setting a status key or status key bar.
(>>> 6.10.3 "<Set>: setting a status key or status key
bar" Page 61)

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 19/92


Programming KUKA.UserTech 4.0

Scripts
<Script>…</Script> Defining a script.
(>>> 6.11.1 "<Script>: defining a script" Page 62)
<Do Script…/> Executing a script.
(>>> 6.11.5 "<Do Script…/>: executing a script"
Page 65)
<Message…/> Defining a message text.
(>>> 6.11.6 "<Message…/>: defining a message"
Page 66)
<Redecl…/> Creating or overwriting a variable.
(>>> 6.11.4 "<Redecl…/>: creating or overwriting a var-
iable" Page 64)
<Set>…</Set> Setting a status key or status key bar.
(>>> 6.10.3 "<Set>: setting a status key or status key
bar" Page 61)
<SetVar…/> Setting a variable.
(>>> 6.11.2 "<SetVar…/>: setting a variable" Page 63)
<ShowVar…/> Reading a variable.
(>>> 6.11.3 "<ShowVar…/>: reading a variable"
Page 64)
<Switch Dialog ="FALSE"…> Requesting a variable and executing an event-depend-
ent script.
…</Switch>
(>>> 6.11.7 "<Switch Dialog ="FALSE"…>: requesting a
variable and executing a script" Page 67)
<Switch Dialog ="TRUE"…> Displaying a dialog and executes a response-depend-
ent script.
…</Switch>
(>>> 6.11.8 "<Switch Dialog ="TRUE"...>: displaying a
dialog and executing a script" Page 70)
ACCEPTINLINEFORM Predefined scripts
CANCELINLINEFORM (>>> 6.11.5.1 "Predefined scripts" Page 66)
END
NOTHING

6.2 Special characters

The following special characters are used in the KFDx format:

20/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Character Description
/ Cancels the special function of a subsequent character.
The character "/" itself is not displayed in the string.
Example:

• /%: Function of the "%" character for designating a


parameter reference placeholder is canceled.
% Designates a parameter reference placeholder
(>>> 6.4 "Parameter references" Page 22)
The "/" character or a space must be inserted after the
parameter reference placeholder. If a space is used, a
second space must be inserted if a further character or
expression follows after the parameter reference place-
holder.
A space used to terminate a parameter reference place-
holder is not displayed in the string.
Examples:

• %INLINEFORM/
• %INLINEFORM
# Designates a value assignment
Examples:

• #%INLINEFORM
• #TOGGLE
| Identifies the parameters generated via the language key
of a message
Example:

• (>>> 6.7 "Language files" Page 23)

6.3 Strings

Description

The following rules apply for strings in the KFDx format (e.g. in the attrib-
ute ShortName=""):
• The following characters are not allowed in strings: &, ', <, >, "
• The forbidden characters are function characters in XML. If these
characters are nevertheless to be part of the string, they must be re-
placed by the following masking character strings:

Function character Masking character string


& &amp;
' &apos;
< &lt;
> &gt;
" &quot;

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 21/92


Programming KUKA.UserTech 4.0

Example

The character string "->" is to be displayed as a parameter name. For


this, it must be specified as follows in the KFDx file: "-&gt;"

6.4 Parameter references

A parameter reference placeholder consists of a percent sign and a pa-


rameter name. The percent sign causes the name of the parameter to be
a value and not a text.
The following parameter reference placeholders are predefined:
Name Description
%TP Name of the technology
First parameter in every inline form
%INLINEFORM Name of the inline form
Second parameter in every inline form
%MODULE Name of the program in Navigator

6.5 Naming conventions and keywords

Names

The following naming conventions apply in the KFDx format:


• The name can consist of letters (A...Z), numbers (0...9) and the spe-
cial characters “_” and “$”.
• The name must not start with a number.
• The name must not be a keyword.
Examples of names:
• Variable names
• Function names
• Subprogram names

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

The use of keywords reserved for KRL is not permitted. Further informa-
tion about keywords is contained in the “Operating and Programming In-
structions for System Integrators”.

6.6 Areas of validity

Variables and data objects have local validity, i.e. in a defined technology
package, if they are declared within the statement <Application> … </
Application>.
Variables and data objects have global validity, i.e. in all technology pack-
ages, if they are declared outside the statement <Application> … </Appli-
cation>.
We recommend combining all global variables and data objects in a
KFDx file.

22/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
6.7 Language files

Description

Texts that are to be displayed on the KUKA smartHMI in different languag-


es can be saved in a KXR language file using keys. These include:
• Messages
‒ For parameterized outputs, the relevant parameters must be ap-
pended to the key with a preceding pipe symbol (vertical bar).
• Labels of buttons or status keys
• Menu entries
• Parameter names in inline forms
KXR language files are saved as standard in the following directory:
• C:\KRC\TP\UserTech\Kxr
The user can create their own KXR language files and freely name the
module in them. If a key is used in the KFDx files, the name of the KXR
file in which the key is defined must also be specified:
• kxr_file_name#<key>
For each language into which texts are to be translated, the
corresponding key must be created in a language file. The file is
accessed using the corresponding language abbreviation.
(>>> "Language abbreviation" Page 24)
If access to the language file fails, texts are not displayed in the selected
language and the key specified in the KFDx file is shown instead.

Examples

Example of a simple user interface text


The language file TestUser.kxr is created in the directory C:\KRC\TP
\UserTech\Kxr\.
The key “LaserKey” is defined in the language file:

<?xml version="1.0" encoding="utf-8"?>


<resources xmlns="http://www.kuka.com/schemas/kxr/2009">
<module name="Test">
<uiText key="LaserKey">
<text xml:lang="de">Laser ein </text
<text xml:lang="en">Laser on </text>
</uiText>
</module>
</resources>

The key can be used in the KFDx files, e.g. as a parameter name that is
then translated:

<Param Name="TestBool" ShortName="TestUser#LaserKey"


ShortCut="LS3" Enable="False">
<Value Type="BOOL" Default="True">
<False Disp="AUS"/>
<True Disp="EIN"/>
</Value>
</Param>

Example of a message with parameter


In the KFDx file, the parameter is appended to the message key using the
pipe symbol.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 23/92


Programming KUKA.UserTech 4.0

<Script Name="SHOW_ERROR_MESSAGE"
<Message Text="TestUser#LaserIsOnMessage|%TestBool" />
</Script>

Message description in the KXR file:

<message key="LaserIsOnMessage">
<text xml:lang="de">Zustand: Laser ist an = {0} </text>
<text xml:lang="en">State: Laser is on = {0} </text>
</message>

Language abbreviation

Language Language abbreviation


Chinese zh
Danish da
German de
English en
Finnish fi
French fr
Greek el
Italian it
Japanese ja
Korean ko
Dutch nl
Polish pl
Portuguese pt
Romanian ro
Russian ru
Swedish sv
Slovak sk
Slovenian sl
Spanish es
Czech cs
Turkish tr
Hungarian hu
Vietnamese vi

6.8 Overview: programming a technology package

Step Description
1 Create a KFDx file.
(>>> 6.8.1 "Creating a KFDx file" Page 25)
2 Define the technology.
(>>> 6.8.2 "<Application>: defining a technology pack-
age" Page 26)

24/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Step Description
3 Define parameter for inline forms and parameter lists.
(>>> 6.8.3 "<Param>: defining a parameter" Page 27)
4 Define parameter lists.
(>>> 6.9 "Programming the parameter list" Page 47)
5 Define folds for inline forms.
(>>> 6.8.5 "<Fold>: defining a fold" Page 36)
6 Define inline forms.
(>>> 6.8.6 "<InlineForm>: defining an inline form"
Page 37)
7 Subprograms and functions which are to be inserted in
the program on closing an inline form must be made
available globally.
Note: Further information about programming subpro-
grams and functions is contained in the Operating and
Programming Instructions for System Integrators.
8 Program the status keys.
(>>> 6.10 "Programming status keys" Page 54)
9 Program the scripts.
(>>> 6.11 "Programming scripts" Page 62)
10 Integrate the technology into the graphical user interface.
(>>> 7.1 "Integrating inline forms and status keys into
smartHMI" Page 71)

6.8.1 Creating a KFDx file

Description

Technologies created with KUKA.UserTech 4.0 are described in KFDx files


and saved on the robot controller as standard in the following directory:
• C:\KRC\TP\UserTech\TEMPLATE

• Any editor can be used to edit the KFDx file.


• The KFDx file must be saved in XML format.
• The name of the KFDx file can be freely chosen within the conven-
tions of the Windows operating system.
• The KFDx file can contain one or more technologies.
• The name of a technology may only appear once within the system.
In the case of complex technologies, it is recommended that the KFDx
files belonging to a single technology are saved in a structured manner in
a directory of their own:
• Directory C:\KRC\TP\TPName\Template
• A key must be created in the Windows registry database for the folder
TPName.

Procedure

1. Open the registry editor and select the following path:

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 25/92


Programming KUKA.UserTech 4.0

• HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\KUKA Ro-
boter GmbH\Options\KFD
2. Right-click on the KFD folder and select New > String from the con-
text menu. A new string is created.
3. Enter the name that the TPName folder is to receive as the name of
the string.
4. Right-click on the new string and select Change... from the context
menu. The Edit String window is opened.
5. Under Value, enter the new key:
• %InstallationDir%\TP\TPName\Template
6. Confirm the key with OK.

6.8.2 <Application>: defining a technology package

Description

Define the technology package for which inline forms and/or status keys
are to be programmed.

Syntax

<Application Name="Name" SOT="Bool" SOC="Bool">


</Application>

Explanation of the syntax

Element Description
Name Name of the technology
SOT Defines whether the technology can be selected via a
list box in the inline form.

• True: selection is possible.


• False: selection is not possible.
Default, if SOT is not defined: True
SOC Defines whether the inline forms for a technology can
be selected via a list box in the inline form.

• True: selection is possible.


• False: selection is not possible.
Default, if SOC is not defined: True

Example 1

<Application Name="MyTech">
</Application>
<Application Name="OtherTech">
</Application>

The technologies MyTech and OtherTech can be selected via a list box
in the inline form.

26/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Fig. 6-1: List box for selecting a technology

Example 2

<Application Name="MyTech" SOT="False" SOC="True">


</Application>
<Application Name="OtherTech">
</Application>

The technologies MyTech and OtherTech cannot be selected via a list


box in the inline form.

Fig. 6-2: MyTech technology

6.8.3 <Param>: defining a parameter

Description

Defines a parameter for an inline form or parameter list.

Syntax

<Param Name="Name" ShortName="String" ShortCut="String"


Unit="String" Enable="Bool">
<Value Type="Type" />
</Param>

Explanation of the syntax

Element Description
Name Name of the parameter
ShortName Name that is displayed for the parameter in the inline
form
ShortCut Prefix with which the parameter value set in the inline
form is saved in the data list
Unit Unit that is displayed for the parameter in the inline
form
Enable Activate/deactivate parameter in the inline form

• True: the parameter value can be edited.


• False: the parameter value is merely displayed
and cannot be edited.
Default, if Enable is not defined: True

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 27/92


Programming KUKA.UserTech 4.0

Element Description
Value Type Type of parameter

• STATIC
(>>> 6.8.4.1 "Parameter type STATIC" Page 29)
• FREE
(>>> 6.8.4.2 "Parameter type FREE" Page 29)
• NAME
(>>> 6.8.4.3 "Parameter type NAME" Page 30)
• NUMBER
(>>> 6.8.4.4 "Parameter type NUMBER"
Page 30)
• REAL
(>>> 6.8.4.5 "Parameter type REAL" Page 31)
• LIST
(>>> 6.8.4.6 "Parameter type LIST" Page 33)
• BOOL
(>>> 6.8.4.7 "Parameter type BOOL" Page 34)

Visibility of the attributes

When an inline form is saved, the following attributes are either visible or
invisible, depending on the parameter type in the program code.
Type SHORTNAME SHORTCUT UNIT
STATIC Not visible Not visible Not visible
FREE Visible Not visible Visible
NAME Visible Not visible Visible
NUMBER Visible Not visible Visible
REAL Visible Not visible Visible
LIST Visible Not visible Not visible
BOOL Visible Not visible Not visible

Example

<Param Name="DistValue" ShortName="Distance: " Unit="mm">


<Value Type="NUMBER" Default="50" Min="0" Max="100"
Step="2" />
</Param>

An integer value from 0 to 100 can be entered. The parameter is of type


NUMBER.

Fig. 6-3: Parameter type NUMBER

The parameter value can be increased or decreased in steps of 2 using


the cursor keys on the keyboard.

28/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
6.8.4 Parameter types

6.8.4.1 Parameter type STATIC

Description

A static text is displayed in the inline form, which cannot be edited.

Syntax

<Value Type="STATIC" Default="String" />

Explanation of the syntax

Element Description
Default Text displayed in the inline form

Example

<Param Name="FieldStatic">
<Value Type="STATIC" Default="Field cannot be edited" />
</Param>

Fig. 6-4: Parameter type STATIC

6.8.4.2 Parameter type FREE

Description

A text box is displayed in the inline form. The text can be edited.

Syntax

<Value Type="FREE" Default="String" />

Explanation of the syntax

Element Description
Default Text that is displayed as standard when the inline
form is opened for the first time.
If no string is defined, the text box is empty.

Example

<Param Name="ProgrammerName" ShortName="Programmer: ">


<Value Type="FREE" Default=" Name " />
</Param>

Fig. 6-5: Parameter type FREE

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 29/92


KUKA.UserTech 4.0

6.8.4.3 Parameter type NAME


Programming

Only parameters of type NAME can be linked with a parameter list.

Description

A variable name, function name or subprogram name is displayed in the


inline form, which can be edited. The syntax of the name is checked.
The use of keywords reserved for KRL is not permitted. Further informa-
tion about keywords is contained in the “Operating and Programming In-
structions for System Integrators”.

Syntax

<Value Type="NAME" Default="String" />

Explanation of the syntax

Element Description
Default Name of the variable, function or subprogram that is
displayed as standard when the inline form is first
opened
If the last character of a name is a number (0…9),
then the number is incremented by one as standard
when the inline form is newly created. The counter is
reset if the inline form is canceled after it is opened.

Example

<Param Name="Welding-Point-Number" ShortName="Welding-Point-


Nr.: ">
<Value Type="Name" Default="WTP1" />
</Param>

Fig. 6-6: Parameter type NAME

When the inline form is first opened, the name “WPT1” is displayed by de-
fault. The next time the inline form is created, the number is incremented
by one and the value “WPT2” is displayed.

6.8.4.4 Parameter type NUMBER

Description

An integer value that can be edited is displayed in the inline form.


Range of values of the integer data type:

• -2³¹-1 … 2³¹-1
Examples:

• 1; 32; 345

30/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Syntax

<Value Type="NUMBER" Default="Default value"


Min="Minimum value" Max="Maximum value"
Step="Increment" Autolimit="Bool" />

Explanation of the syntax

Element Description
Default Parameter value that is displayed as standard when
the inline form is opened for the first time.
Default, if Default is not defined: 0
Min Minimum input value
Default, if Min is not defined: -2³¹-1
Max Maximum input value
Default, if Max is not defined: 2³¹-1
Step Increment for the cursor keys on the keyboard that
can be used for increasing and decreasing the pa-
rameter value.
Default, if Step is not defined: 0
Autolimit Automatic limitation of the parameter value

• True: if the value is too low, it is automatically set


to the minimum input value; if the value is too
high, it is automatically set to the maximum input
value.
• False: if the value entered is too low or too high,
the user is merely alerted to the fact that the val-
ue is outside the permissible range.
Default, if Autolimit is not defined: True

Example

Param Name="DistValue" ShortName="Distance: " Unit="mm">


<Value Type="NUMBER" Default="50" Min="0" Max="100"
Step="2" />
</Param>

An integer value from 0 to 100 can be entered. The parameter is of type


NUMBER.

Fig. 6-7: Parameter type NUMBER

The parameter value can be increased or decreased in steps of 2 using


the cursor keys on the keyboard.

6.8.4.5 Parameter type REAL

Description

A real value that can be edited is displayed in the inline form.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 31/92


KUKA.UserTech 4.0

Range of values of the real data type:


Programming

• +1.1E-38 … +3.4E+38
Examples:

• 1.43; 38.50; 300.25

Syntax

<Value Type="REAL" Default="Default value"


Min="Minimum value" Max="Maximum value"
Step="Increment" Autolimit="Bool" />

Explanation of the syntax

Element Description
Default Parameter value that is displayed as standard when
the inline form is opened for the first time.
Default, if Default is not defined: 0.0
Min Minimum input value
Default, if Min is not defined: +1.1E-38
Max Maximum input value
Default, if Max is not defined: +3.4E+38
Step Increment for the cursor keys on the keyboard that
can be used for increasing and decreasing the value
in the input box.
Default, if Step is not defined: 0.1
Autolimit Automatic limitation of the parameter value

• True: if the value is too low, it is automatically set


to the minimum input value; if the value is too
high, it is automatically set to the maximum input
value.
• False: if the value entered is too low or too high,
the user is merely alerted to the fact that the val-
ue is outside the permissible range.
Default, if Autolimit is not defined: True

Example

<Param Name="TimeDelay" ShortName="Delay: " Unit="sec">


<Value Type="REAL" Default="2" Min="0.5" Max="5"
Step="0.5" />
</Param>

A value from 0.5 to 5.0 can be entered.

Fig. 6-8: Parameter type REAL

The parameter value can be increased or decreased in steps of 0.5 using


the cursor keys on the keyboard.

32/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

6.8.4.6 Parameter type LIST

Programming
Description

A list box is displayed in the inline form. You can use the list to select a
parameter. The parameters in the list cannot be edited.

Syntax

<List SelectedItem="String">
<Item Key="String" Disp="String" />
<Item Key="String" Disp="String" />
...
<Item Key="String" Disp="String" />
</List>

Explanation of the syntax

Element Description
SelectedItem Parameter that is displayed as standard when the in-
line form is opened for the first time.
Key Parameter value that is processed
Note: A unique Key must be stored in the list for
each list parameter.
Disp Parameter value that is displayed
Default, if Disp is not defined: the displayed value
corresponds to the value Key.

Example 1

<Param Name="FieldList" ShortName="Weave pattern:">


<List SelectedItem="Triangle">
<Item Key="Triangle" />
<Item Key="Trapezoid" />
<Item Key="Sinus" />
</List>
</Param>

Fig. 6-9: Parameter type LIST

Example 2

<Application Name="MyTech" SOC="True">


<Param Name="FieldList" ShortName="Weave pattern:">
<List SelectedItem="Triangle">

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 33/92


Programming KUKA.UserTech 4.0

<Item Key="1" Disp="Triangle" />


<Item Key="2" Disp="Trapezoid" />
<Item Key="3" Disp="Sinus" />
</List>
</Param>
<Fold Name="MyFold">
<Line>Model = %FieldList/</Line>
</Fold>
<InlineForm Name="MyCmd" >
<FLD Name="MyFold" />
<PRM Name="FieldList" />
</InlineForm>
</Application>

Fig. 6-10: Inline form MyTech.MyCmd with parameter type LIST

The value Triangle selected in the list box WeavePattern is not the value
actually processed. In the MyFold fold, the value 3 is assigned to the
global variable Model.
KRL code in the program:

6.8.4.7 Parameter type BOOL

Description

The inline form displays a checkbox that can be activated and deactiva-
ted.

Syntax

<Value Type="BOOL" Default="Bool">


<True Disp="String" />
<False Disp="String" />
</Value>

34/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Explanation of the syntax

Element Description
Default Value of the check box that is displayed as standard
when the inline form is opened for the first time

• True: check box is activated (with check mark).


• False: check box is deactivated (without check
mark).
True Disp Text that is inserted in the program as KRL code if
the checkbox is active.
If True Disp is not defined and the check box is
active, “True” is inserted into the program by default
as KRL code.
False Disp Text that is inserted in the program as KRL code if
the check box is inactive.
If False Disp is not defined and the check box is
inactive, “False” is inserted into the program by de-
fault as KRL code.

Example

<Application Name="MyTech" SOC=True>


<Param Name="ParamList" ShortName="Val: ">
<Value Type="Name" Default="val1" />
</Param>
...
<Param Name="LaserOnOff" ShortName="Laser ">
<Value Type="BOOL" Default="True">
<True Disp="EIN" />
<False Disp="AUS" />
</Value>
</Param>
...
<Fold Name="PFold">
<Line>Model = %ParamList/</Line>
</Fold>
...
<InlineForm Name="ILF_With_ParamList" >
<FLD Name="PFold" />
<PRM Name="ParamList" />
<PRM Name="LaserOnOff" />
</InlineForm>
</Application>

Fig. 6-11: Parameter type BOOL (True)

KRL code in the program (for True):

Fig. 6-12: Parameter type BOOL (False)

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 35/92


KUKA.UserTech 4.0

KRL code in the program (for False):


Programming

6.8.5 <Fold>: defining a fold

Description

Define a fold.
For inline forms, it is possible to define folds that are inserted into the
module that is open in the editor.
Do not use control structures, such as branches and loops, in the folds!
They cannot be inserted into selected programs.

Syntax

<Fold Name="Name">
<Line>String1<Line/>
...
<Line>StringN<Line/>
</Fold>

Explanation of the syntax

Element Description
Name Name of the fold
String1 Contents of the fold lines 1 … N
… All parameter reference placeholders in a string are
replaced in the program by the values selected in the
StringN
inline form.
(>>> 6.4 "Parameter references" Page 22)

Example

<Fold Name="MyFold">
<Line>Laser(#%INLINEFORM/,%DataSet/,%Pattern/)</Line>
<Line>TRIGGER WHEN PATH=%DistanceWay/ DELAY=0 DO
LASER_ON=TRUE</Line>
</Fold>

The following values are selected in the inline form:


• DataSet = DataSet6
• DistanceWay = 210
• Pattern = STEP
• INLINEFORM = ON
KRL code in the program:

Laser(#ON,DataSet6,STEP)
TRIGGER WHEN PATH=210 DELAY=0 DO LASER_ON=TRUE

36/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
6.8.6 <InlineForm>: defining an inline form

Description

Define the inline form.


Parameters and folds can be assigned to an inline form. Furthermore,
scripts can be specified that are executed when the inline form is opened
or closed or when Touch-up is pressed.

Syntax

<InlineForm Name="Name" IlfType="Type"


Style="Format" Focus="Position" Spline="Bool"
OnAccept="Script" OnTouchup="Script" OnOpen="Script">
<FLD Name="NameFold1" />
...
<FLD Name="NameFoldN" />
<PRM Name="NameParam1" />
...
<PRM Name="NameParamN" />
</InlineForm>

Explanation of the syntax

Element Description
Name Name of the inline form
IlfType Type of inline form
Specifies whether the folds of the inline form can be
inserted into a fold with a “Spline” control structure.

• IN_SPLINE: fold can be inserted into a “Spline”


fold.
• OFF_SPLINE: fold cannot be inserted into a
“Spline” fold.
• ALL: fold can be inserted into any fold.
Default, if IlfType is not defined: OFF_SPLINE

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 37/92


Programming KUKA.UserTech 4.0

Element Description
Style Formatting of the KRL code

• WYSIWYG
(>>> 6.8.7.1 "Format type WYSIWYG" Page 42)
• SUB
(>>> 6.8.7.2 "Format type SUB" Page 42)
• DSUB
(>>> 6.8.7.3 "Format type DSUB" Page 43)
• FCT
(>>> 6.8.7.4 "Format type FCT" Page 44)
• DFCT
(>>> 6.8.7.5 "Format type DFCT" Page 45)
• ASS
(>>> 6.8.7.6 "Format type ASS" Page 46)
• ASSAGG
(>>> 6.8.7.7 "Format type ASSAGG" Page 46)
Default, if Style is not defined: WYSIWYG
Focus Number of the parameter (see element PRM Name)
that is focused on as standard when the inline form
is opened for the first time.
Precondition for this function:

• The inline form has been opened via the Com-


mands menu.
• SOT and SOC are True in the technology in
which the inline form was defined.
(>>> 6.8.2 "<Application>: defining a technology
package" Page 26)
Spline Specifies whether the inline form is interpreted as an
inline form containing a SPLINE control structure.
Whether the inline form actually contains a SPLINE
control structure is defined when the fold is created.

• True: interpretation as inline form with SPLINE


control structure
• False: interpretation as inline form without
SPLINE control structure
Default, if Spline is not defined: False
OnAccept Name of the script that is executed if the inline form
is closed with Cmd OK
(>>> 6.8.6.1 "Inline form with OnOpen and OnAccept
script" Page 41)
OnTouchup Name of the script that is executed if positions are
applied in the inline form with Touch-up
OnOpen Name of the script that is executed if the inline form
is opened with one of the following actions:

• By pressing Change
• Via the menu Commands
(>>> 6.8.6.1 "Inline form with OnOpen and OnAccept
script" Page 41)

38/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Element Description
NameFold1 Names of the folds 1 … N assigned to the inline form
… (>>> 6.8.5 "<Fold>: defining a fold" Page 36)
NameFoldN If no fold is assigned to the inline form, its contents
will be inserted into the program according to the set-
ting made under Style.
NameParam1 Names of the parameters 1 … N assigned to the in-
line form

(>>> 6.8.3 "<Param>: defining a parameter" Page 27)
NameParamN
The order in which the parameters are specified cor-
responds to the order in which they are displayed in
the inline form.

Example

In the LASER technology, inline forms for switching a laser on and off are
defined.

1 <Application Name="LASER" SOT="True" SOC="True">


2 <Param Name="DataSet" ShortName="WeldDataSet=">
3 <Value Type="NAME" Default="DataSet1" />
4 </Param>
5 <Param Name="DistanceWay" ShortName="Distance="
Unit="mm">
6 <Value Type="NUMBER" Default="200" Min="0" Max="500"
Step="10" />
7 </Param>
8 <Param Name="DelayTime" ShortName="Delay=" Unit="ms">
9 <Value Type="REAL" Default="0.8" Min="0" Max="20.3"
Step="0.3>
10 </Param>
11 <Param Name="Pattern" ShortName="WeavePattern=">
12 <List SelectedItem="">
13 <Item Disp="" Key="PULSE" />
14 <Item Disp="" Key="STEP" />
15 <Item Disp="" Key="CONT" />
16 </List>
17 </Param>
18 <Fold Name="LasOn">
19 <Line>Laser(#ON,%DataSet/,%Pattern/)</Line>
20 <Line>TRIGGER WHEN DISTANCE=%DistanceWay/ DELAY=0 DO
LASER_ON=True</Line>
21 </Fold>
22 <Fold Name="LasOff">
23 <Line>Laser(#OFF)</Line>
24 <Line>TRIGGER WHEN DISTANCE=0 DELAY=%DelayTime/ DO
LASER_ON=FALSE</Line>
25 </Fold>
26 <InlineForm Name="ON">
27 <FLD Name="LasOn" />
28 <PRM Name="DataSet" />
29 <PRM Name="DistanceWay" />
30 <PRM Name="Pattern" />
31 </InlineForm>
32 <InlineForm Name="OFF">
33 <FLD Name="LasOff" />
34 <PRM Name="DelayTime" />
35 </InlineForm>

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 39/92


Programming KUKA.UserTech 4.0

36 </Application>

Line Description
1 … 36 Definition of the technology LASER
2 … 4 Definition of the parameter DataSet
Type: NAME
5 … 7 Definition of the parameter DistanceWay
Type: NUMBER
8 … 10 Definition of the parameter DelayTime
Type: REAL
11 … 17 Definition of the Pattern parameter
Type: LIST
List of selectable parameter values:

• PULSE
• STEP
• CONT
18 … 21 Definition of the “LasOn” fold
Trigger to activate the laser
22 … 25 Definition of the “LasOff” fold
Trigger to deactivate the laser
26 … 31 Definition of the “LASER.ON” inline form for switching on
the laser
The following fold is assigned to the inline form:

• LasOn
The following parameters can be set in the inline form:

• DataSet
• DistanceWay
• Pattern
32 … 35 Definition of the “LASER.OFF” inline form for switching off
the laser
The following fold is assigned to the inline form:

• LasOff
The following parameter can be set in the inline form:

• DelayTime

40/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Inline form LASER.ON

Fig. 6-13: Inline form LASER.ON

Inline form LASER.OFF

Fig. 6-14: Inline form LASER.OFF

6.8.6.1 Inline form with OnOpen and OnAccept script

Description

An OnOpen script is executed if the inline form is opened via the Com-
mands menu or by pressing Change.
An OnAccept script is executed if the inline form is closed with Cmd OK.

KFDx file

1 <Application Name="TestScript">
2 <Script Name="OpenTest">
3 <Message Text="Fired when ILF is opened!" />
4 </Script>
5 <Script Name="CloseTest">
6 <Message Text="Fired when ILF is closed!" />
7 <Do Script="AcceptInlineForm" />
8 </Script>
9 <Fold Name="TestFold">
10 <Line>/;only for testing OnOpen event</Line>
11 </Fold>
12 <InlineForm Name="TestIlf" OnOpen="OpenTest"
OnAccept="CloseTest">
13 <FLD Name="TestFold" />
14 </InlineForm>
15 </Application>

Line Description
2 … 4 Definition of the OnOpen script which is to be executed on
opening the inline form
5 … 7 Definition of the OnAccept script which is to be executed on
closing the inline form
12 … 14 Definition of the inline form

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 41/92


Programming KUKA.UserTech 4.0

6.8.7 Format types

6.8.7.1 Format type WYSIWYG

Description

The formatting of the KRL code corresponds exactly to the text of the in-
line form.

Example

<Application Name="Laser">
<Param Name="Fieldlist" ShortName="Weave pattern: ">
<List SelectedItem="Triangle">
<Item Key="Triangle" />
<Item Key="Trapezoid" />
<Item Key="Sinus" />
</List>
</Param>
<Param Name="Fieldname" ShortName="WeldDataSet: ">
<Value Type="Name" Default="DataSet1" />
</Param
<Param Name="DistanceWay" ShortName="Distance: " Unit="mm">
<Value Type="NUMBER" Default="200" Min="0" Max="500" />
</Param>
<InlineForm Name="On" >
<PRM Name="Fieldname" />
<PRM Name="DistanceWay" />
<PRM Name="Fieldlist" />
</InlineForm>
<InlineForm Name="Off" />
</Application>

Fig. 6-15: Inline form Laser.On

KRL code in the program:

6.8.7.2 Format type SUB

Description

The formatting of the KRL code corresponds to a subprogram call.


• The parameters are reduced to the contents of the boxes, separated
by commas and contained within brackets.
• The dot separating the name of the technology and the name of the
inline form is suppressed.

Example

<Application Name="Laser">
<Param Name="Fieldlist" ShortName="Weave pattern: ">
<List SelectedItem="Triangle">

42/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
<Item Key="Triangle" />
<Item Key="Trapezoid" />
<Item Key="Sinus" />
</List>
</Param>
<Param Name="Fieldname" ShortName="WeldDataSet: ">
<Value Type="Name" Default="DataSet0" />
</Param>
<Param Name="DistanceWay" ShortName="Distance: " Unit="mm">
<Value Type="NUMBER" Default="200" Min="0" Max="500" />
</Param>
<InlineForm Name="On" Style="SUB">
<PRM Name="Fieldname" />
<PRM Name="DistanceWay" />
<PRM Name="Fieldlist" />
</InlineForm>
<InlineForm Name="Off" />
</Application>

Fig. 6-16: Inline form Laser.On

KRL code in the program:

6.8.7.3 Format type DSUB

Description

The formatting of the KRL code corresponds to a subprogram call.


• The parameters are reduced to the contents of the boxes, separated
by commas and contained within brackets.
• The dot separating the name of the technology and the name of the
inline form is suppressed.
• Parameter names and units are inserted as a comment.

Example

<Application Name="Laser">
<Param Name="Fieldlist" ShortName="Weave pattern: ">
List SelectedItem="Triangle">
<Item Key="Triangle" />
<Item Key="Trapezoid" />
<Item Key="Sinus" />
</List>
</Param>
<Param Name="Fieldname" ShortName="WeldDataSet: ">
<Value Type="Name" Default="DataSet0" />
</Param>
<Param Name="DistanceWay" ShortName="Distance: " Unit="mm">
<Value Type="NUMBER" Default="200" Min="0" Max="500" />
</Param>
<InlineForm Name="On" Style="DSUB">

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 43/92


Programming KUKA.UserTech 4.0

<PRM Name="Fieldname" />


<PRM Name="DistanceWay" />
<PRM Name="Fieldlist" />
</InlineForm>
<InlineForm Name="Off" />
</Application>

Fig. 6-17: Inline form Laser.On

KRL code in the program:

6.8.7.4 Format type FCT

Description

The formatting of the KRL code corresponds to a function call:


• Irrespective of its format, the value of the first parameter is used as
the name of the function.
• The following parameters are reduced to the contents of the boxes,
separated by commas and contained within brackets.
• The dot separating the name of the technology and the name of the
inline form is suppressed.
• An equals sign is inserted between the inline form name and the pa-
rameter list.

Example

<Application Name="Laser">
<Param Name="Fieldlist" ShortName="Weave pattern: ">
<List SelectedItem="Triangle">
<Item Key="3" Disp="Triangle" />
<Item Key="Trapezoid" />
<Item Key="Sinus" />
</List>
</Param>
<Param Name="Fieldname" ShortName="WeldDataSet: ">
<Value Type="Name" Default="DataSet0" />
</Param>
<Param Name="DistanceWay" ShortName="Distance: " Unit="mm">
<Value Type="NUMBER" Default="200" Min="0" Max="500" />
</Param>
<InlineForm Name="On" Style="FCT">
<PRM Name="Fieldname" />
<PRM Name="DistanceWay" />
<PRM Name="Fieldlist" />
</InlineForm>
<InlineForm Name="Off" />
</Application>

44/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Fig. 6-18: Inline form Laser.On

KRL code in the program:

6.8.7.5 Format type DFCT

Description

The formatting of the KRL code corresponds to a function call:


• Irrespective of its format, the value of the first parameter is used as
the name of the function.
• The following parameters are reduced to the contents of the boxes,
separated by commas and contained within brackets.
• The dot separating the name of the technology and the name of the
inline form is suppressed.
• An equals sign is inserted between the inline form name and the pa-
rameter list.
• Parameter names and units are inserted as a comment.

Example

<Application Name="Laser">
<Param Name="Fieldlist" ShortName="Weave pattern: ">
<List SelectedItem="Triangle">
<Item Key="3" Disp="Triangle" />
<Item Key="Trapezoid" />
<Item Key="Sinus" />
</List>
</Param>
<Param Name="Fieldname" ShortName="WeldDataSet: ">
<Value Type="Name" Default="DataSet0" />
</Param>
<Param Name="DistanceWay" ShortName="Distance: " Unit="mm">
<Value Type="NUMBER" Default="200" Min="0" Max="500" />
</Param>
<InlineForm Name="On" Style="DFCT">
<PRM Name="Fieldname" />
<PRM Name="DistanceWay" />
<PRM Name="Fieldlist" />
</InlineForm>
<InlineForm Name="Off" />
</Application>

Fig. 6-19: Inline form Laser.On

KRL code in the program:

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 45/92


KUKA.UserTech 4.0

6.8.7.6 Format type ASS


Programming

Description

The formatting of the KRL code corresponds to an assignment:


• The parameters are reduced to the contents of the fields and separa-
ted by commas.
• The dot separating the name of the technology and the name of the
inline form is suppressed.
• An equals sign is inserted between the inline form name and the pa-
rameter list.

Example

<Application Name="Laser">
<Param Name="Fieldlist" ShortName="Weave pattern: ">
<List SelectedItem="Triangle">
<Item Key="3" Disp="Triangle" />
<Item Key="Trapezoid" />
<Item Key="Sinus" />
</List>
</Param>
<Param Name="Fieldname" ShortName="WeldDataSet: ">
<Value Type="Name" Default="DataSet0" />
</Param>
<Param Name="DistanceWay" ShortName="Distance: " Unit="mm">
<Value Type="NUMBER" Default="200" Min="0" Max="500" />
</Param>
<InlineForm Name="On" Style="ASS">
<PRM Name="Fieldname" />
<PRM Name="DistanceWay" />
<PRM Name="Fieldlist" />
</InlineForm>
<InlineForm Name="Off" />
</Application>

Fig. 6-20: Inline form Laser.On

KRL code in the program:

6.8.7.7 Format type ASSAGG

Description

The formatting of the KRL code corresponds to an aggregate assignment:


• The parameters are reduced to the parameter name and the content
of the fields.
• The parameters are separated by commas and enclosed in braces.
• The dot separating the name of the technology and the name of the
inline form is suppressed.

46/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
• An equals sign is inserted between the inline form name and the pa-
rameter list.

Example

<Application Name="SEARCH">
<Param Name="XDir" ShortName="X=" Unit="mm">
<Value Type="NUMBER" Default="1" />
</Param>
<Param Name="YDir" ShortName="Y=" Unit="mm">
<Value Type="NUMBER" Default="1" />
</Param>
<Param Name="ZDir" ShortName="Z=" Unit="mm">
<Value Type="NUMBER" Default="1" />
</Param>
<InlineForm Name="Direction" Style="ASSAGG">
<PRM Name="XDir" />
<PRM Name="YDir" />
<PRM Name="ZDir" />
</InlineForm>
</Application>

Fig. 6-21: Inline form SEARCH.Direction

KRL code in the program:

6.9 Programming the parameter list

Description

A parameter list contains a data set with different parameters. This data
set is displayed in an option window on the KUKA.smartHMI. The struc-
ture and the properties of the data set must be programmed.

Overview

Step Description
1 Define the parameters of the parameter list.
(>>> 6.8.3 "<Param>: defining a parameter" Page 27)
2 Define a data set structure.
(>>> 6.9.1 "<Param Name="PL_">: defining the data set
structure for a parameter list" Page 48)
3 Define the structure data set and default data set in
$config.dat.
(>>> 6.9.3 "Defining the structure data type" Page 49)
4 Define the parameter list and assign it to a parameter of
type NAME.
(>>> 6.9.2 "<PList>: defining a parameter list" Page 48)

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 47/92


Programming KUKA.UserTech 4.0

Example

(>>> 6.9.4 "MyTech technology" Page 50)

6.9.1 <Param Name="PL_">: defining the data set structure for a parameter
list

Description

Define the data set structure for a parameter list.

Syntax

<Param Name="PL_Name" ShortName="String" ShortCut="String"


Unit="String" Var="String">
<Value Type="FREE" Default="_" />
</Param>

Explanation of the syntax

Element Description
Name="PL_Name" Name of the data set
(>>> 6.9.2 "<PList>: defining a parameter list" Page 48)
ShortName Name of the data set that is displayed in the option window
on the smartHMI
ShortCut Name of the structure data type of the data set
(>>> 6.9.3 "Defining the structure data type" Page 49)
Unit Prefix of the default data set
(>>> 6.9.3 "Defining the structure data type" Page 49)
Var System name of the data set
<Value Type="FREE" Placeholder for the default values of the data set
Default="_" />
(>>> 6.9.3 "Defining the structure data type" Page 49)

6.9.2 <PList>: defining a parameter list

Description

Define the parameter list and assign it to a parameter of type NAME.

Syntax

<PList Name="Name" Param="IlfParamName">


<Val>NameParam1</Val>
...
<Val>NameParamN</Val>
</PList>

48/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Explanation of the syntax

Element Description
Name Name of the data set
(>>> 6.9.1 "<Param Name="PL_">: defining the data
set structure for a parameter list" Page 48)
Param Name of the parameter in the inline form to which the
data set is linked
Note: Only parameters of type NAME can be linked
with a parameter list.
NameParam1 Names of parameters 1 ... N of the data set
… The order in which the parameters are specified cor-
responds to the order in which they are displayed in
NameParamN
the option window.
The layout and range of values of the parameters
must be defined with <Param>.
(>>> 6.8.3 "<Param>: defining a parameter" Page 27)

6.9.3 Defining the structure data type

Description

The structure data type of a data set and the default values of the struc-
ture data type must be defined in the file $config.dat.
Directory C:\KRC\ROBOTER\KRC\R1\SYSTEM
File $config.dat

• Fold USER GLOBALS


• Section “Userdefined Types” in the fold

Syntax

Structure data type:

• STRUC Name
Type1 StructureNameParam1,
…,
TypeN StructureNameParamN
Default values:

• DECL Name PrefixDEFAULT=


{StructureNameParam1 Default1,
…,
StructureNameParamN DefaultN}

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 49/92


Programming KUKA.UserTech 4.0

Explanation of the syntax

Element Description
Name Name of the structure data type
(>>> 6.9.1 "<Param Name="PL_">: defining the
data set structure for a parameter list"
Page 48)
Type1 … TypeN Data types of the parameters of the data set

• INT
• REAL
• BOOL
StructureNamePar- Structure names of the parameters of the data
am1, set
…,
StructureNameParam1
Prefix Prefix of the default data set
(>>> 6.9.1 "<Param Name="PL_">: defining the
data set structure for a parameter list"
Page 48)
Default1 … DefaultN Default values of the parameters of the data
set
The default values are freely selectable.

6.9.4 MyTech technology

KFDx file

1 <Application Name="MyTech" SOT="True" SOC="True">


2 <Param Name="ParamList" ShortName="Val: ">
3 <Value Type="NAME" Default="val1" />
4 </Param>
5 <Param Name="LSR_MAX_PWR" ShortName="Maximum Power"
ShortCut="MAXP" Unit="W">
6 <Value Type="NUMBER" Default="2000" Min="0"
Max="20000" Step="100" Autolimit="True" />
7 </Param>
8 <Param Name="LSR_MIN_PWR" ShortName="Minimum Power"
ShortCut="MINP" Unit="W">
9 <Value Type="NUMBER" Default="2000" Min="0"
Max="20000" Step="100" Autolimit="True" />
10 </Param>
11 <Param Name="LSR_PRG" ShortName="Laser Program"
ShortCut="PRG>
12 <Value Type="NUMBER" Default="1" Min="1" Max="79"
Step="1" Autolimit="True" />
13 </Param>
14 <Param Name="SNSR_PRG" ShortName="Sensor Program"
ShortCut="PREC">
15 <Value Type="NUMBER" Default="1" Min="0" Max="3"
Step="1" Autolimit="True" />
16 </Param>
17 <Param Name="GAS_PRESSURE" ShortName="Cutting Gas"
ShortCut="GAS" Unit="bar">
18 <Value Type="NUMBER" Default="2" Min="0" Max="8"
Step="1" Autolimit="True" />
19 </Param>

50/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
20 <Param Name="GAS_PRE_FLOW" ShortName="PRE Flow Time"
ShortCut="PRE" Unit="ms">
21 <Value Type="NUMBER" Default="0" Min="0" Max="5000"
Step="100" Autolimit="True" />
22 </Param>
23 <Param Name="GAS_POST_FLOW" ShortName="POST Flow Time"
ShortCut="POST" Unit="ms">
24 <Value Type="NUMBER" Default="0" Min="0" Max="5000"
Step="100" Autolimit="True" />
25 </Param>
26 <Param Name="LSR_DLY" ShortName="Piercing Time"
ShortCut="LSR" Unit="ms">
27 <Value Type="NUMBER" Default="0" Min="0" Max="5000"
Step="100" Autolimit="True" />
28 </Param>
29 <Param Name="TestBool" ShortName="Laser" ShortCut="LS3">
30 <Value Type="BOOL" Default="True">
31 <False Disp="AUS" />
32 <True Disp="EIN" />
33 </Value>
34 </Param>
35 <Param Name="PL_LsrTool" ShortName="PLTOOL"
ShortCut="LT" Unit="TOOL" Var="LSC_TOOL_TYP">
36 <Value Type="FREE" Default="_" />
37 </Param>
38 <Fold Name="MyFold">
39 <Line>/;test</Line>
40 </Fold>
41 <Fold Name="PFold">
42 <Line>/;ParamList</Line>
43 </Fold>
44 <Fold Name="SPL_FOLD">
45 <Line>/;Spline Fold</Line>
46 </Fold>
47 <PList Name="LsrTool" Param="ParamList">
48 <Val>LSR_MAX_PWR</Val>
49 <Val>LSR_MIN_PWR</Val>
50 <Val>LSR_PRG</Val>
51 <Val>SNSR_PRG</Val>
52 <Val>GAS_PRESSURE</Val>
53 <Val>GAS_PRE_FLOW</Val>
54 <Val>GAS_POST_FLOW</Val>
55 <Val>LSR_DLY</Val>
56 </PList>
57 <InlineForm Name="MyCmd">
58 <FLD Name="MyFold" />
59 </InlineForm>
60 <InlineForm Name="ILF_With_ParamList">
61 <FLD Name="PFold" />
62 <PRM Name="ParamList" />
63 <PRM Name="TESTBOOL" />
64 </InlineForm>
65 </Application>

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 51/92


Programming KUKA.UserTech 4.0

Line Description
1 … 65 Definition of the technology MyTech
2 … 4 Definition of the parameter ParamList
Type: NAME
This parameter is used to call a parameter list with a laser
data set in the inline form.
Note: Only parameters of type NAME can be linked with a
parameter list.
5 … 28 Definition of the parameters of the laser data set
Type: NUMBER

• LSR_MAX_PWR (Maximum Power)


• LSR_MIN_PWR (Minimum Power)
• LSR_PRG (Laser Program)
• SNSR_PRG (Sensor Program)
• GAS_PRESSURE (Cutting Gas)
• GAS_PRE_FLOW (PRE Flow Time)
• GAS_POST_FLOW (POST Flow Time)
• LSR_DLY (Piercing Time)
29 … 34 Definition of the parameter TestBool
Type: BOOL
Check box for switching the laser water on/off
35 … 37 Definition of the data set structure for the parameter list
The structure data type LSC_TOOL_TYP and the default
values of the structure data type must be defined in $con-
fig.dat. Section “Userdefined Types” in the USER GLOBALS
fold.
38 … 46 Definition of the folds
47 … 56 Definition of the parameter list for the laser data set
48 … 55 List with the parameters of the laser data set
The order of the parameters in the list corresponds to the
order in which they are displayed in the option window.
57 … 59 Definition of the inline form MyCmd
60 … 64 Definition of the inline form ILF_With_ParamList

$config.dat

The structure data type LSC_TOOL_TYP and the default values of the
structure data type must be defined in $config.dat.
Section “Userdefined Types” in the USER GLOBALS fold:

STRUC LSC_TOOL_TYP INT LSR_MAX_PWR,INT LSR_MIN_PWR,INT


LSR_Prg, REAL SNSR_Prg,INT SNSR_State,REAL GAS_Pressure,
INT LSR_Dly,INT GAS_Pre_Flow,INT GAS_Post_Flow

DECL LSC_TOOL_TYP LTDEFAULT = {LSR_MAX_PWR 500,LSR_MIN_PWR


50,LSR_Prg 1, SNSR_Prg 1.0,SNSR_State 0,GAS_Pressure 1.0,
LSR_Dly 100,GAS_Pre_Flow 0,GAS_Post_Flow 0}

52/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Inline form

Fig. 6-22: Inline form MyTech.ILF_With_ParamList

Item Description
1 Name of the technology
2 List box containing the inline forms of the technology package

• MyCmd
• ILF_With_ParamList
3 Name of the laser data set
The arrow is used to call the parameter list with the laser data
set.
4 Check box for switching the laser water on/off

Parameter list

The parameters of the laser data set are set in the PLTOOL option win-
dow.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 53/92


Programming KUKA.UserTech 4.0

Fig. 6-23: Option window PLTOOL

A View A 4 SNSR_PRG
B View B 5 GAS_PRESSURE
1 LSR_MAX_PWR 6 GAS_PRE_FLOW
2 LSR_MIN_PWR 7 GAS_POST_FLOW
3 LSR_PRG 8 LSR_DLY

6.10 Programming status keys

Description

Functions can be assigned to the 4 status keys on the left-hand side of


the smartPAD.

54/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Overview

Step Description
1 Define the status keys.
(>>> 6.10.1 "<StatKey>: defining a status key" Page 55)
2 Define the status key bar.
(>>> 6.10.2 "<StatkeyBar>: defining a status key bar"
Page 61)
3 Define scripts that are to be executed in the case of user
actions, e.g. press, release or hold down status key.
(>>> 6.11 "Programming scripts" Page 62)

6.10.1 <StatKey>: defining a status key

Description

Define a status key.


In addition to the format and layout of a status key, it is also possible to
define the conditions under which it is to be active, e.g. only in a specific
operating mode or if an enabling switch is pressed.
Furthermore, scripts can be specified that are to be executed if the status
key is pressed, released or held down, or if the status key is called via
the main menu.

Syntax

<StatKey Name="Name" Enable="Bool" UserMode="IdNumber"


Style="Format" Next="Name">
<Picture Default="String" KeyDown="String"
KeyDownMinus="String" />
<Text Top="String" Center="String" Bottom="String" />
<Needs SafetySwitch="Bool" DrivesOk="Bool"
Prostate0="Activation value" Prostate="Activation value"
ModeOp="Activation value" />
<Scripts OnKeyDown="Script" OnKeyUp="Script"
OnKeyShow="Script" OnKeyDownMinus="Script"
OnKeyUpMinus="Script" OnKeyRepeat="Script"
OnKeyRepeatMinus="Script" />
</StatKey>

Explanation of the syntax

<StatKey>
Element Description
Name Name of the status key
Enable Activation/deactivation of a status key

• True: status key is activated.


• False: status key is deactivated.
Default, if Enable is not defined: True

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 55/92


Programming KUKA.UserTech 4.0

Element Description
UserMode Identification number of the lowest user group for
which the status key is active.

• 0: active in every user group


• 10: User
• 20: Expert
• 30: Administrator
Default, if UserMode is not defined: 0
Style Format of the status key

• #SWITCH
Single status key
One key is assigned to a single status key. The
key always has the PLUS function.
• #TOGGLE
Double status key
2 keys are assigned to a double status key. The
top key takes the PLUS function. The bottom key
takes the MINUS function.
Default, if Style is not defined: #SWITCH
Next Name of the next status key
<Picture />
Element Description
Default Path for the graphic displayed next to the status key
on the side panel of the smartHMI
KeyDown Path for the graphic displayed next to the status key
on the side panel of the smartHMI if the key with the
PLUS function is pressed
KeyDownMinus Path for the graphic displayed next to the status key
on the side panel of the smartHMI if the key with the
MINUS function is pressed
(>>> 6.10.1.1 "Image sizes" Page 58)
(>>> 6.10.1.2 "Layout" Page 59)
<Text />
Element Description
Top Text displayed next to the status key on the side pan-
el of the smartHMI (top)
Center Text displayed next to the status key on the side pan-
el of the smartHMI (centered)
Bottom Text displayed next to the status key on the side pan-
el of the smartHMI (bottom)
<Needs />

56/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Element Description
SafetySwitch Activation of status key with enabling switch

• True: status key is active if the enabling switch is


pressed.
• False: status key does not require a pressed en-
abling switch for activation.
DrivesOk Activation of the status key on switching on the drives

• True: status key is active if the drives are switch-


ed on.
• False: status key does not require activated
drives for activation.
Prostate0 Status key is active dependent on the operating state
of the submit interpreter.

• Free (2)
• Stop (4)
• Reset (8)
• End (16)
• Active (32)
If the status key is to be active in more than one op-
erating state, the values can be arranged consecu-
tively using the linking character “|”, e.g. Stop|End.
Default, if Prostate0 is not defined: status key is
active if a submit interpreter is running (= state Ac-
tive).
Note: An operating state can also be specified as a
decimal value and multiple operating states as added
decimal values, e.g. Stop|End = 20 (= 4+16).
Prostate Status key is active dependent on the operating state
of the robot interpreter.

• Free (2)
• Stop (4)
• Reset (8)
• End (16)
• Active (32)
If the status key is to be active in more than one op-
erating state, the values can be arranged consecu-
tively using the linking character “|”, e.g. Stop|End.
Default, if Prostate is not defined: status key is ac-
tive if a robot interpreter is not running (= state Free|
Stop|Reset|End).
Note: An operating state can also be specified as a
decimal value and multiple operating states as added
decimal values, e.g. Stop|End = 20 (= 4+16).

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 57/92


Programming KUKA.UserTech 4.0

Element Description
ModeOp Status key is active dependent on the operating
mode.

• T1 (1)
• T2 (2)
• Aut (4)
• Ext (8)
If the status key is to be active in more than one op-
erating mode, the values can be arranged consecu-
tively using the linking character “|”, e.g. T1|T2.
Default, if ModeOp is not defined: status key is active
in T1, T2 and AUT (= state T1|T2|AUT).
Note: An operating mode can also be specified as a
decimal value and multiple operating modes as add-
ed decimal values, e.g. T1|T2 = 3 (= 1+2).
<Scripts />
Element Description
OnKeyDown Name of the script that is run when the key with the
PLUS function is pressed
OnKeyUp Name of the script that is run when the key with the
PLUS function is released
OnKeyShow Name of the script that is run when the key is called
via the main menu
OnKeyDown Name of the script that is run when the key with the
Minus MINUS function is pressed
OnKeyUpMinus Name of the script that is run when the key with the
MINUS function is released
OnKeyRepeat Name of the script that is run when the key with the
PLUS function is held down for longer
The script is repeatedly triggered until the key is re-
leased. The interval between repetitions becomes
shorter and shorter.
OnKeyRepeat Name of the script that is run when the key with the
Minus MINUS function is held down for longer
The script is repeatedly triggered until the key is re-
leased. The interval between repetitions becomes
shorter and shorter.

6.10.1.1 Image sizes

For the graphics, icons (*.ICO), bitmaps (*.BMP) or portable network


graphics (*.PNG) can be used. The use of icons is recommended.
The following image sizes are required:

• 32 x 32 pixels for a single status key (#SWITCH)


• 32 x 96 pixels for a double status key (#TOGGLE)

58/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

6.10.1.2 Layout

Programming
The specifications described here must be observed to ensure that the
graphics are optimally displayed next to the status keys on the smartHMI.

Single status key (#SWITCH)

The graphic must be centered in a 32 x 32 pixel frame.

Fig. 6-24: Single status key – Center graphic

Fig. 6-25: Single status key – Layout example

1 Graphic with white background


2 Graphic with transparent or gray background

Double status key (#TOGGLE)

A graphic of 32 x 96 pixels is broken down into 3 blocks of equal height


(32 x 32 pixels). These blocks are displayed separately on the smartHMI.
The graphic, that is to be displayed in a single block, must be centered.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 59/92


Programming KUKA.UserTech 4.0

Fig. 6-26: Double status key – Center graphic

1 Graphic at top 3 Graphic at bottom


2 Graphic centered (optional)

Fig. 6-27: Double status key – Layout example

1 Graphic with white background


2 Graphic with transparent or gray background

Background Color

If the graphic used has a background color that differs from that of the
smartHMI, this background is visible on the smartHMI.
If only the icon, and not the surrounding area, is to be visible on the
smartHMI, the following options are available depending on the specific
file type:
• Graphic of type *.ICO or *.PNG:
Define areas around the icon as transparent areas.
• Graphic of type *.BMP:
Color the area around the icon the same gray color as the smartHMI:
‒ Gray in RGB: R:160, G:165, B:170

60/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
6.10.2 <StatkeyBar>: defining a status key bar

Description

Define the status key bar.


A status key bar may contain up to 4 status keys.

Syntax

<StatkeyBar Name="Name">
<SK Name="Name1" Pos="Number" />
...
<SK Name="Name4" Pos="Number" />
</StatkeyBar>

Explanation of the syntax

Element Description
Name Name of the status key bar
Note: The name of the status key bar must be unam-
biguous for all technology packages.
Name1 Names of status keys 1 … 4
… (>>> 6.10.1 "<StatKey>: defining a status key"
Page 55)
Name4
If Pos is not defined for any of the status keys, the
order in which the status keys are specified here cor-
responds to the sequence in which they are dis-
played (from top to bottom).
Pos Position of the status key

• 1 … 4
If, for example, Pos=3 is defined for the first
specified status key, it will be assigned to the third
status key from the top. Assuming that Pos is not de-
fined for the next status key, it will be assigned to the
next free position starting with the first status key
from the top.

6.10.3 <Set>: setting a status key or status key bar

Description

Sets a status key or status key bar.


A status key or status key bar can be set, for example, to allow subse-
quent modification of the graphic or text displayed next to the status key
on the side panel of the smartHMI.
The command can be used inside and outside scripts. Within scripts, pla-
ceholders that have had their value assigned before execution of the
script are allowed, e.g. %INLINEFORM.

Syntax

Setting a status key:


<Set Name="Name" Enable="Bool" UserMode="IdNumber"
Style="Format" Next="Name">

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 61/92


Programming KUKA.UserTech 4.0

<Picture Default="String" KeyDown="String"


KeyDownMinus="String" />
<Text Top="String" Center="String" Bottom="String" />
<Needs SafetySwitch="Bool" DrivesOk="Bool"
Prostate0="Activation value" Prostate="Activation value"
ModeOp="Activation value" />
<Scripts OnKeyDown="Script" OnKeyUp="Script"
OnKeyShow="Script" OnKeyDownMinus="Script"
OnKeyUpMinus="Script" OnKeyRepeat="Script"
OnKeyRepeatMinus="Script" />
</Set>
Setting a status key bar:
<Set Name="Name">
<SK Name="Name1" />
...
<SK Name="Name4" />
</Set>

Explanation of the syntax

Element Description
Name Name of the status key or status key bar that is to
be set
Once the name has been set, all attributes of the sta-
tus key or status key bar can be redefined.
(>>> 6.10.1 "<StatKey>: defining a status key"
Page 55)
(>>> 6.10.2 "<StatkeyBar>: defining a status key bar"
Page 61)

6.11 Programming scripts

6.11.1 <Script>: defining a script

Scripts must not be nested.

Description

Define a script.
Scripts can be defined for inline forms and status keys. These scripts can
be used to perform the following actions:
• Create KRL variables
• Read and write KRL variables
• Read and set the state of outputs
• Read and set the state of inputs
• Generate messages
• Generate user dialogs

Syntax

<Script Name="Name">

62/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Actions

Programming
</Script>

Explanation of the syntax

Element Description
Name Name of the script to be called
Actions Actions to be executed with the script
(>>> 6.11.2 "<SetVar…/>: setting a variable"
Page 63)
(>>> 6.11.3 "<ShowVar…/>: reading a variable"
Page 64)
(>>> 6.11.4 "<Redecl…/>: creating or overwriting a
variable" Page 64)
(>>> 6.11.5 "<Do Script…/>: executing a script"
Page 65)
(>>> 6.11.6 "<Message…/>: defining a message"
Page 66)
(>>> 6.11.7 "<Switch Dialog ="FALSE"…>: requesting
a variable and executing a script" Page 67)
(>>> 6.11.8 "<Switch Dialog ="TRUE"...>: displaying a
dialog and executing a script" Page 70)

6.11.2 <SetVar…/>: setting a variable

Description

Set variable.
The value of a variable can be modified within a script.

Syntax

<SetVar Fullpath="String" Value="String" />

Explanation of the syntax

Element Description
Fullpath Name of the variable to be set.
The parameter reference placeholders in the string
are replaced by the current values. The string is inter-
preted as a variable name with path specification.
Value Value of the variable to be set.
The parameter reference placeholders in the string
are replaced by the current values. The string is inter-
preted as a target value.

Example

<Application Name="MyTech">
<Script Name="Example">
<SetVar Fullpath="$OUT[20]" Value="True" />
</Script>
</Application>

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 63/92


KUKA.UserTech 4.0

After running the script, the following applies:


Programming

• $OUT[20]==True

6.11.3 <ShowVar…/>: reading a variable

Description

Read a variable.
The value of a variable can be read within a script.

Syntax

<ShowVar Fullpath="String" Param="Name" />

Explanation of the syntax

Element Description
Fullpath Name of the variable to be read.
The parameter reference placeholders in the string
are replaced by the current values. The string is inter-
preted as a variable name with path specification.
Param Name of the parameter into which the read value is
to be written

Example

<Application Name="MyTech">
<Param Name="MyParam">
<Value Type="FREE" Default=""/>
</Param>
<Script Name="Example">
<ShowVar Fullpath="$MODE_OP" Param="MyParam" />
<Message Text="$MODE_OP=%MyParam/" />
</Script>
</Application>

After execution of the script with a program selected in T1 mode, the fol-
lowing message is displayed in the message window:
• $MODE_OP=#T1

6.11.4 <Redecl…/>: creating or overwriting a variable

Description

Create or overwrite a variable.


A local or global variable can be created or overwritten within a script.

Syntax

<Redecl Global="Bool" Path="String" Declaration="String" />

64/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Explanation of the syntax

Element Description
Global Scope of the variable

• True: variable is valid globally.


Global variables are written to the file Glob-
al_Points.Dat.
• False: variable is only valid locally.
Default, if Global is not defined: False
Path Path name of the variable
The parameter reference placeholders in the string
are replaced by the current values. The string is inter-
preted as a variable name with path specification.
Declaration Declaration of the variables
The parameter reference placeholders in the string
are replaced by the current values. The string is inter-
preted as a target value.

Example

An axis position is declared in a script.

<Script Name="Example">
<Redecl Path="%MODULE/" Declaration=
"DECL AXIS AnyPoint = {A1 09, A2 -90, A3 90, A4 0, A5 0,
A6 0}" />
</Script>

If the script is executed in a program, the declaration is written to the data


list of the program.

DEFDAT TEST
EXTERNAL DECLARATIONS
DECL AXIS AnyPoint={A1 9.00000, A2 -90.00000, A3 90.00000,
A4 0.0, A5 0.0, A6 0.0}
ENDDAT

6.11.5 <Do Script…/>: executing a script

Description

Execute script.

Syntax

<Do Script="Name" />

Explanation of the syntax

Element Description
Script Name of the script to be executed
(>>> 6.11.1 "<Script>: defining a script" Page 62)

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 65/92


KUKA.UserTech 4.0

6.11.5.1 Predefined scripts


Programming

Name Description
ACCEPTINLINEFORM Only usable with OnAccept scripts
The inline form is closed and the modified parameters are ap-
plied.
(>>> 6.8.6 "<InlineForm>: defining an inline form" Page 37)
CANCELINLINEFORM Only usable with OnAccept scripts
The inline form is closed and the modified parameters are not
applied.
(>>> 6.8.6 "<InlineForm>: defining an inline form" Page 37)
END The currently running script is aborted.
NOTHING Placeholder for script

6.11.6 <Message…/>: defining a message

Description

Define a message.
A message that is displayed in the message window of the KUKA smartH-
MI can be defined within a script.

Syntax

<Message Text="String" />

Explanation of the syntax

Element Description
Text Message to be displayed
The parameter reference placeholders in the string
are replaced by the current values. The string is used
as a key in the language file with the texts to be
translated.
(>>> 6.7 "Language files" Page 23)

Example

<Application Name="MyTech">
<Param Name="MyParam">
<Value Type="FREE" Default=""/>
</Param>
<Script Name="Example">
<ShowVar Fullpath="$MODE_OP" Param="MyParam" />
<Message Text="$MODE_OP=%MyParam/" />
</Script>
</Application>

After execution of the script with a program selected in T1 mode, the fol-
lowing message is displayed in the message window:
• $MODE_OP=#T1

66/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
6.11.7 <Switch Dialog ="FALSE"…>: requesting a variable and executing a
script

Description

Requests a variable and executes a script.


Calls one of several possible scripts, depending on the polling of a varia-
ble. The Case line which result corresponds to the variable is selected.
Once the corresponding script has been executed, the program is re-
sumed.
If there is no result corresponding to the variable, the Else line is
selected. If this is not present, or no script has been defined, no script is
executed and the program is resumed.
<Switch Dialog> statements must not be nested.

Syntax

<Switch Dialog="FALSE" Condition="String">


<Case Value="String1" Do="Script1" />
...
<Case Value="StringN" Do="ScriptN" />
<Else Do="ScriptElse" />
</Switch>

Explanation of the syntax

Element Description
Condition Name of the variable to be polled
The parameter reference placeholders in the string
are replaced by the current values. The string is inter-
preted as a variable name with path specification.
The following keywords can be used with a Switch
statement in an OnOpen script:

• IsChange
Various different scripts can be executed, depend-
ing on how the inline form is opened:
‒ Case Value="True":
The script specified here is executed if the in-
line form was opened by pressing Change.
‒ Case Value="False":
The script specified here is executed if the in-
line form was opened via the Commands
menu.
• DoAlways
In the case of Case Value="True", the OnOpen
script is also executed on toggling between 2
UserTech inline forms.
String1 Result of the request (Case 1 … N)
… All parameter reference placeholders in a string are
replaced in the program by the values selected in the
StringN
inline form.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 67/92


Programming KUKA.UserTech 4.0

Element Description
Script1 Name of the script that is to be executed if case 1 …
N occurs

ScriptN
ScriptElse Name of the script that is to be executed if none of
the cases 1 … N occurs

Examples

(>>> 6.11.7.1 "OnOpen script with IsChange request" Page 68)


(>>> 6.11.7.2 "OnOpen script with DoAlways request" Page 69)

6.11.7.1 OnOpen script with IsChange request

Description

In an OnOpen script, a Switch statement with IsChange can be used to


query whether the inline form was opened via the Commands menu or
by pressing Change. Depending on the result of the query, different
scripts can be called.

KFDx file

1 <Application Name="TestScript">
2 <Script Name="ChangeTest">
3 <Message Text="Fired only when ILF is changed!" />
4 </Script>
5 <Script Name="CreateTest">
6 <Message Text="Fired only when ILF is created!" />
7 </Script>
8 <Script Name="OpenTest">
9 <Switch Dialog="FALSE" Condition="IsChange">
10 <Case Value="True" Do="ChangeTest" />
11 <Case Value="False" Do="CreateTest" />
12 </Script>
13 <Script Name="CloseTest">
14 <Message Text="Fired when ILF is closed!" />
15 <Do Script="AcceptInlineForm" />
16 </Script>
17 <Fold Name="TestFold">
18 <Line>/;only for testing OnOpen event</Line>
19 </Fold>
20 <InlineForm Name="TestIlf" OnOpen="OpenTest"
OnAccept="CloseTest">
21 <FLD Name="TestFold" />
22 </InlineForm>
23 </Application>

68/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Programming
Line Description
2 … 7 Definition of the scripts for the IsChange request that are to
be executed dependent on the result of the query
8 … 12 Definition of the OnOpen script with the IsChange request
which is to be executed on opening the inline form

• Case Value="True":
The script specified here is executed if the inline form
was opened by pressing Change.
• Case Value="False":
The script specified here is executed if the inline form
was opened via the Commands menu.
13 … 16 Definition of the OnAccept script which is to be executed on
closing the inline form
20 … 22 Definition of the inline form

6.11.7.2 OnOpen script with DoAlways request

Description

As standard, an OnOpen script is only executed if the inline form is


opened by pressing Change or via the Commands menu.
In an OnOpen script, a Switch statement with DoAlways can be used to
call a script that is also executed on toggling between 2 UserTech inline
forms.

KFDx file

1 <Application Name="TestScript">
2 <Script Name="Script1">
3 <Message Text="Fired only once!" />
4 </Script>
5 <Script Name="AllOverScript">
6 <Message Text="Fired always!" />
7 </Script>
8 <Script Name="Script2">
9 <Switch Dialog="FALSE" Condition="DoAlways">
10 <Case Value="True" Do="AllOverScript" />
11 </Script>
12 <Fold Name="TestFold">
13 <Line>/;only for testing OnOpen event</Line>
14 </Fold>
15 <InlineForm Name="TestIlf1" OnOpen="TestScript1">
16 <FLD Name="TestFold" />
17 </InlineForm>
18 <InlineForm Name="TestIlf2" OnOpen="TestScript2">
19 <FLD Name="TestFold" />
20 </InlineForm>
21 </Application>

Line Description
2 … 4 Definition of the OnOpen script that is to be executed if an
inline form is opened by pressing Change or via the Com-
mands menu
5 … 7 Definition of the script for the DoAlways request

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 69/92


Programming KUKA.UserTech 4.0

Line Description
8 … 12 Definition of the OnOpen script with the DoAlways request
which is to be executed every time an inline form is
opened.
15 … 20 Definition of the inline forms

6.11.8 <Switch Dialog ="TRUE"...>: displaying a dialog and executing a script

Description

Display a dialog and execute a script.


Enables a dialog between the program and the user. The dialog is dis-
played in a separate window. The user answers using buttons that call de-
fined scripts. The responses and corresponding scripts are defined in the
Case lines.
Once the selected script has been executed, the program is resumed.
<Switch Dialog> statements must not be nested.

Syntax

<Switch Dialog="TRUE" Condition="String">


<Case Value="String1" Do="Script1" />
...
<Case Value="StringN" Do="Script7" />
</Switch>

Explanation of the syntax

Element Description
Condition Message text displayed in the dialog
The parameter reference placeholders in the string
are replaced by the current values. The string is used
as a key in the language file with the texts to be
translated.
(>>> 6.7 "Language files" Page 23)
String1 Answers 1 … 7 that are displayed on the buttons in
the dialog

If no string is defined, no button is displayed.
String7
The parameter reference placeholders in the string
are replaced by the current values. The string is used
as a key in the language file with the texts to be
translated.
(>>> 6.7 "Language files" Page 23)
Script1 Names of scripts 1 … 7 that are executed depending
on the answer

Script7

70/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Configuration
7 Configuration

7.1 Integrating inline forms and status keys into smartHMI

Description

The user-defined inline forms and status keys of a technology must be


made known in a predefined configuration file so that they can be called
via the menus on the smartHMI.
• Inline forms are called in the Commands menu:
CommandMenu in the configuration file
• Status keys are called in the main menu:
‒ Configuration > Status keys
MainMenu in the configuration file

Templates

Programming and configuration examples are available and can be used


as templates.
Programming examples:
Directory C:\KRC\TP\UserTech\TEMPLATE
Files MyTech.kfdx
Programming example for inline forms

• Technology: MyTech
• Inline forms: MyCmd and Ilf_With_ParamList
(>>> 6.9.4 "MyTech technology" Page 50)
TestStat.kfdx
Programming example for status keys

• Technology: StatkeyTest
• Status key bar: Test
Configuration files:
Directory C:\KRC\TP\UserTech\SmartHMI
Files SmartHMI.exe.UserTech.InlineForms.config
With configuration example for inline forms on the
smartHMI
(>>> 7.1.1 "Menu structure for inline forms"
Page 72)
SmartHMI.exe.UserTech.KeyBar.config
With configuration example for status keys on the
smartHMI
(>>> 7.1.2 "Menu structure for status key bars"
Page 73)

Examples

• (>>> 7.3.1 "Twinkle technology" Page 78)


• (>>> 7.3.2 "Glue technology" Page 81)
• (>>> 7.3.3 "DispSet technology" Page 82)

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 71/92


Configuration KUKA.UserTech 4.0

7.1.1 Menu structure for inline forms

The menu structure for calling inline forms is predefined. The variable val-
ues are highlighted in the example.

1 <KukaRoboter.SmartHMI.Menu type="KukaRoboter.SmartHMI.…">
2 <!-- Menue tree of UserTech InlineForms -->
3 <MenuRoot SystemName="CommandMenu">
4 <MenuFolder DisplayName="UserTechILFs#UserTech" MergeOrder="902">
5 <MenuItem DisplayName="UserTechILFs#MyCmd" MergeOrder="110">
6 <CommandCall Target="LegacyLoader.InvokeModuleProc">
7 <Argument Name="PlugInName">INLINEFORM</Argument>
8 <Argument Name="ProcID">2011</Argument>
9 <Argument Name="ParamList">Kuka.UserTech;MYTECH;MyCmd</Argument>
10 </CommandCall>
11 </MenuItem>
12 <MenuItem DisplayName="UserTechILFs#Ilf_With_ParamList" MergeOrder="120">
13 ...
14 </MenuItem>
15 </MenuFolder>
16 </MenuRoot>
17 </KukaRoboter.SmartHMI.Menu>

Line Description
3, 16 The element MenuRoot defines the menu in which the in-
line form is called.
CommandMenu = Commands menu
4, 15 The element MenuFolder adds a menu item to the Com-
mands menu, in this case the menu item UserTech.
Attributes:

• DisplayName
Name of the menu item in the menu
The name can be used as a key in the UserTe-
chILFs.kxr language file.
• MergeOrder
Position of the menu item in the menu
5, 11 The element MenuItem adds a menu item to the Com-
mands menu > UserTech, in this case the menu item
MyCmd.
Attributes:

• DisplayName
Name of the menu item in the menu.
The name can be used as a key in the UserTe-
chILFs.kxr language file.
• MergeOrder
Position of the menu item in the menu
Menu items inserted using MenuItem must be assigned a
function.
6, 10 The element CommandCall calls the function of the menu
item, in this case the inline form MyCmd.

72/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Configuration
Line Description
7 … 9 The function call for an inline form contains the following
Argument elements:

• PlugInName
Name of the function module:
‒ INLINEFORM
• ProcID
Number of the function module:
‒ 2011
• ParamList
Parameters of the function module:
‒ Kuka.UserTech
‒ MYTECH: The name of the technology, defined in
the KFDx file, in which the inline form is defined
‒ MyCmd: The name of the inline form, defined in the
KFDx file
12, 14 The element MenuItem adds a further menu item to the
Commands menu > UserTech, in this case the menu item
Ilf_With_ParamList.
Attributes:

• DisplayName
Name of the menu item in the menu
The name can be used as a key in the UserTe-
chILFs.kxr language file.
• MergeOrder
Position of the menu item in the menu

If a submenu is added to an existing menu, the display name must ex-


actly match the existing display name. If the names do not match, a
new menu item is generated.

7.1.2 Menu structure for status key bars

The menu structure for calling a status key bar is predefined. The variable
values are highlighted in the example.

1 <KukaRoboter.SmartHMI.Menu type="KukaRoboter.SmartHMI.…">
2 <MenuRoot SystemName="MainMenu">
3 <MenuFolder SystemName="Config">
4 <MenuFolder SystemName="ConfigStatKeys">
5 <MenuFolder DisplayName="UserTech">
6 <MenuItem DisplayName="Test" MergeOrder="100">
7 <CommandCall Target="UserkeyBarManager.OpenUserkeyBar"
Right="OperationTP">
8 <Argument
Name="UserkeyBarRepository">KukaRoboter.UserTech.StatKeys.ViewModels.Userkey
BarRepository</Argument>
9 <Argument Name="UserkeyBarID">Test</Argument>
10 </CommandCall>
11 </MenuItem>
12 </MenuFolder>
13 </MenuFolder>

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 73/92


Configuration KUKA.UserTech 4.0

14 </MenuFolder>
15 </MenuRoot>
16 </KukaRoboter.SmartHMI.Menu>

Line Description
2, 15 The element MenuRoot defines the menu in which the sta-
tus key bar is called.
MainMenu = main menu
3, 14 The two MenuFolder elements form the menu in the main
4, 13 menu in which the status key bar is called.

• Configuration > Status keys


5, 12 This MenuFolder element adds a menu item to the Con-
figuration menu > Status keys, in this case the menu item
UserTech.
Attributes:

• DisplayName
Name of the menu item in the menu
6, 11 The element MenuItem adds a menu item to the Configu-
ration menu > Status keys > UserTech, in this case the
menu item Test.
Attributes:

• DisplayName
Name of the menu item in the menu.
• MergeOrder
Position of the menu item in the menu
Menu items inserted using MenuItem must be assigned a
function.
7, 10 The element CommandCall calls the function of the menu
item, in this case the status key bar Test.
9 UserkeyBarID is used to specify the name, defined in the
KFDx file, of the status key bar that is to be called, in this
case the status key bar Test.

If a submenu is added to an existing menu, the display name must ex-


actly match the existing display name. If the names do not match, a
new menu item is generated.

7.2 Integrating inline forms in WorkVisual

Description

The user-defined inline forms of a technology can be called in the KRL


Editor of WorkVisual and inserted into the opened program. For this, the
inline forms must also be made known in a predefined configuration file.

Templates

A programming example and a configuration example are available and


can be used as templates.
Programming example:

74/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Configuration
Directory C:\ProgramData\KUKA Roboter GmbH\WorkVisual
\6.0\OptionPackages\UserTech\WorkVisual
File MyTech.kfdx
Programming example for inline forms

• Technology: MyTech
• Inline forms: MyCmd and Ilf_With_ParamList
(>>> 6.9.4 "MyTech technology" Page 50)
Configuration file:
Directory C:\ProgramData\KUKA Roboter GmbH\WorkVisual
\6.0\OptionPackages\UserTech\WorkVisual
File WorkVisual.exe.UserTech.InlineForms.config
With configuration example for inline forms in WorkVi-
sual
(>>> "Configuration file" Page 76)

Precondition

The user-defined inline forms can only be called under the following con-
ditions in WorkVisual:
• KUKA.UserTech is installed in WorkVisual.
• KUKA.UserTech is inserted as an option in the project.

Procedure

Insert inline form in KRL Editor:


1. Position the cursor in the line in which the inline form is to be
inserted. A button is displayed.

Fig. 7-1: Inserting an inline form

1 Button for inserting inline forms

2. Click on the button or press CTRL + Enter. The context menu with the
available inline forms is displayed.

Fig. 7-2: Context menu in the KRL Editor

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 75/92


Configuration KUKA.UserTech 4.0

3. Select the desired inline form, e.g. the inline form UserTech >
MyCmd.

Fig. 7-3: Inline form in the KRL Editor

Configuration file

To make inline forms available in WorkVisual, the <KukaRoboter.Inline-


FormCommands…> section must be edited in the configuration file and
saved in the predefined directory.
The attributes to be defined are described below using the configuration
example supplied.

1 <?xml version="1.0" encoding="utf-8"?>


2 <configuration>
3 <configSections>
4 ...
5 </configSections>
6
7 <KukaRoboter.InlineFormCommands
type="KukaRoboter.Technology.InlineFormCommand, KukaRoboter.Technology">
8 <InlineFormCommand DisplayName="UserTechyILFs#UserTech">
9 <InlineFormCommand Provider="Kuka.UserTech" DisplayName="MenuBar#MyCmd"
Command="MYTECH" Variant="MyCmd"/>
10 <InlineFormCommand Provider="Kuka.UserTech"
DisplayName="MenuBar#Ilf_With_ParamList" Command="MYTECH"
Variant="ILF_With_ParamList"/>
11 </InlineFormCommand>
12 </KukaRoboter.InlineFormCommands>
13 ...
14 </configuration>

Line Description
8 New menu item in the context menu; here, UserTech
9 New submenu item in the context menu; here, MyCmd
Attributes:

• Provider=Kuka.UserTech
Name of the option package that provides the inline
form; is always Kuka.UserTech
• DisplayName="Menubar#MyCmd"
Name of the submenu item in the context menu
• Command="MYTECH"
The name of the technology, defined in the KFDx file, in
which the inline form is defined
• Variant="MyCmd"
The name of the inline form, defined in the KFDx file

76/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Configuration
Line Description
10 New submenu item in the context menu; here,
Ilf_With_ParamList
Attributes:

• Provider=Kuka.UserTech
Name of the option package that provides the inline
form; is always Kuka.UserTech
• DisplayName="Menubar#Ilf_With_ParamList"
Name of the submenu item in the context menu
• Command="MYTECH"
The name of the technology, defined in the KFDx file, in
which the inline form is defined
• Variant="Ilf_With_ParamList"
The name of the inline form, defined in the KFDx file

Group

UserTech commands can be grouped in the context menu by nesting <In-


lineFormCommand> lines. Here, an example:

1 <KukaRoboter.InlineFormCommands
type="KukaRoboter.Technology.InlineFormCommand, KukaRoboter.Technology">
2 <InlineFormCommand DisplayName="UserTechILFs#UserTech"
3 <InlineFormCommand Provider="Kuka.UserTech" DisplayName="MenuBar#MyCmd"
Command="MYTECH" Variant="MyCmd"/>
4 <InlineFormCommand Provider="Kuka.UserTech"
DisplayName="MenuBar#Ilf_With_ParamList" Command="MYTECH"
Variant="ILF_With_ParamList"/>
5
6 <InlineFormCommand DisplayName="testSubMenue">
7 <InlineFormCommand Provider="Kuka.UserTech" DisplayName="SubMyCmd"
Command="MYTECH" Variant="MyCmd"/>
8 <InlineFormCommand Provider="Kuka.UserTech"
DisplayName="SubMyCmdwithParamList" Command="MYTECH"
Variant="ILF_With_ParamList"/>
9 </InlineFormCommand>
10
11 </InlineFormCommand>
12 </KukaRoboter.InlineFormCommands>

The UserTech menu has been expanded by the submenu testSubMenue.

Fig. 7-4: Expanded context menu in the KRL Editor

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 77/92


Configuration KUKA.UserTech 4.0

Constraints

For inline forms that also use scripts, it must be noted that runtime varia-
bles are not available in WorkVisual or are only available with “incorrect”
dummy values.
If, for example, the current position $POS_ACT is to be compared in the
inline form with another position using a script, this will always result in in-
correct values in WorkVisual. $POS_ACT is always the same in WorkVisu-
al, i.e. a position that a robot can definitely never reach. This ensures that
points with this position are taught using the smartPAD.

7.3 Examples of integration of technology packages

7.3.1 Twinkle technology

KFDx file

1 <Application Name="Twinkle" SOT="True" SOC="True">


2 <Fold Name="One">
3 <Line>/Twinkle once</Line>
4 <Line>$OUT[5]=True</Line>
5 <Line>WAIT SEC 1.5</Line>
6 <Line>$OUT[5]=FALSE</Line>
7 <Line>WAIT SEC 1.5</Line>
8 </Fold>
9 <Fold Name="Two">
10 <Line>/Twinkle twice</Line>
11 <Line>$OUT[5]=True</Line>
12 <Line>WAIT SEC 1.5</Line>
13 <Line>$OUT[5]=FALSE</Line>
14 <Line>WAIT SEC 1.5</Line>
15 <Line>$OUT[5]=True</Line>
16 <Line>WAIT SEC 1.5</Line>
17 <Line>$OUT[5]=FALSE</Line>
18 <Line>WAIT SEC 1.5</Line>
19 </Fold>
20 <InlineForm Name="once">
21 <FLD Name="one" />
22 </InlineForm>
23 <InlineForm Name="twice">
24 <FLD Name="two" />
25 </InlineForm>
26 <InlineForm Name="triple">
27 <FLD Name="one" />
28 <FLD Name="two" />
29 </InlineForm>
30 </Application>

Line Description
1 … 30 Definition of the Twinkle technology
2 … 8 Definition of the fold “One”
9 … 19 Definition of the fold “Two”
Trigger to deactivate the laser

78/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Configuration
Line Description
20 … 22 Definition of the inline form “Twinkle.once”
The following fold is assigned to the inline form:

• One
23 … 25 Definition of the inline form “Twinkle.twice”
The following fold is assigned to the inline form:

• Two
26 … 29 Definition of the inline form “Twinkle.triple”
The following folds are assigned to the inline form:

• One
• Two

Inline form Twinkle.twice

Fig. 7-5: Inline form Twinkle.twice

7.3.1.1 Integrating the Twinkle technology in a menu

Description

The menu item BlinkTech is added at the third position in the Com-
mands menu > UserTech and calls the inline form Twinkle.twice.

Fig. 7-6: Inline form Twinkle.twice

Configuration file

<KukaRoboter.SmartHMI.Menu type="KukaRoboter.SmartHMI.…">
<!-- Menue tree of UserTech InlineForms -->
<MenuRoot SystemName="CommandMenu">
<MenuFolder DisplayName="UserTechILFs#UserTech"
MergeOrder="902">
<MenuItem DisplayName="UserTechILFs#MyCmd"
MergeOrder="110">
<CommandCall Target="LegacyLoader.InvokeModuleProc">
<Argument Name="PlugInName">INLINEFORM</Argument>
<Argument Name="ProcID">2011</Argument>
<Argument Name="ParamList">Kuka.UserTech;MYTECH;MyCmd</
Argument>
</CommandCall>
</MenuItem>
<MenuItem DisplayName="UserTechILFs#Ilf_With_ParamList"
MergeOrder="120">
...
</MenuItem>
<MenuItem DisplayName="UserTechILFs#BlinkTech"
MergeOrder="130">
<CommandCall Target="LegacyLoader.InvokeModuleProc">
<Argument Name="PlugInName">INLINEFORM</Argument>
<Argument Name="ProcID">2011</Argument>

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 79/92


Configuration KUKA.UserTech 4.0

<Argument Name="ParamList">Kuka.UserTech;Twinkle;twice</
Argument>
</CommandCall>
</MenuItem>
</MenuFolder>
</MenuRoot>
</KukaRoboter.SmartHMI.Menu>

7.3.1.2 Integrating the Twinkle technology in a submenu

Description

The menu item BlinkTech is added at the second position in the menu
Commands > UserTech. The BlinkTech submenu contains the menu
items One, Two and Three.
• Menu item One calls the inline form Twinkle.once.
• Menu item Two calls the inline form Twinkle.twice.
• Menu item Three calls the inline form Twinkle.triple.

Configuration file

<KukaRoboter.SmartHMI.Menu type="KukaRoboter.SmartHMI.…">
<!-- Menue tree of UserTech InlineForms -->
<MenuRoot SystemName="CommandMenu">
<MenuFolder DisplayName="UserTechILFs#UserTech"
MergeOrder="902">
<MenuItem DisplayName="UserTechILFs#MyCmd"
MergeOrder="110">
<CommandCall Target="LegacyLoader.InvokeModuleProc">
<Argument Name="PlugInName">INLINEFORM</Argument>
<Argument Name="ProcID">2011</Argument>
<Argument Name="ParamList">Kuka.UserTech;MYTECH;MyCmd</
Argument>
</CommandCall>
</MenuItem>
</MenuFolder>
<MenuFolder DisplayName="UserTechILFs#BlinkTech"
MergeOrder="903">
<MenuItem DisplayName="UserTechILFs#One" MergeOrder="110">
<CommandCall Target="LegacyLoader.InvokeModuleProc">
<Argument Name="PlugInName">INLINEFORM</Argument>
<Argument Name="ProcID">2011</Argument>
<Argument Name="ParamList">Kuka.UserTech;Twinkle;once</
Argument>
</CommandCall>
</MenuItem>
<MenuItem DisplayName="UserTechILFs#Two" MergeOrder="120">
<CommandCall Target="LegacyLoader.InvokeModuleProc">
<Argument Name="PlugInName">INLINEFORM</Argument>
<Argument Name="ProcID">2011</Argument>
<Argument Name="ParamList">Kuka.UserTech;Twinkle;twice</
Argument>
</CommandCall>
</MenuItem>
<MenuItem DisplayName="UserTechILFs#Three"
MergeOrder="130">
<CommandCall Target="LegacyLoader.InvokeModuleProc">
<Argument Name="PlugInName">INLINEFORM</Argument>
<Argument Name="ProcID">2011</Argument>

80/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Configuration
<Argument
Name="ParamList">Kuka.UserTech;Twinkle;triple</Argument>
</CommandCall>
</MenuItem>
</MenuFolder>
</MenuRoot>
</KukaRoboter.SmartHMI.Menu>

7.3.2 Glue technology

KFDx file

1 <Application Name="Glue">
2 <StatKey Name="Key4">
3 <Picture Default="C:\KRC\TP\USERTECH\TEMPLATE\PICTURES
\Rinse1.BMP" />
4 <Text Top="Rinse" Bottom="On" />
5 <Needs Prostate0="Free|Stop|Reset|End|Active" />
6 </StatKey>
7 <Script Name="ScriptKeyUp">
8 <SetVar Fullpath="$OUT[2]" Value="False" />
9 <Set Name="Key4">
10 <Picture Default="C:\KRC\TP\USERTECH\TEMPLATE\PICTURES
\Rins12.BMP" />
11 <Text Bottom="On" />
12 </Set>
13 </Script>
14 <Script Name="ScriptKeyDown">
15 <SetVar Fullpath="$OUT[2]" Value="True" />
16 <Set Name="Key4">
17 <Picture Default="C:\KRC\TP\USERTECH\TEMPLATE\PICTURES
\Rinse2.BMP" />
18 <Text Bottom="Off" />
19 </Set>
20 </Script>
21 <Set Name="Key4">
22 <Scripts OnKeyDown="ScriptKeyDown"
OnKeyUp="ScriptKeyUp" />
23 </Set>
24 <StatkeyBar Name="Bar4">
25 <SK Name="Key4" Pos="4" />
26 </StatkeyBar>
27 </Application>

Line Description
1 … 27 Definition of the technology
2 … 6 Definition of the status key
5 The status key is always active, irrespective of the operat-
ing states of the submit interpreter.
7 … 13 Definition of the script that is to be executed when the sta-
tus key is released
14 … 20 Definition of the script that is to be executed when the sta-
tus key is pressed
21 … 23 Setting of the status key

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 81/92


Configuration KUKA.UserTech 4.0

Line Description
24 … 26 Definition of the status key bar
The status key bar consists of a single status key. The sta-
tus key is at the fourth position (= last status key from the
top).

7.3.2.1 Integrating the Glue technology in a menu

Description

The menu item Rinse is inserted at the first position in the main menu
Configuration > Status keys and calls the status key bar of the technol-
ogy package.

Configuration file

1 <KukaRoboter.SmartHMI.Menu type="KukaRoboter.SmartHMI.…">
2 <MenuRoot SystemName="MainMenu">
3 <MenuFolder SystemName="Config">
4 <MenuFolder SystemName="ConfigStatKeys">
5 <MenuItem DisplayName="Rinse" MergeOrder="100">
6 <CommandCall
Target="UserkeyBarManager.OpenUserkeyBar"
Right="OperationTP">
7 <Argument
Name="UserkeyBarRepository">KukaRoboter.UserTech.StatKeys.
ViewModels.UserkeyBarRepository</Argument>
8 <Argument Name="UserkeyBarID">Bar4</Argument>
9 </CommandCall>
10 </MenuItem>
11 </MenuFolder>
12 </MenuFolder>
13 </MenuRoot>
14 </KukaRoboter.SmartHMI.Menu>

7.3.3 DispSet technology

KFDx file

1 <Application Name="DispSet">
2 <Param Name="Bright">
3 <Value Type="NUMBER" Min="" Max="" />
4 </Param>
5 <Param Name="Cont">
6 <Value Type="NUMBER" Min="" Max="" />
7 </Param>
8 <Param Name="Temp">
9 <Value Type="NUMBER" Min="" Max="" />
10 </Param>
11 <Script Name="BrightHigh">
12 <ShowVar Fullpath="$PHGBRIGHT" Param="Bright" />
13 <SetVar Fullpath="$PHGBRIGHT" Value"%Bright +1" />
14 <ShowVar Fullpath="$PHGBRIGHT" Param="Bright" />
15 <ShowVar Fullpath="$PHGCONT" Param="Cont" />
16 <ShowVar Fullpath="$PHGTEMP" Param="Temp" />
17 <Message Text="Brightness Level: %Bright Contrast
Level: %Cont Display Temperature: %Temp °C" />
18 </Script>

82/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Configuration
19 <Script Name="BrightLow">
20 <ShowVar Fullpath="$PHGBRIGHT" Param="Bright" />
21 <SetVar Fullpath="$PHGBRIGHT" Value"%Bright -1" />
22 <ShowVar Fullpath="$PHGBRIGHT" Param="Bright" />
23 <ShowVar Fullpath="$PHGCONT" Param="Cont" />
24 <ShowVar Fullpath="$PHGTEMP" Param="Temp" />
25 <Message Text="Brightness Level: %Bright Contrast
Level: %Cont Display Temperature: %Temp °C" />
26 </Script>
27 <Script Name="ContHigh">
28 <ShowVar Fullpath="$PHGCONT" Param="Cont" />
29 <SetVar Fullpath="$PHGCONT" Value"%Cont +1" />
30 <ShowVar Fullpath="$PHGCONT" Param="Cont" />
31 <ShowVar Fullpath="$PHGBRIGHT" Param="Bright" />
32 <ShowVar Fullpath="$PHGTEMP" Param="Temp" />
33 <Message Text="Brightness Level: %Bright Contrast
Level: %Cont Display Temperature: %Temp °C" />
34 </Script>
35 <Script Name="ContLow">
36 <ShowVar Fullpath="$PHGCONT" Param="Cont" />
37 <SetVar Fullpath="$PHGCONT" Value"%Cont -1" />
38 <ShowVar Fullpath="$PHGCONT" Param="Cont" />
39 <ShowVar Fullpath="$PHGBRIGHT" Param="Bright" />
40 <ShowVar Fullpath="$PHGTEMP" Param="Temp" />
41 <Message Text="Brightness Level: %Bright Contrast
Level: %Cont Display Temperature: %Temp °C" />
42 </Script>
43 <StatKey Name="Brightness" Enable="True" UserMode="10"
Style="#TOGGLE">
44 <Picture Default="C:\KRC\TP\USERTECH\TEMPLATE\PICTURES
\PHGBRIGHT.BMP" />
45 <Scripts OnKeyDown="BrightHigh"
OnKeyDownMinus="BrightLow" />
46 </StatKey>
47 <StatKey Name="Contrast" Enable="True" UserMode="10"
Style="#TOGGLE">
48 <Picture Default="C:\KRC\TP\USERTECH\TEMPLATE\PICTURES
\PHGCONT.BMP" />
49 <Scripts OnKeyDown="ContHigh"
OnKeyDownMinus="ContLow" />
50 </StatKey>
51 <StatkeyBar Name="Bar">
52 <SK Name="Brightness" Pos="1" />
53 <SK Name="Contrast" Pos="3" />
54 </StatkeyBar>
55 </Application>

Line Description
1 … 27 Definition of the technology
2 … 10 Definition of the parameters used in the scripts
11 … 18 Definition of the script “BrightHigh”
When the script is called, the value of the system variable
$PHGBRIGHT is increased by 1.
19 … 26 Definition of the script “BrightLow”
When the script is called, the value of the system variable
$PHGBRIGHT is decreased by 1.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 83/92


Configuration KUKA.UserTech 4.0

Line Description
27 … 34 Definition of the script “ContHigh”
When the script is called, the value of the system variable
$PHGCONT is increased by 1.
35 … 42 Definition of the script “ContLow”
When the script is called, the value of the system variable
$PHGCONT is decreased by 1.
43 … 46 Definition of the status key “Brightness”
The brightness can be set using the double status key.

• The “BrightHigh” script is called when you press the key


with the PLUS function.
• The “BrightLow” script is called when you press the key
with the MINUS function.
47 … 50 Declaration of the status key “Contrast”
The contrast can be set using the double status key.

• The “ContHigh” script is called when you press the key


with the PLUS function.
• The “ContLow” script is called when you press the key
with the MINUS function.
51 … 54 Definition of the status key bar “Bar”
The status key bar consists of the two double status keys.

7.3.3.1 Integrating the DispSet technology in a menu

Description

The menu item Display is inserted at the second position in the main
menu Configuration > Status keys and calls the status key bar of the
technology package.

Configuration file

1 <KukaRoboter.SmartHMI.Menu type="KukaRoboter.SmartHMI.…">
2 <MenuRoot SystemName="MainMenu">
3 <MenuFolder SystemName="Config">
4 <MenuFolder SystemName="ConfigStatKeys">
5 <MenuItem DisplayName="Rinse" MergeOrder="100">
6 <CommandCall
Target="UserkeyBarManager.OpenUserkeyBar"
Right="OperationTP">
7 <Argument
Name="UserkeyBarRepository">KukaRoboter.UserTech.StatKeys.
ViewModels.UserkeyBarRepository</Argument>
8 <Argument Name="UserkeyBarID">Bar4</Argument>
9 </CommandCall>
10 </MenuItem>
11 <MenuItem DisplayName="Display" MergeOrder="200">
12 <CommandCall
Target="UserkeyBarManager.OpenUserkeyBar"
Right="OperationTP">
13 <Argument
Name="UserkeyBarRepository">KukaRoboter.UserTech.StatKeys.
ViewModels.UserkeyBarRepository</Argument>
14 <Argument Name="UserkeyBarID">Bar</Argument>

84/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Configuration
15 </CommandCall>
16 </MenuItem>
17 </MenuFolder>
18 </MenuFolder>
19 </MenuRoot>
20 </KukaRoboter.SmartHMI.Menu>

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 85/92


Configuration KUKA.UserTech 4.0

86/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Archiving
8 Archiving
Target locations

Archiving can be performed to the following target destinations:


• USB stick in smartPAD or robot controller
• Network

Further information about archiving is contained in the operating and


programming instructions for the KUKA System Software (KSS).

8.1 Archiving files

Description

The technology-specific directories located under C:\KRC\TP\UserTech\


can be archived:
Directory Description
Kxr Directory for the KXR language files
smartHMI Directory for the smartHMI configuration files
TEMPLATE Directory for the KFDx files

Precondition

If data are to be archived to a USB stick:


• User rights: Function group Archive to USB drives
• A USB stick is connected.
The stick can be connected to the smartPAD or robot controller.

NOTICE
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.

If data are to be archived to a network path:


• User rights: Function group Archive to network
• The network path to which the data are to be archived is configured.

Procedure

1. In the main menu, select File > Archive > USB (KCP) or USB (cabi-
net) or Network and then select the menu item All.
If archiving is carried out using the menu item All and there is an
existing archive present, this will be overwritten.

2. Confirm the request for confirmation with Yes. The archive is created.
Once the archiving is completed, this is indicated in the message win-
dow.
3. If data were archived to a USB stick: The stick can now be removed.

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 87/92


Archiving KUKA.UserTech 4.0

8.2 Restoring files

CAUTION
Risk of injury due to archive from a different KSS version
Only archives from the same KSS version may be loaded into KSS. For
example:
• Only KSS 8.6 archives in KSS 8.6
• Only KSS 8.7 archives in KSS 8.7
If other archives are loaded, the following may occur:
• Error messages
• Robot controller is not operable.
• Personal injury and damage to property.

Description

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

• User rights: function group Restore


• If data are to be restored from the USB stick: a USB stick with the ar-
chive is connected.
The stick can be connected to the smartPAD or robot controller.

NOTICE
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 > USB (KCP) or USB (cabi-
net) or Network and then select the menu item All.
2. Confirm the request for confirmation with Yes. Archived files are re-
stored 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.

88/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

KUKA Service
9 KUKA Service

9.1 Requesting support

Introduction

This documentation provides information on operation and operator con-


trol, and provides assistance with troubleshooting. For further assistance,
please contact your local KUKA subsidiary.

Information

The following information is required for processing a support re-


quest:
• Description of the problem, including information about the duration
and frequency of the fault
• As comprehensive information as possible about the hardware and
software components of the overall system
The following list gives an indication of the information which is rele-
vant in many cases:
‒ Model and serial number of the kinematic system, e.g. the manip-
ulator
‒ 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 modifi-
cations
‒ Diagnostic package KRCDiag
Additionally for KUKA Sunrise: existing projects including applica-
tions
For versions of KUKA System Software older than V8: archive of
the software (KRCDiag is not yet available here.)
‒ Application used
‒ External axes used

9.2 KUKA Customer Support

The contact details of the local subsidiaries can be found at:


www.kuka.com/customer-service-contacts

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 89/92


KUKA Service KUKA.UserTech 4.0

90/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020


KUKA.UserTech 4.0

Index Layout............................................................. 59
Licenses............................................................8
#SWITCH........................................................56
#TOGGLE....................................................... 56
$...................................................................... 22
$config.dat................................................ 47, 49 M
Message text, defining................................... 20
Message, defining.......................................... 66
A Misuse.............................................................10
Archiving......................................................... 87
Areas of validity..............................................22
ASS.................................................................46 N
ASSAGG.........................................................46 Naming conventions....................................... 22

C O
Configuration...................................................71 Open source..................................................... 8
Converter....................................................9, 17 Operation........................................................ 17
Overview, KFDx syntax.................................. 19

D
Data set structure, for parameter list...... 19, 48 P
DFCT.............................................................. 45 Parameter list, defining............................19, 48
Documentation, industrial robot....................... 7 Parameter list, programming..........................47
DSUB.............................................................. 43 Parameter reference.......................................21
Parameter references.....................................22
Parameter types............................................. 29
F Parameter, defining.................................. 19, 27
FCT................................................................. 44 Product description...........................................9
Fold, defining............................................19, 36 Programming.................................................. 19
Format types...................................................42

R
I Required knowledge/skills................................ 7
Image sizes.................................................... 58
Inline form, defining................................. 19, 37
Inline forms, integrating in WorkVisual.......... 74 S
Inline forms, integrating into smartHMI......... 71 Safety.............................................................. 11
Installation.......................................................13 Safety instructions............................................ 7
via smartHMI............................................. 14 Script, defining......................................... 20, 62
via WorkVisual...........................................13 Script, executing.......................................20, 65
Intended use...................................................10 Scripts, predefined..........................................66
Introduction....................................................... 7 Scripts, programming..................................... 62
smartHMI.......................................................... 8
smartHMI configuration file, converting......... 17
K smartPAD..........................................................8
Special characters.......................................... 20
Keywords........................................................ 22
Status key bar, defining...........................19, 61
KFD...................................................................8
Status key bar, setting...................... 19, 20, 61
KFD file, converting........................................17
Status key, defining..................................19, 55
KFDx................................................................. 8
Status key, setting............................. 19, 20, 61
KFDx file, creating..........................................25
Status keys, integrating into smartHMI......... 71
KFDx, syntax overview...................................19
Status keys, programming............................. 54
KRL................................................................... 8
String.................................................................8
KUKA Customer Support............................... 89
Strings.............................................................21
KUKA Service.................................................89
Structure data type, defining..........................49
SUB.................................................................42
Support request.............................................. 89
L System requirements......................................13
Language files..........................................10, 23 Hardware................................................... 13

KST UserTech 4.0 V3 | Issued: 27.10.2020 www.kuka.com | 91/92


KUKA.UserTech 4.0

Software.....................................................13

T
Target group..................................................... 7
Technology package, defining................. 19, 26
Technology, programming.............................. 24
Templates...........................................10, 71, 74
Terms used....................................................... 8
Trademarks....................................................... 8
Training............................................................. 7

U
Uninstalling
via smartHMI............................................. 16
via WorkVisual...........................................14
Updating via smartHMI...................................14
Updating via WorkVisual................................ 13

V
Variable, creating..................................... 20, 64
Variable, overwriting.................................20, 64
Variable, reading...................................... 20, 64
Variable, setting........................................20, 63

W
Warnings........................................................... 7
WYSIWYG...................................................... 42

92/92 | www.kuka.com KST UserTech 4.0 V3 | Issued: 27.10.2020

You might also like