Załączam Kuka KRC1 programming manual Jeżeli jesteś zainteresowany innymi materiałami odnosnie KRC1 to daj znać
Index
Symbols
I
Icons, 16
Inline form, 31
INLINEFORM, 9
Int, 33
#SWITCH, 18
#TOGGLE, 18
A
ACCEPTINLINEFORM, 24
K
Appendix, 33
KEYDOWN_PICTURE, 16
KEYDOWNMINUS_PICTURE, 16
KFDL, 5
KRL, 5
ASS, 11
ASSAGG, 11
AUTOLIMIT, 35
M
B
MESSAGE, 23
Bool, 33
BOTTOMTEXT, 16
N
Name, 33
NEED_DRIVESOK, 17
NEED_MODEOP, 17
NEED_PROSTATE, 18
NEED_PROSTATE0, 17
NEED_SAFETYSWITCH, 17
NEXT, 19
NOTHING, 24
C
CANCELINLINEFORM, 24
CENTERTEXT, 16
Char, 33
D
DEFSCRIPT, 20
DEFTP, 7
O
ONACCEPT, 11
ONKEYDOWN, 18
ONKEYDOWNMINUS, 19
ONKEYREPEAT, 19
ONKEYREPEATMINUS, 19
ONKEYSHOW, 18
ONKEYUP, 18
ONKEYUPMINUS, 19
ONTOUCHUP, 11
Overview, 6
DFCT, 10
DO, 22
DSUB, 10
DUP, 10
E
ENABLE, 12, 16
END, 24
ENDSCRIPT, 20
ENDSWITCH, 23
ENDTP, 7
P
PARAM, 9, 11
PICTURE, 16
F
FCT, 10
FOCUS, 9
FOLD, 9, 12
R
Real, 33
REDECL, 21
Index -- i
Index
S
T
Technologies, 25
TOPTEXT, 15
Type {free: }, 34
Type {list:}, 36
Type {name: }, 35
Type {number: }, 35
Type {real: }, 35
Type {static: }, 34
Scripts, 20
SET, 22
SETVAR, 20
SHORTCUT, 12
SHORTNAME, 11
SHOWVAR, 21
Special characters, 37
STATKEY [n], 14
STATKEYBAR, 13
U
Status keys, 13
UNIT, 12
UP, 10
USERMODE, 12, 18
String, 34
STYLE, 9, 18
SUB, 10
SWITCH DIALOG...CASE, 24
SWITCH...CASE, 23
V
VALUE, 12
Index -- ii
3
Variables and declarations
3.1
Variables and names
Beside the use of constants, in other words the direct specification of values in the form of
numbers, symbols, etc., it is also possible to use variables and other forms of data in a KRL
program.
In the programming of industrial robots, variables are required for the purpose of sensor
processing, for example. They enable the value supplied by the sensor to be saved and
evaluated at various points in the program. Arithmetic operations can also be performed in
order to calculate a new position.
A variable is represented by a name in the program, this designation being freely selectable
subject to certain restrictions.
Names
Names in KRL
Scan have a maximum length of 12 characters,
Scan consist of letters (A--Z), numbers (0--9) and the signs ’
_’and ’ ,
$’
Smust not begin with a number,
Smust not be a keyword.
As all system variables (see Section 3.4) begin with the ’
$’sign, this sign should
not be used as the first character in self-defined names.
Examples of valid KRL names are
SENSOR_1
NOZZLE13
P1_TO_P12
A variable is to be regarded as a fixed memory area, whose contents can be addressed via
the variable name. When the program is executed, the variable is therefore represented by
a memory location (place) and a memory content (value).
Value
assignment
Values are then assigned to the variables using the equal sign (=). The statement
QUANTITY = 5
thus means that the value 5 is entered in the memory area with the address of QUANTITY.
The exact address is of no interest to the programmer and is therefore assigned automatically by the compiler. It is only important that the memory content can be addressed in the
program at all times with the aid of its name.
As different data objects (see Section 3.2) also have different memory requirements, the data
type of a variable must be declared (see Section 3.2.1) before it is used.
Programmierung, Experte R2.2.8 08.98.00 en
19 of 164
Variable life
The lifetime of a variable is the time during which the variable is allocated memory. It depends
on whether the variable is declared in an SRC file or a data list:
G
Variable declared in an SRC file
The lifetime is limited to the run time of the program. The memory area is deallocated again
on completion of execution. The value of the variable is thus lost.
G
Variable declared in a data list (see Section 11)
The lifetime is independent of the run time of the program. The variable exists only as long
as the data list exists. Such variables are therefore permanent. If the variable has also been
initialized in the data list, its current value is also retained permanently.
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
20 of 164
3.2
Data objects
Data objects are namable memory units of a particular data type. The memory units may
consist of a different number of memory units (bytes, words, etc.). If such a data object is
declared under a name by the programmer, a variable is created. The variable now occupies
one or more memory locations, in which data can be written and read by the program. The
symbolic naming of the memory locations with a freely selectable designation makes
programming easier and more transparent and enhances the readability of the program.
The following example is intended to illustrate the term “
data type” A memory location with
:
8 bits contains the bit combination
00110101
How is this bit combination to be interpreted? Is it the binary notation of the number 53 or
the ASCII character “ , which is represented by the same bit pattern?
5”
Data type
An important item of information is required in order to answer this question unambiguously,
namely the specification of the data type of a data object. In the above case, this could be
the type INTEGER or CHARACTER, for example.
Besides this computer-related reason for introducing data types, the programmer also
benefits from the use of data types since it is possible to work with exactly the types that are
particularly well suited to the specific application.
3.2.1
Declaration and initialization of data objects
DECL
Assignment of a variable name to a data type and reservation of the memory space are
accomplished in KRL with the aid of the DECL declaration. By means of
DECL INT QUANTITY,NUMBER
you can declare, for example, two variables QUANTITY and NUMBER of the data type
INTEGER.
The compiler thus knows these two variables and the associated data type and, when the
variables are used, can check whether this data type permits the intended operation.
The declaration begins, as shown in the example, with the keyword DECL, followed by the
data type and the list of variables that are to be assigned this data type.
When declaring variables and arrays of a predefined data type, the keyword
DECL can be omitted. Besides the simple data types INT, REAL, CHAR and BOOL
(see Section 3.2.2), the structure data types POS, E6POS, FRAME, AXIS and
E6AXIS (see Section 3.2.5) are predefined, among others.
The declaration can be entirely omitted for variables (not arrays!) of the data
type POS. The data type POS is the standard data type for variables.
The keyword DECL is indispensable in the declaration of freely definable
structure or enumeration types (see Section 3.2.5 and 3.2.6).
Initialization
After a variable has been declared, its value is first set to invalid since it would otherwise
depend on the random memory allocation. To make it possible to work with the variable, it
must therefore be preallocated a specific value. This first value assignment to a variable is
called initialization.
When creating new files by means of the softkey “New” on the KUKA user
interface, an INI sequence is also automatically generated. The declaration of
variables must always take place before this sequence.
A value assignment to a variable is an instruction and must therefore never be located in the
declaration section. Initialization, however, can take place in the instruction section at any
time. All declared variables should nevertheless ideally be initialized in an initialization
section directly after the declaration section (see Fig. 9).
Only in data lists is it permissible to initialize variables directly in the declaration line.
Programmierung, Experte R2.2.8 08.98.00 en
21 of 164
DEF NAME()
;---- Declaration section ---¼
;--- Initialization section -¼
;---- Instruction section ---¼
END
Fig. 9 Basic structure of a robot program
Section 11 Data lists
Programmierung, Experte R2.2.8 08.98.00 en
22 of 164
3.2.2
Simple data types
By simple data types, we mean a number of basic data types that are available in most programming languages. In contrast to the structured data types (see Sections 3.2.3-3.2.6),
simple data types contain just one single value. The data types known in KRL are listed in
Tab. 3 together with their respective ranges of values.
Data type
Boolean
Character
INT
REAL
BOOL
CHAR
Meaning
Integer
Range of
values
INT
Real
Keyword
Tab. 3
Integer
-231¼ 231 -1
Floating--point Logic state
number
±1.1E-38¼
TRUE,
±3.4E+38
FALSE
1 character
ASCII
character
Simple data types
The data type Integer is a subset of the set of integers. It can only be a subset because no
computer can render the theoretically infinite set of integers. The 32 bits provided in the KR
C1 for integer types therefore result in 231 integers plus signs. The number 0 counts as a
positive number.
By means of
NUMBER = -23456
the variable NUMBER is assigned the value -23456.
If you assign an INTEGER variable a REAL value, the value will be rounded according to
general rules (x.0 to x.49 rounded down, x.5 to x.99 rounded up). By means of the statement
NUMBER = 45.78
the INTEGER variable NUMBER is assigned the value 46.
Exception: The result of integer division is cut off at the decimal point, e.g.:
7/4 = 1
Binary system
Hexadecimal
system
Whereas people calculate and think in the decimal system, a computer only knows zeros and
ones, which are represented by the two states off and on. A state (off or on) is thus represented by a bit. For reasons of speed, the computer generally accesses a whole bundle of such
zeros and ones. Typical bundle sizes are 8 bits (= 1 byte), 16 bits or 13 bits. For computeroriented operations, representation in the binary system (number system to the base two
using the digits 0 and 1) or in the hexadecimal system (number system to the base 16 using
the characters 0- and A- is useful (see Tab. 3.1). Binary or hexadecimal integers can be
-9
-F)
specified in KRL with the aid of inverted commas (’ and the prefix B for binary notation or
)
H for hexadecimal notation.
D
0
1
2
3
4
5
6
7
8
9
H
0
1
2
3
4
5
6
7
8
9
Tab. 3.1
10 11
A
B
12
13
14
15
16
C
D
E
F
10
The first 17 numbers in the decimal and hexadecimal systems
In KRL, you can therefore assign the number 90 to an integer variable in three different ways:
INTEG = 90
;Decimal system
INTEG = ’B1011010’ ;Binary system
INTEG = ’H5A’
;Hexadecimal system
Programmierung, Experte R2.2.8 08.98.00 en
23 of 164
Bin ® Dec
Binary numbers are converted to the decimal system as follows:
1 0 1 1 0 1 0
= 1S 6+0S 5+1S 4+1S 3+0S 2+1S 1+0S 0= 90
2
2
2
2
2
2
2
26 25 24 23 22 21 20
Hex ® Dec
To transfer numbers from the hexadecimal system to the decimal system, proceed as
follows:
5
REAL
A
161
160
=5S 1+10S 0=90
16
16
In floating-point representation, a number is divided into a fixed-point part and an exponent
and represented in standardized form. This results in the following representations, for
example:
5.3
as
0.53000000 E+01
-100
as
-0.10000000 E+03
0.0513 as
0.51300000 E-01
When calculating with real values, it must be borne in mind that because of the limited
number of places after the floating point and the inherent inaccuracy, the usual algebraic laws
are no longer applicable in all cases. By the laws of algebra, for example:
1· 3 = 1
3
If a computer performs this calculation, it could produce a result of just 0.99999999 E+00.
A logic comparison of this number with the number 1 would result in the value FALSE. For
practical applications in the field of robot control, however, this accuracy is generally
adequate, considering that the logic test for the equality of real numbers can sensibly be
carried out only within a small tolerance range.
Examples of permissible assignments to real variables:
REALNO1 = -13.653
REALNO2 = 10
REALNO3 = 34.56 E-12
If a REAL variable is assigned an INTEGER value, automatic type conversion to
REAL is carried out. According to the above assignment, the variable REALNO2
therefore has the value 10.0!
BOOL
The boolean variables are used to describe logic states (e.g. input/output states). They can
only have the value TRUE or FALSE:
STATE1 = TRUE
STATE2 = FALSE
CHAR
Character variables can represent exactly 1 character from the ASCII set of characters. In
the assignment of an ASCII character to a CHAR variable, the assigned character must be
placed between quotation marks (”
).
CHAR1 = ”G”
CHAR2 = ”?”
For information on storing entire character strings, see Section 3.2.4.
Programmierung, Experte R2.2.8 08.98.00 en
24 of 164
3.2.3
Arrays
The term “
arrays”refers to the combination of objects of the same data type to form a data
object; the individual components of an array can be addressed via indices. By means of the
declaration
DECL INT OTTO[7]
Array index
you can store, for example, 7 different integers in the array OTTO[]. You can access each
individual component of the array by specifying the associated index (the first index is always
the number 1).
OTTO[1]
OTTO[2]
OTTO[3]
OTTO[4]
OTTO[5]
OTTO[6]
OTTO[7]
=
=
=
=
=
=
=
5
10
15
20
25
30
35
; The
; The
; The
; The
; The
; The
; The
first element is assigned the number 5
second element is assigned the number 10
third element is assigned the number 15
fourth element is assigned the number 20
fifth element is assigned the number 25
sixth element is assigned the number 30
seventh element is assigned the number 35
It is helpful to imagine the array with the name OTTO[] as a rack with 7 compartments. In
accordance with the above assignments, the compartments would then be filled as follows:
5
OTTO
10
15
20
25
30
35
[1]
[2]
[3]
[4]
[5]
[6]
[7]
If all the elements of an array are now to be initialized with the same number, e.g. 0, you do
not have to program each assignment explicitly but can “
automate”the preassignment with
the aid of a loop and a counting variable.
FOR I = 1 TO 7
OTTO[I] = 0
ENDFOR
Section 6.2 Loops
In this case the counting variable is the integer variable I. It must be declared before being
used as an integer.
Counters
As counters of this type are required very often in programming, the KR C1 provides the
predefined array I[] with the 10 counters I[1]...I[10].
The value of these counters is retained after program reset, program deselection
and power off/on.
Using such a counter, you can therefore also initialize the array OTTO[] as follows:
FOR I[5] = 1 TO 7
OTTO[I[5]] = 0
ENDFOR
S An array may be of any data type. The individual elements can thus in turn
consist of composite data types (e.g. an array made up of arrays).
S Only integer data types are allowed for the index.
S Besides constants and variables arithmetic expressions are also allowed for
the index (see Section 3.3.1).
S The index always starts at 1.
Programmierung, Experte R2.2.8 08.98.00 en
25 of 164
2D arrays
Besides the one-dimensional arrays already discussed, i.e. arrays with only one index, you
can also use two- or three-dimensional arrays in KRL. By means of
DECL REAL MATRIX[7,3]
you can declare a two-dimensional 7× 3 array with 7· 3=21 REAL elements. It is helpful to
represent this array as a matrix with 7 columns and 3 rows. With the program sequence
I[3] = 0
FOR COLUMN = 1 TO 7
FOR ROW = 1 TO 3
I[3] = I[3] + 1
MATRIX[COLUMN,ROW] = I[3]
ENDFOR
ENDFOR
the elements of the matrix are assigned a value according to their sequence in the matrix.
The following matrix assignment is thus obtained:
Row/Column
2
3
4
5
6
7
1
1.0
4.0
7.0
10.0
13.0
16.0
19.0
2
2.0
5.0
8.0
11.0
14.0
17.0
20.0
3
3D arrays
1
3.0
6.0
9.0
12.0
15.0
18.0
21.0
Three-dimensional arrays can be envisaged as several two-dimensional matrices one
behind the other. The third dimension indicates, as it were, the level at which the matrix is
located (see Fig. 10). A three-dimensional array is declared similarly to the one- or
two-dimensional arrays, e.g.:
DECL BOOL ARRAY_3D[5,3,4]
The initialization sequence could then be as follows:
FOR COLUMN = 1 TO 5
FOR ROW = 1 TO 3
FOR LEVEL = 1 TO 4
ARRAY_3D[COLUMN,ROW,LEVEL] = FALSE
ENDFOR
ENDFOR
ENDFOR
Level 4
Level 3
Level 2
Level 1
Row 3
Row 2
Row 1
Column Column Column Column Column
1
2
3
4
5
Fig. 10 Representation of a three-dimensional array
Programmierung, Experte R2.2.8 08.98.00 en
26 of 164
3.2.4
Character strings
Using the data type CHAR, you can only store individual characters, as described. For the
purpose of using entire strings of characters, e.g. words, you simply define a one-dimensional array of type CHAR:
DECL CHAR NAME[8]
As usual, you can address each individual element of the array NAME[], e.g.:
NAME[3] = ”G”
G
However, you can also enter entire strings straight away:
NAME[] = ”ABCDEFG”
assigns to the first seven elements of the array NAME[] the letters A, B, C, D, E, F and
G:
A
B
C
D
E
F
G
Programmierung, Experte R2.2.8 08.98.00 en
27 of 164
3.2.5
Structures
STRUC
If different data types are to be combined, the array is not suitable and the more general form
of linkage must be used. Using the declaration statement STRUC , different data types which
have been previously defined or are predefined data types are combined to form a new composite data type.In particular, other composites and arrays can also form part of a composite.
A typical example of the use of composites is the standard data type POS. It consists of 6
REAL values and 2 INT values and has been declared in the file $OPERATE.SRC:
STRUC POS REAL X, Y, Z, A, B, C, INT S, T
Point
separator
Aggregate
If, for example, you now use a POSITION variable of the structure data type POS (the variable does not have to be declared because POS is the standard data type), you can assign
values to the elements either individually with the aid of the point separator, e.g.:
POSITION.X
POSITION.Y
POSITION.Z
POSITION.A
POSITION.B
POSITION.C
POSITION.S
POSITION.T
=
=
=
=
=
=
=
=
34.4
-23.2
100.0
90
29.5
3.5
2
6
or jointly by means of a so-called aggregate:
POSITION={X 34.4,Y -23.2,Z 100.0,A 90,B 29.5,C 3.5,S 2,T 6}
Aggregates are subject to the following conditions:
S The values of an aggregate can be simple constants or themselves aggregates.
S Not all components of the structure have to be specified in an aggregate.
S The components do not need to be specified in the order in which they have
been defined.
S Each component may only be contained once in an aggregate.
S In the case of arrays consisting of structures, an aggregate defines the value
of an individual array element.
S The name of the structure type can be specified at the beginning of an aggregate - separated by a colon.
The following assignments are thus also permissible for POS variables, for instance:
POSITION={B 100.0,X 29.5,T 6}
POSITION={A 54.6,B -125.64,C 245.6}
POSITION={POS: X 230,Y 0.0,Z 342.5}
In the case of POS, E6POS, AXIS, E6AXIS and FRAME structures missing components are not altered. In all other aggregates, non--existing components are set
to invalid.
The procedure for creating your own structure variables will be explained with the aid of the
following example:
In a subprogram for arc welding, the following information is to be transferred in a variable
S_PARA:
REAL
INT
BOOL
V_WIRE
CHARAC
ARC
Wire speed
Characteristic 0...100%
with/without arc (for simulation)
Programmierung, Experte R2.2.8 08.98.00 en
28 of 164
The variable S_PARA must consist of 3 elements of a different data type. First of all, a new
data type meeting these requirements must be created:
STRUC WELDTYPE REAL V_WIRE, INT CHARAC, BOOL ARC
A new data type with the designation WELDTYPE is thus created (WELDTYPE is not a
variable!). WELDTYPE consists of the 3 components V_WIRE, CHARAC and ARC. You can
now declare any variable of the new data type, e.g.:
DECL WELDTYPE S_PARA
You have thus created a variable S_PARA of the data type WELDTYPE. The individual
elements can be addressed with the aid of the point separator or the aggregate - as already
described.
S_PARA.V_WIRE = 10.2
S_PARA.CHARAC = 66
S_PARA.ARC = TRUE
or
S_PARA = {V_WIRE 10.2,CHARAC 50, ARC TRUE}
To make it easier to distinguish between self-defined data types of variables, the
names of the new data types should end with ¼ TYPE.
Predefined
Structures
The following structures are predefined in the file $OPERATE.SRC:
STRUC AXIS
STRUC E6AXIS
STRUC FRAME
STRUC POS
STRUC E6POS
REAL
REAL
REAL
REAL
REAL
A1,A2,A3,A4,A5,A6
A1,A2,A3,A4,A5,A6,E1,E2,E3,E4,E5,E6
X,Y,Z,A,B,C
X,Y,Z,A,B,C, INT S,T
X,Y,Z,A,B,C,E1,E2,E3,E4,E5,E6, INT S,T
The components A1...A6 of the structure AXIS are angle values (rotational axes) or translation values (translational axes) for the axis-specific movement of robot axes 1...6.
Using the additional components E1...E6 in the structure E6AXIS, external axes can be
addressed.
In the structure FRAME you can define 3 position values in space (X, Y and Z) and 3 orientations in space (A, B and C). A point in space is thus unambiguously defined in terms of position
and orientation.
As there are robots that can address one and the same point in space with several axis positions, the integer variables S and T in the structure POS are used to define an unambiguous
axis position.
Section 4.2.2 Status (S) and Turn (T)
By means of the components E1...E6 in the structure E6POS, external axes can again be
addressed.
Geometric
data types
The types AXIS, E6AXIS, POS, E6POS and FRAME are also called geometric data types
because they provide the programmer with a simple means of describing geometric relations.
Section 4.1 Coordinate systems
Programmierung, Experte R2.2.8 08.98.00 en
29 of 164
3.2.6
Enumeration types
An enumeration data type consisting of a limited set of constants. The constants are freely
selectable names and can be defined by the user. A variable of this data type (enumeration
variable) can only take on the value of one of these constants.
This will be explained on the basis of the system variable $MODE_OP, in which the operating
mode currently selected is stored. The modes T1, T2, AUT and EX are available for selection.
One could declare $MODE_OP as an integer variable, assign each mode a number and then
store this number in $MODE_OP. That would not be very clear, however.
ENUM
A much more elegant solution is provided by the enumeration type. In the file $OPERATE.SRC an enumeration data type with the name MODE_OP has been generated:
ENUM
MODE_OP
T1, T2, AUT, EX, INVALID
The command for declaring enumeration types is therefore called ENUM. Variables of the
enumeration type MODE_OP can only have the values T1, T2, AUT, EX or INVALID. The
variables are again declared using the keyword DECL:
DECL MODE_OP $MODE_OP
# sign
You can now allocate one of the four values of the data type MODE_OP to the enumeration
variable $MODE_OP by means of a normal assignment. As a means of distinguishing them
from simple constants, the self-defined enumeration constants are preceded by a “
#”sign
in initializations or queries, e.g.:
$MODE_OP = #T1
By means of ENUM, you can now generate any number of self-defined enumeration data
types.
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
30 of 164
3.3
Data manipulation
For manipulating the various data objects, there are a host of operators and functions available, with the aid of which formulae can be established. The power of a robot programming
language depends equally on the permissible data objects and their manipulation capabilities.
3.3.1
Operators
The term “
operators”refers to the usual mathematical operators as opposed to functions
such as SIN(30), which supplies the sine of the angle 30_ In the operation 5+7, 5 and 7
.
are therefore called operands and + the operator.
Operand
In each operation, the compiler checks the legitimacy of the operands. For example, 7 - 3
is a legitimate operation as the subtraction of two integers, whereas 5 + “
A”is an inadmissible
operation as the addition of an integer and a character.
In many operations, such as 5 + 7.1, i.e. the addition of integer and real values, type matching
is carried out, the integer value 5 being converted to the real value 5.0. This topic is dealt with
in greater detail in the discussion of the individual operators.
3.3.1.1
Arithmetic operators
Arithmetic operators concern the data types INTEGER and REAL. All 4 basic arithmetic
operations are allowed in KRL (see Tab. 4).
Operator Description
+
-
Subtraction or negative sign
*
Multiplication
/
Tab. 4
Addition or positive sign
Division
Arithmetic operators
The result of an arithmetic operation is only INT if both operands are of the data type
INTEGER. If the result of an integer division is not an integer, it is cut off at the decimal point.
If at least one of the two operands is REAL, the result too will be of the data type REAL (see
Tab. 5).
Operands
REAL
INT
INT
REAL
REAL
Tab. 5
INT
REAL
REAL
Result of an arithmetic operation
Programmierung, Experte R2.2.8 08.98.00 en
31 of 164
The following program example is intended to illustrate this:
DEF ARITH()
;-------- Declaration section ------INT A,B,C
REAL K,L,M
;------ Initialization section -----;All variables are invalid prior to initialization!
A = 2
;A=2
B = 9.8
;B=10
C = 7/4
;C=1
K = 3.5
;K=3.5
L = 0.1 E01
;L=1.0
M = 3
;M=3.0
;----------- Main section ----------A = A * C
;A=2
B = B - ’HB’
;B=-1
C = C + K
;C=5
K = K * 10
;K=35.0
L = 10 / 4
;L=2
L = 10 / 4.0
;L=2.5
L = 10 / 4.
;L=2.5
L = 10./ 4
;L=2.5
C = 10./ 4.
;C=3
M = (10/3) * M
;M=9.0
END
Programmierung, Experte R2.2.8 08.98.00 en
32 of 164
3.3.1.2
Geometric operator
The geometric operator is symbolized by a colon “
:”in KRL. It performs a frame linkage (logic
operation) on operands of the data types FRAME and POS.
The linkage of two frames is the usual transformation of coordinate systems. The linkage of
a FRAME structure and a POS structure therefore only affects the frame within the POS
structure. The components S and T remain unaffected by the transformation and therefore
do not have to be assigned a value. The values X, Y, Z, A, B and C must, however, always
be assigned a value in both POS operands and FRAME operands.
A frame operation is evaluated from left to right. The result always has the data type of the
operand on the far right (see Tab. 6).
Frame
linkage
Left operand Operator
Right operand
(reference CS)
(target CS)
POS
:
POS
POS
:
FRAME
FRAME
FRAME
:
POS
POS
FRAME
Tab. 6
Result
:
FRAME
FRAME
POS
Data type combinations with the geometric operator
If the lefthand operand has the data type POS, type matching takes place. The
position specified by the POS structure is transformed into a frame. That means
the system determines the tool frame for this position.
A simple example will be used in order to explain the mode of functioning of the geometric
operator (see Fig. 11):
In a room there is a table. The ROOM coordinate system is defined as a fixed coordinate
system with its origin at the front left corner of the room.
The table is located parallel to the walls of the room. The front left corner of the table is located
exactly 600 mm from the front wall and 450 mm from the lefthand wall of the room. The table
is 800 mm high.
On the table is a cuboidal workpiece. The WORKPIECE coordinate system has its origin at
one corner of the workpiece, as shown in Fig. 11. To allow the part to be optimally handled
in later operation, the Z-axis of the WORKPIECE coordinate system points downwards. The
workpiece is rotated by 40_in relation to the Z-axis of the TABLE coordinate system. The
position of the WORKPIECE coordinate system with reference to the TABLE coordinate
system is X = 80 mm, Y = 110 mm and Z = 55 mm.
Programmierung, Experte R2.2.8 08.98.00 en
33 of 164
BASE=TABLE:WORKPIECE
ZR
YR
XB
YB
ZB
ZT
YT
XT
XR
Fig. 11 Mode of functioning of the geometric operator
The task is now to define the WORKPIECE coordinate system in relation to the ROOM coordinate system. For this purpose, the following frame variables must first be defined:
FRAME TABLE, WORKPIECE, BASE
The ROOM coordinate system is already defined specifically to the system. The TABLE and
WORKPIECE coordinate systems are now initialized in accordance with the given constraints.
TABLE = {X 450,Y 600,Z 800,A 0,B 0,C 0}
WORKPIECE = {X 80,Y 110,Z 55,A -40,B 180,C 0}
The WORKPIECE coordinate system in relation to the ROOM coordinate system is now obtained with the aid of the geometric operator as
BASE = TABLE:WORKPIECE
In our case, BASE is then defined as follows:
BASE = {X 530,Y 710,Z 855,A -40,B 180,C 0}
Programmierung, Experte R2.2.8 08.98.00 en
34 of 164
Only in this specific case do the components of BASE result from the
addition of the components of TABLE and WORKPIECE. This is due to the
fact that the TABLE coordinate system is not rotated in relation to the
ROOM coordinate system.
In general, though, simple addition of the components is not possible!
Frame linking is not commutative either, meaning that if the reference
frame and the target frame are interchanged, the result too will normally
change!
Section 4.1 Coordinate systems
Another example illustrating application of the geometric operator: Various coordinate systems and linkages of coordinate systems are addressed in this example. In order to illustrate
changes in orientation, the tool center point is moved in each coordinate system first a short
distance in the X direction, then in the Y direction and finally in the Z direction.
Programmierung, Experte R2.2.8 08.98.00 en
35 of 164
DEF GEOM_OP ( );-------- Declaration section --------EXT BAS (BAS_COMMAND :IN,REAL :IN )
DECL AXIS HOME
;Variable HOME of type AXIS
DECL FRAME MYBASE[2]
;Array of type FRAME;---------- Initialization --------BAS (#INITMOV,0 ) ;Initialization of velocities,
;accelerations, $BASE, $TOOL, etc.
HOME={AXIS: A1 0,A2 -90,A3 90,A4 0,A5 30,A6 0}; Set base coordinate system
$BASE={X 1000,Y 0,Z 1000,A 0,B 0,C 0}REF_POS_X={X 100,Y 0,Z 0,A
0,B 0,C 0}
;Reference position
REF_POS_Y={X 100,Y 100,Z 0,A 0,B 0,C 0}
REF_POS_Z={X 100,Y 100,Z 100,A 0,B 0,C 0}; Define own coordinate
systems
MYBASE[1]={X 200,Y 100,Z 0,A 0,B 0,C 180}
MYBASE[2]={X 0,Y 200,Z 250,A 0,B 90,C 0};----------- Main section ---------PTP HOME ; BCO run; Motion in relation to $BASE coordinate system
PTP $NULLFRAME
;Direct positioning to origin of $BASE-CS
WAIT SEC 2
;Wait 2 seconds
PTP REF_POS_X
;Move 100mm in x direction
PTP REF_POS_Y
;Move 100mm in y direction
PTP REF_POS_Z
;Move 100mm in z direction; Motion in
relation to $BASE-CS offset by MYBASE[1]
PTP MYBASE[1]
WAIT SEC 2
PTP MYBASE[1]:REF_POS_X
PTP MYBASE[1]:REF_POS_Y
PTP MYBASE[1]:REF_POS_Z; Motion in relation to $BASE-CS offset
by MYBASE[2]
PTP MYBASE[2]
WAIT SEC 2
PTP MYBASE[2]:REF_POS_X
PTP MYBASE[2]:REF_POS_Y
PTP MYBASE[2]:REF_POS_Z; Motion in relation to $BASE-CS offset
by MYBASE[1]:MYBASE[2]
PTP MYBASE[1]:MYBASE[2]
WAIT SEC 2
PTP MYBASE[1]:MYBASE[2]:REF_POS_X
PTP MYBASE[1]:MYBASE[2]:REF_POS_Y
PTP MYBASE[1]:MYBASE[2]:REF_POS_Z; Motion in relation to
$BASE-CS offset by MYBASE[2]:MYBASE[1]
PTP MYBASE[2]:MYBASE[1]
WAIT SEC 2
PTP MYBASE[2]:MYBASE[1]:REF_POS_X
PTP MYBASE[2]:MYBASE[1]:REF_POS_Y
PTP MYBASE[2]:MYBASE[1]:REF_POS_ZPTP HOME
END
Programmierung, Experte R2.2.8 08.98.00 en
36 of 164
3.3.1.3
Relational operators
Using the relational operators listed in Tab. 7, it is possible to form logical expressions. The
result of a comparison is therefore always of the data type BOOL, since a comparison can
only ever be TRUE or FALSE.
Operator
Description
==
equal to
INT, REAL, CHAR, ENUM, BOOL
& lt; & gt;
not equal to
INT, REAL, CHAR, ENUM, BOOL
& gt;
greater than
INT, REAL, CHAR, ENUM
& lt;
less than
INT, REAL, CHAR, ENUM
& gt; =
& lt; =
Tab. 7
Permissible data types
greater than or INT, REAL, CHAR, ENUM
equal to
less than or
INT, REAL, CHAR, ENUM
equal to
Relational operators
Comparisons can be used in program execution instructions (see Section 6), and the result
of a comparison can be assigned to a boolean variable.
The test for equality or inequality is of only limited use with real numbers since
algebraically identical formulae can supply unequal values due to rounding errors
in the calculation of the values to be compared (see 3.2.2).
S Operand combinations of INT, REAL and CHAR are possible.
S An ENUM type may only be compared with the same ENUM type.
S A BOOL type may only be compared with a BOOL type.
The comparison of numeric values (INT, REAL) and character values (CHAR) is possible because each ASCII character is assigned an ASCII code. This code is a number defining the
order of the characters in the character set.
In their declaration, the individual constants of an enumeration type are numbered in the order of their occurrence. The relational operators refer to these numbers.
Both simple and multiple comparisons are permitted. Some examples to illustrate this:
¼
BOOL A,B
¼
B = 10 & lt; 3
;B=FALSE
A = 10/3 == 3
;A=TRUE
B = ((B == A) & lt; & gt; (10.00001 & gt; = 10)) == TRUE
;B=TRUE
A = “F” & lt; “Z”
;A=TRUE
¼
Programmierung, Experte R2.2.8 08.98.00 en
37 of 164
3.3.1.4
Logical operators
These operators are used for performing logical operations on boolean variables, constants
and simple logical expressions, as are formed with the aid of relational operators. For example, the expression
(A & gt; 5) AND (A & lt; 12)
has the value TRUE only if A lies in the range between 5 and 12. Such expressions are frequently used in instructions serving the purpose of checking program execution (see Section
6). The logical operators are listed in Tab. 8.
Operator
Description
NOT
1
Inversion
AND
2
Logical AND
OR
2
Logical OR
EXOR
Tab. 8
Operand number
2
Exclusive OR
Logical operators
The operands of a logical operation must be of type BOOL, and the result too is always of type
BOOL. The possible results of the various logical operations are shown in Tab. 9 as a function
of the value of the operands.
Operation
NOT A
A AND B
A OR B
A EXOR B
A = TRUE
FALSE
TRUE
TRUE
FALSE
A = TRUE
B = FALSE
FALSE
FALSE
TRUE
TRUE
A = FALSE
B = TRUE
TRUE
FALSE
TRUE
TRUE
A = FALSE
Tab. 9
B = TRUE
B = FALSE
TRUE
FALSE
FALSE
FALSE
Truth table for logical operations
Some examples of logical operations:
¼
BOOL A,B,C
¼
A = TRUE
B = NOT A
C = (A AND B) OR NOT (B EXOR NOT A)
A = NOT NOT C
¼
;A=TRUE
;B=FALSE
;C=TRUE
;A=TRUE
Programmierung, Experte R2.2.8 08.98.00 en
38 of 164
3.3.1.5
Bit operators
Using the bit operators (see Tab. 10), whole numbers can be combined by performing logical
operations on the individual bits of the numbers. The bit operators combine individual bits
just as the logical operators combine two boolean values if the bit value 1 is regarded as TRUE
and the value 0 as FALSE.
Bit- -bit ANDing of the numbers 5 and 12 thus produces the number 4, for example, bit- -by-bybit ORing the number 13 and bit- -bit exclusive ORing the number 9:
-by-
0
1
0
1
= 5
1
1
0
0
= 12
AND
0
1
0
0
= 4
OR
1
1
0
1
= 13
EXOR
1
0
0
1
= 9
Bit- -bit inversion does not simply involve all the bits being inverted. Instead, when B_NOT
-byis used, 1 is added to the operand and the sign is changed, e.g.:
B_NOT 10 = -11
B_NOT -10 = 9
Bit operators are used, for example, to combine digital I/O signals (see 7.3).
Operator
Operand number
Description
B_NOT
1
Bit--by--bit inversion
B_AND
2
Bit--by--bit ANDing
B_OR
2
Bit--by--bit ORing
B_EXOR
2
Bit--by--bit exclusive ORing
Tab. 10 Logical bit operators
As ASCII characters can also be addressed via the integer ASCII code, the data
type of the operands may also be CHAR besides INT. The result is always of type
INT.
Programmierung, Experte R2.2.8 08.98.00 en
39 of 164
Examples illustrating the use of bit operators:
¼
INT A
¼
A = 10 B_AND 9
A = 10 B_OR 9
A = 10 B_EXOR 9
A = B_NOT 197
A = B_NOT ’HC5’
A = B_NOT ’B11000101’
A = B_NOT “E”
¼
Setting bits
;A=8
;A=11
;A=3
;A=-198
;A=-198
;A=-198
;A=-70
Let us assume you have defined an 8- digital output. You can address the output via the
-bit
INTEGER variable DIG. To set bits 0, 2, 3 and 7, you can now simply program
DIG = ’B10001101’ B_OR DIG
All the other bits remain unaffected, regardless of their value.
Masking out
bits
Filtering out
bits
If you want to mask out bits 1, 2 and 6, program
DIG = ’B10111001’ B_AND DIG
All the other bits remain unaltered.
You can just as easily use the bit operators to check whether individual bits of the output are
set. The expression
(’B10000001’ B_AND DIG) == ’B10000001’
becomes TRUE if bits 0 and 7 are set, otherwise it is FALSE.
If you only want to test whether at least one of the two bits 0 and 7 is set, the result of the
bit- -bit ANDing merely has to be greater than zero:
-by(’B10000001’ B_AND DIG) & gt; 0
Programmierung, Experte R2.2.8 08.98.00 en
40 of 164
3.3.1.6
Priority of operators
If you use complex expressions with several operators, you must take into account the different priorities of the individual operators (see Tab. 11), as the various expressions are executed in the order of their priorities.
Priority
Priority
Operator
1
NOT
B_NOT
2
*
/
3
+
-
4
AND
B_AND
5
EXOR B_EXOR
6
OR
B_OR
7
==
& lt; & gt;
& lt;
& gt;
& gt; =
& lt; =
Tab. 11 Priority of operators
General rules:
G Bracketed expressions are processed first.
G Non-bracketed expressions are evaluated in the order of their priority.
G Logic operations with operators of the same priority are executed from left to right.
Examples:
¼
INT A,B
BOOL E,F
¼
A = 4
B = 7
E = TRUE
F = FALSE
¼
E = NOT E OR F AND NOT (-3 + A * 2 & gt; B)
A = 4 + 5 * 3 - B_NOT B / 2
B = 7 B_EXOR 3 B_OR 4 B_EXOR 3 B_AND 5
F = TRUE == (5 & gt; = B) AND NOT F
¼
;E=FALSE
;A=23
;B=5
;F=TRUE
Programmierung, Experte R2.2.8 08.98.00 en
41 of 164
3.3.2
Standard functions
For calculating certain mathematical problems, a number of standard functions are predefined in KRL (see Tab. 12). They can be used directly without further declaration.
Description
Function
Data type
of
argument
Range of
values of
argument
Data
type of
function
Range of
values of
result
Absolute
value
Square
root
Sine
ABS(X)
REAL
--8¼ +8
REAL
0¼ +8
SQRT(X)
REAL
0¼ +8
REAL
0¼ +8
SIN(X)
REAL
--8¼ +8
REAL
-1¼ +1
Cosine
COS(X)
REAL
--8¼ +8
REAL
-1¼ +1
Tangent
TAN(X)
REAL
--8¼ +8*
REAL
--8¼ +8
Arc cosine
ACOS(x)
REAL
-1¼ +1
REAL
0_ 180_
¼
Arc
tangent
ATAN2(Y,X)
REAL
--8¼ +8
REAL
-90_ +90_
¼
* no odd multiple of 90_ i.e. X ¸ (2k-1)*90_ kÎ 8
,
,
Tab. 12 Mathematical standard functions
Absolute
value
The function ABS(X) calculates the absolute value X, e.g.:
B = -3.4
A = 5 * ABS(B)
;A=17.0
Square root
SQRT(X) calculates the square root of the number X, e.g.:
A = SQRT(16.0801)
;A=4.01
Sine
Cosine
Tangent
The trigonometric functions SIN(X), COS(X) and TAN(X) calculate the sine, cosine or
tangent of the angle X, e.g.:
A = SIN(30)
;A=0.5
B = 2*COS(45)
;B=1.41421356
C = TAN(45)
;C=1.0
The tangent of ±90_
and odd multiples of ±90_
(±270_ ±450_ ±630_ is infinite. An attempt
,
,
...)
to calculate one of these values therefore generates an error message.
Arc cosine
ACOS(X) is the inverse function of COS(X):
A = COS(60)
B = ACOS(A)
Arc sine
;A=0.5
;B=60
There is no standard function predefined for arc sine, the inverse function of SIN(X). However, this can be very easily calculated on the basis of the relationship SIN(X) = COS(90_
-X):
A = SIN(60)
;A=0.8660254
B = 90-ACOS(A)
;B=60
Programmierung, Experte R2.2.8 08.98.00 en
42 of 164
The tangent of an angle is defined as the opposite side (Y) divided by the adjacent side (X)
of a right triangle. Knowing the length of the two legs of the triangle, it is therefore possible
to calculate the angle between the adjacent side and the hypotenuse by means of the arc
tangent.
Arc tangent
If we now consider a full circle, the sign of the components X and Y is of decisive importance.
If we were only to consider the quotient, it would only be possible to calculate angles between
0_and 180_by means of the arc tangent. This is also the case with all customary pocket
calculators: The arc tangent of positive values gives an angle between 0_and 90_ the arc
,
tangent of negative values an angle between 90_and 180_
.
By the explicit specification of X and Y, the quadrant in which the angle is located is unambiguously defined by their signs (see Fig. 12). You can therefore also calculate angles in
quadrants III and IV. For calculating the arc tangent in the function ATAN2(Y,X), these two
specifications are therefore also necessary, e.g.:
A
B
C
D
=
=
=
=
ATAN2(0.5,0.5)
ATAN2(0.5,-0.5)
ATAN2(-0.5,-0.5)
ATAN2(-0.5,0.5)
;A=45
;B=135
;C=225
;D=315
II
I
X=COS(a)
Y=SIN(a)
a
0
III
IV
Fig. 12 Use of X and Y in the function ATAN2(Y,X)
Section 8 for defining your own functions
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
43 of 164
3.4
System variables and system files
An important precondition for processing complex robotic applications is a freely and easily
programmable controller.
To meet this requirement, the functionality of the robot controller must be programmable in
the robot language. The full functionality of a robot controller can only be utilized if the control
parameters can be completely and yet easily integrated into a robot program. This is optimally solved in the KR C1 by means of the concept of predefined system variables and files.
Examples of predefined variables are $POS_ACT (current robot position), $BASE (base coordinate system) or $VEL.CP (CP velocity). A detailed description and a list of all predefined
variables can be found in the training manual.
System variables are completely integrated into the variables concept of KRL. They possess
a corresponding data type and can be read and written by you like any other variable in the
program provided there are no restrictions due to the type of data. The current robot position,
for example, cannot be written but only read. Restrictions of this nature are checked by the
controller.
As far as is permitted by the safety concept, you even have write access to system data. This
creates a wide range of diagnostic capabilities since a large number of system data can be
loaded or influenced from the KCP or programming system.
Examples of useful system variables with write access are $TIMER[] and $FLAG[].
Timers
The 16 timer variables $TIMER[1]¼ $TIMER[16] serve the purpose of measuring time
sequences and can thus be used as a “
stopwatch” A timing process is started and stopped
.
by means of the system variables $TIMER_STOP[1]¼ $TIMER_STOP[16]:
$TIMER_STOP[4] = FALSE
starts timer 4, for example.
$TIMER_STOP[4] = TRUE
stops timer 4 again. The timer variable concerned can be reset at any time using a normal
value assignment, e.g.:
$TIMER[4] = 0
If the value of a timer variable changes from minus to plus, a corresponding flag is set to TRUE
(timer-out condition), e.g.:
$TIMER_FLAG[4] = TRUE
When the controller is booted, all the timer variables are preset to 0, the flags
$TIMER_FLAG[1]¼ $TIMER_FLAG[16] to FALSE and the variables $TIMER_STOP[1]
¼ $TIMER_STOP[16] to TRUE.
The unit of the timer variables is milliseconds (ms). $TIMER[1]¼ $TIMER[16] and
$TIMER_FLAG[1]¼ $TIMER_FLAG[16] are updated in a 12 ms cycle.
Programmierung, Experte R2.2.8 08.98.00 en
44 of 164
Flags
The 1024 flags $FLAG[1]¼ $FLAG[1024] are used as global markers. These boolean
variables are preset to FALSE. You can view the current values of the markers on the user
interface at any time by means of the “
Monitor”menu item.
Cyclical flags
There are also 32 cyclical flags $CYCFLAG[1]¼ $CYCFLAG[32] available in the KR C1.
They are all preset to FALSE after the controller has booted.
The flags are cyclically active at the robot level only. Cyclical flags are permissible in a submit
file, but they are not cyclically evaluated.
Cyclical flags can also be defined and activated in subprograms, functions and interrupt
subprograms.
$CYCFLAG[1]¼ $CYCFLAG[32] have the data type BOOL. Any boolean expression can be
used in an assignment to a cyclical flag.
The following are allowed:
G
Boolean system variables
G
Boolean variables which have been declared and initialized in a data list.
Not allowed on the other hand are
G
functions that return a boolean value.
The statement
$CYCFLAG[10] = $IN[2] AND $IN[13]
has the effect that the boolean expression ”$IN[2] AND $IN[13]” is cyclically evaluated, for example. This means that as soon as input 2 or input 13 changes, $CYCFLAG[10]
changes too, regardless of the location of the program pointer after the above expression
has been executed.
All the cyclical flags defined remain valid until a module is deselected or block selection is
carried out by means of reset. All the cyclical flags remain active when the end of the program
is reached.
Section 9.5 for the use of cyclical flags
$ sign
The names of the predefined variables have generally been chosen to allow them to be easily
remembered. They all begin with a $ sign and then consist of a meaningful English abbreviation. As they are treated like normal variables, you do not have remember any unusual
commands or rare options.
To avoid any risk of confusion, you should not declare any variables yourself
which begin with a $ sign.
Some of the predefined variables refer to the overall KR C1 controller (e.g. $ALARM_STOP
for defining the output for the Emergency Stop signal to the PLC). Others, however, are of
relevance to the robot only (e.g. $BASE for the base coordinate system).
Programmierung, Experte R2.2.8 08.98.00 en
45 of 164
The control-relevant data are stored on the hard disk in the directory “
Steu” the robot,
relevant data in the directory “ . On the KUKA GUI, the control system appears as “
R1”
/”and
the robot system as a subdirectory of the control system with the name “
R1”(see Fig. 13).
Control and robot level
PC level
Fig. 13 Various levels on the KUKA graphic user interface
When programming the KR C1, you can create program files and data lists. Located in the
program files are data definitions and executable instructions, while the data lists only contain
data definitions and possibly initializations.
Section 11 Data lists
In addition to the data lists that you create during programming, there are also data lists in
the KR C1 that are defined by KUKA and supplied with the control software. These data lists
are called predefined data lists and mainly contain the predefined variables.
You can neither delete nor generate the predefined data lists yourself. They are generated
when the software is installed and are then always available. Like the names of the predefined data, the names of the predefined data lists also begin with a $ sign.
The following predefined data lists exist in the KR C1:
G
$OPERATE.SRC
constitutes the only exception for implementation reasons. This is namely a predefined
program file and not a predefined data list. Program files are units programmed in KRL
(see Section 2). Variables are also defined in them, as in data lists. Since only predefined variables are contained in $OPERATE.SRC, the difference is of no importance
here. $OPERATE.SRC exists both in the control system and in every robot system.
Control-specific data are above all the current settings for operator control devices and
the command environment, whereas robot-specific data primarily concern program
and robot status data. You cannot create new variables or delete existing ones.
Examples:
$HOME
$BASE
G
Default setting of the environment (control-specific)
Base coordinate system (robot-specific)
$MACHINE.DAT
is a predefined data list with exclusively predefined system variables. The machine data
serve the purpose of adapting the controller to the connected robot (cycles, kinematic
information, control parameters, etc.). There is a $MACHINE.DAT in both the control
system and the robot system. You cannot create new variables or delete existing ones.
Programmierung, Experte R2.2.8 08.98.00 en
46 of 164
Examples:
$ALARM_STOP
$NUM_AX
G
$CUSTOM.DAT
is a data list that only exists in the control system. It contains data with which you can
configure or parameterize certain control functions. The programmer is only able to
alter the values of the predefined variables. You cannot create new variables or delete
existing ones.
Examples:
$PSER_1
$IBUS_ON
G
Signal for Emergency Stop (control-specific)
Number of robot axes (robot-specific)
Protocol parameters of serial interface 1
Activation of alternative Interbus groups
$CONFIG.DAT
is a data list predefined by KUKA which does not contain any system variables, however. There is a $CONFIG.DAT available at both the control level and the robot level.
Variables, structures, channels and signals can be defined in it which are valid over a
long time and are of general significance for a lot of programs.
The data list is divided into the following blocks:
-
BAS
-
AUTOEXT
-
GRIPPER
-
PERCEPT
-
SPOT
-
A10
-
A20
-
TOUCHSENSE
-
USER
G
Global declarations by the user should always be entered in the USER block since only
here will the declarations be transferred in a later software upgrade.
G
$ROBCOR.DAT
The file $ROBCOR.DAT contains robot-specific data for the dynamic model of the
robot. These data are required for path planning. You cannot create new variables or
delete existing ones in this file either.
Tab. 13 provides a summary of the predefined data lists.
Programmierung, Experte R2.2.8 08.98.00 en
47 of 164
Data list
System
Value assignment
Control
Robot
at
by
$OPERATE.SRC
n
n
delivery
KUKA
$MACHINE.DAT
n
n
commissioning
KUKA/user
$CUSTOM.DAT
n
commissioning
user/KUKA
$CONFIG.DAT
n
user/KUKA
$ROBCOR.DAT
n
cell installation or
conversion
delivery
n
KUKA
Tab. 13 Predefined data lists in the KR C1
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
48 of 164
SOFTWARE
KR C1
Programming Handbook
Release 2.2
Programmierhandbuch R2.2.8 09.98.00 en
1 of 32
eCopyright
KUKA Roboter GmbH
This documentation or excerpts therefrom may not be reproduced or disclosed to third parties without the express permission of the publishers.
Other functions not described in this documentation may be operable in the controller. The user has no claim 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 software 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
regular basis, however, and necessary corrections will be incorporated in subsequent editions.
Subject to technical alterations without an effect on the function.
Length of documentation: 32 pages
PD Interleaf
Programmierhandbuch R2.2.8 09.98.00 en
2 of 32
2
General information on KRL programs
2.1
Structure and creation of programs
Switching to the expert level also causes the user interface to change (see Fig. 2).
Fig. 2 User interface at expert level
Whereas all the system files are invisible to the user, they can now be seen and also edited
by the expert in the program window. Not only the file names and comments are displayed
at expert level but also the file extensions, attributes and sizes.
Programmierung, Experte R2.2.8 08.98.00 en
9 of 164
The files listed in Tab. 1 are available as standard after the KR C1 software has been
installed.
File
Meaning
$CONFIG.DAT
System data list with general configuration data
$MASCHINE.DAT System data list with system variables for adapting the
controller and the robot
$OPERATE.SRC System file with program and robot status data
$ROBCOR.DAT
A10.DAT
A10.SRC
A10_INI.DAT
A10_INI.SRC
A20.DAT
A20.SRC
A50.DAT
A50.SRC
ARCSPS.SUB
System data list with data for the dynamic model of the
robot
Application technology package for arc welding with
analog reference voltages
Application technology package for initializing arc welding
with analog reference voltages
Application technology package for arc welding with digital
program numbers
Application technology package for use of the LIBO
(through--the--arc) sensor
Submit file for arc welding
BAS.SRC
Basic package for initialization etc.
BOSCH.SRC
Program for spot welding with serial interface to Bosch
spot welding timer PSS5200.521C
Program for controlling robots via a central PLC
CELL.DAT
CELL.SRC
CLEANER.DAT
CLEANER.SRC
FLT_SERV.DAT
FLT_SERV.SRC
H50.SRC
H70.SRC
Program for user--defined fault service functions in arc
welding
Gripper package
Touch sensor package
IR_STOPM.SRC
Program for fault service functions in response to robot
malfunctions
MSG_DEMO.SRC Program with examples of user messages
NEW_SERV.SRC
P00.DAT
P00.SRC
PERCEPT.SRC
Program package for control via a PLC
SPS.SUB
Submit file
USER_GRP.DAT
USER_GRP.SRC
USERSPOT.SRC
Program for user--defined gripper control
WEAV_DEF.SRC
Tab. 1
Program for altering start options
Program for weave motions
Program for calling the PERCEPTRON protocol
Program package for spot welding
Pre-installed files in the directory R1
Programmierung, Experte R2.2.8 08.98.00 en
10 of 164
Path
The current path and the current directory are always shown on the left next to the progam
window. In Fig. 2, for example, the program window shows the files of the “
Robot”path (i.e.
all the files in the RAM). To load a file from the hard disk or a floppy disk, for instance, you
have to use the menu key “
File”and the menu item “
Drives”to change to the “
Drives”level
(see Fig. 3). The available drives now appear on the lefthand side and you can load the file
into the desired directory.
File
Setup
Configure
Monitor
Help
Fig. 3 Changing from Drives to Robot level
To create a new program at user level, you only need to enter a name for the new program
after pressing the softkey “
New” This generates two files simultaneously with the specified
.
name and the file extensions “
.SRC”and “
.DAT”
.
The SRC file contains the actual program code. The DAT file, on the other hand, contains
important program data.
File concept
This division is based on the KRL file concept: Besides the processing sequence, the
program of an industrial robot contains various actions which the robot is to perform. This
may be a path segment that the robot has to execute or the opening of a special gripper
subject to certain constraints. When testing programs, it is essential to be able to execute
tasks of this nature individually. The file concept has been implemented in KRL for the
purpose of meeting these special requirements in robot programming.
File
A file is the unit that is programmed by the programmer. It thus corresponds to a file on the
hard disk or in the memory (RAM). Any program in KRL may consist of one or more files.
Simple programs contain exactly one file. More complex tasks can be solved better using
a program that consists of several files. The inner structure of a KRL file comprises the
declaration section, the instruction (or statement) section and up to 255 local subprograms
and functions (see Section 8). The object name without an extension is also the name of the
file and is therefore prefixed by DEF in the declaration. The name may consist of up to 8
characters and must not be a keyword (see Section 3.1). Every file begins with the
declaration DEF and ends with END:
DEF
DEF NAME()
Declarations
Instructions
END
Instruction
Unlike declarations, instructions are of a dynamic nature. They are executed when the program is processed.
Declaration
Declarations are already evaluated before program execution, i.e. during compilation. No
instructions may therefore be located in the declaration section. The first instruction is the
beginning of the instruction section.
Data list
Exactly one data list may be assigned to each file. This is not mandatory however. The data
list and file are identified as belonging together by their common name. The names differ in
their extension only, e.g.:
File:
Data list:
PROG1.SRC
PROG1.DAT
Only declarations are allowed in data lists. If the data list and the file have the same name,
variables declared in the data list can be used in the same way as variables declared in the
file.
Programmierung, Experte R2.2.8 08.98.00 en
11 of 164
Section 11 Data lists
As a robot program can also be written without a data list, the file and data list are not both
automatically created at the same time at expert level. By pressing the softkey “
New”you
therefore open an inline form in which you also have to specify at least the file extension in
addition to the name (see Fig. 4). If you want to use a data list as well as the file, you therefore
have to create two files at expert level. The data list is mandatory if you also want to insert
menu-driven commands in your SRC file.
File name
File extension
(max. 8 characters) (SRC, DAT or SUB)
Comment
Fig. 4 Creating new files or data lists
Submit
file
Besides the robot files (SRC) there are also submit files. Submit files contain program instructions and can be used, for example, to control the peripheral equipment (grippers, etc.).
Submit files work parallel to operation of the robot. For identification, submit files have the
extension “
.SUB”
.
After you have created a file or data list by means of “
New” you can edit them using the editor.
,
On closing the editor, the complete program code is compiled, i.e. the textual KRL code is
translated into a machine language that can be understood by the controller.
Compiler
In this process, the compiler checks that the code is syntactically and semantically correct.
If errors are detected, a message is generated and an error file created with the file extension
“
.ERR”(see Section 2.4).
Linkage editor
A program can only be selected and executed if it contains no errors. On selection, all the
files and data lists required are linked to create a program. During linking, it is checked whether all the modules are present, compiled and free from errors. When transferring parameters, the linkage editor also checks the type compatibility of the transfer parameters. If errors
occur during linking, an error file is created, as in compilation.
When programs are created by means of the softkey “
New”on the user interface, an initialization sequence with “
INI”and an instruction for moving to a HOME position at the beginning
and end of the program are automatically inserted in addition to the header line DEF... and
END. This involves a skeleton program (located in the file “
Program_Files/KRC/TEMPLATE/
vorgabe.src” or “
Program_Files/KRC/TEMPLATE/vorgabe.dat” being copied to the new
)
name.
You can of course also write any KRL program using a perfectly normal text editor and then
load it into the system memory by means of the softkey “
Load” In this case, however, you
.
must make sure yourself that all the necessary initializations (e.g. axis velocities) are carried
out.
Programmierung, Experte R2.2.8 08.98.00 en
12 of 164
A simple robot program might then look like this:
DEF PROG1()
;---- Declaration section ---INT J
;---- Instruction section ---$VEL_AXIS[1]=100
;Specification of axis velocities
$VEL_AXIS[2]=100
$VEL_AXIS[3]=100
$VEL_AXIS[4]=100
$VEL_AXIS[5]=100
$VEL_AXIS[6]=100
$ACC_AXIS[1]=100
$ACC_AXIS[2]=100
$ACC_AXIS[3]=100
$ACC_AXIS[4]=100
$ACC_AXIS[5]=100
$ACC_AXIS[6]=100
;Specification of axis accelerations
PTP {A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0}
FOR J=1 TO
PTP {A1
PTP {A2
PTP {A1
ENDFOR
5
45}
-70,A3 50}
0,A2 -90,A3 90}
PTP {A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0}
END
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
13 of 164
2.2
Altering programs
There are basically two methods of altering a program at the Expert level of the graphic user
interface. By means of
G
editor
G
or program correction (PROCOR).
Program correction is the standard method. The PROCOR mode is automatically active
when a program is selected or a running program is stopped.
In this mode, only commands that affect just one program line can be entered or edited. Therefore no check structures
(loops etc.) or variable declarations.
Line
interpreter
Editor
The reason for this is that the program remains selected and the individual commands are
checked in the basic system by a line interpreter. Unlike the compiler, the line interpreter can
only check individual lines. For compilation, however, the program must be deselected.
If you want to edit or insert certain KRL commands or program structures, the editor therefore
has to be used. Since the complete code is compiled when the editor is closed, errors can
also be detected which only occur in the interaction of several lines (e.g. incorrectly declared
variables).
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
14 of 164
2.3
Program run modes
The program run modes define whether program execution is to take place
G
step by step
G
motion instruction by motion instruction or
G
without a program stop.
All the program run modes are described in Tab. 2.
Run mode
ISTEP
MSTEP
GO
Tab. 2
Description
Incremental Step (single step)
The program is executed step by step, i.e. with a STOP after
each instruction (including blank lines).
The program is executed without advance processing.
Motion Step (program step)
The program is executed one motion instruction at a time, i.e.
with a STOP before each motion instruction.
The program is executed without advance processing.
All instructions in the progam are executed up to the end of the
program without a STOP.
Program run modes
The program run mode can be set on the KCP or by means of software using the enumeration
variable $PRO_MODE, e.g.:
$PRO_MODE = #GO
Section 3.2.6 Enumeration types
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
15 of 164
2.4
Error treatment
If an error occurs during compilation or linking, an error message is displayed and an error
file is created with an error log.
Error
message
This file has the same name as the errored file with the extension “
.ERR”
.
File:
PROG2.SRC
Error file:
PROG2.ERR
The error file can be viewed with the editor. It contains the incorrect line, the associated line
number, the file type (SRC, DAT or SUB) and an error number providing an indication of the
type of error.
Documentation of the error messages, troubleshooting
A file ERROR.SRC will be used here as an example. In this file, the loop variable I has not
been declared and the assignment I == I + 1 contains one equal sign too many (see Fig. 5).
Fig. 5 File ERROR.SRC with errors
After the editor is closed, an error message is displayed in the message window and an error
file ERROR.ERR is created (see Fig. 6).
Programmierung, Experte R2.2.8 08.98.00 en
16 of 164
compilation error
Fig. 6 File ERROR.ERR has been created
Error log
You can now view the error log with the editor (see Fig. 7).
Fig. 7 Contents of file ERROR.ERR
It is evident from the error log that
G
there are 3 lines with errors in the corresponding SRC file,
G
the lines with errors are the lines numbered 58, 59 and 62,
G
in line 58 the error messages
-
G
2137: Name not declared as simple variable
2263: Type of loop variable not equal to INT
in line 59 the error message
-
G
2137: Name not declared as simple variable
in line 62 the error message
-
2309: ’
(’expected
have occurred. From error messages 2137 and 2263 it is readily evident that variable I has
not been declared as an integer. Message 2309 means: The compiler interprets the line as
a subprogram call, in which the brackets are missing, however.
Programmierung, Experte R2.2.8 08.98.00 en
17 of 164
The SRC file can be reloaded into the editor and the appropriate corrections made. With
regard to the line numbers, it must be ensured that all the folds are open (menu key
“
Program/FOLD/All FOLDs op” and the limited visibility is switched off (menu key
)
“
Help/Limited Visibility” (see Section 12). As a further aid, three asterisks “
)
***”are inserted
at the beginning of the incorrect line with specific errors (see Fig. 8).
Fig. 8 View of ERROR.SRC with folds open and
“
Limited Visibility”switched off
Correct the errors by inserting the line
INT I
before the INI line and deleting one of the equal signs in line 62.
It is not necessary to delete the asterisks since they are automatically removed
on quitting the editor.
I = I + 1
After the errors have been corrected, the error file ERROR.ERR is automatically deleted (the
file list may have to be refreshed by means of the menu key “
Help/Refresh”
).
2.5
Comments
Comments are an important part of any computer program. They enable you to make your
program transparent and also understandable for others. The execution speed of the
program is not affected by comments.
Semicolon
Comments can be inserted at any point in a program. They are always preceded by a semicolon “ , e.g.:
;”
...
PTP P1
;Move to starting point
...
;--- Reset outputs --FOR I = 1 TO 16
$OUT[I] = FALSE
ENDFOR
...
Programmierung, Experte R2.2.8 08.98.00 en
18 of 164
11
Data lists
11.1
Local data lists
Data lists are used for preparing program-specific and higher-level declarations. These
include information about points, e.g. coordinates:
G
G
The data list is local even though it is a separate file in its own right.
G
A data list may only consist of declarations and initializations.
G
A single line can consist of declarations and initializations.
G
DEFDAT
One data list may be drawn up for each SRC file. This has the same name as the SRC
file and ends with the extension “
.DAT”
.
System variables are not accepted.
The declaration of data lists is analogous to that of SRC files: The declaration is introduced
using the keyword DEFDAT and the program name and concluded with the keyword
ENDDAT.
Variables are initialized by assigning a value directly to the variable concerned in the declaration line.
PROG_1.SRC
DEF PROG_1 ( )
¼
HALT
¼
OTTO = 25
¼
HALT
END
PROG_1.DAT
OTTO is initially “
0”
DEFDAT PROG_1
INT OTTO = 0
ENDDAT
After program execution
OTTO is = 25
DEFDAT PROG_1
INT OTTO = 25
ENDDAT
Fig. 55 Initialization and assignment of values to variables declared in data lists
Declaration and initialization in the data list eliminates the need for this in the main program.
If a new value is assigned to the variable OTTO in the main program, it is also entered into
the data list and permanently saved (see Fig. 55).
The “
new”value is thus used after the controller has been switched off and back on again.
This is essential for online correction and other program modifications.
If a main program always starts with the same value, the relevant variable in the main
program must be preset with the desired value.
The following declarations are allowed in data lists:
G
External declarations for subprograms and functions which are used in the SRC file.
G
Import declarations for imported variables.
G
Declarations and initializations of variables which are used in the SRC file.
G
Declarations of signal and channel names which are used in the SRC file.
G
Declarations of data and enumeration types which are used in the data list or in the SRC
file.
Programmierung, Experte R2.2.8 08.98.00 en
161 of 164
11.2
Global data lists
Variables defined in a data list can be made accessible to a “
foreign”main program.
PUBLIC
IMPORT
To do this, the data list must be defined as “
publicly accessible”with the keyword PUBLIC
in the header line. All variables to be used from a “
foreign”data list must be imported in the
main program by means of the IMPORT declaration.
An imported variable can be given a different name in the main program from the one it had
in the data list from which it was imported.
If you want to use the variable OTTO, taken from the above data list PROG_1, in program
PROG_2(), you thus program the following import declaration in PROG_2(), as well as the
keyword PUBLIC in the data list:
IMPORT INT OTTO_2 IS /R1/PROG_1 .. OTTO
The variable OTTO from the data list PROG_1.DAT in the directory /R1 is now also known
as OTTO_2 in the program PROG_2() (see Fig. 56).
PROG_1.SRC
DEF PROG_1 ( )
¼
HALT
¼
OTTO = 25
¼
END
PROG_1.DAT
DEFDAT PROG_1 PUBLIC
INT OTTO = 0
ENDDAT
PROG_2.SRC
DEF PROG_2 ( )
IMPORT INT OTTO_2 IS /R1/PROG_1 .. OTTO
¼
¼
END
Fig. 56 Importing variables from “
foreign”data lists
Variables, structures, channels and signals which are valid over a long time and are of general significance for a lot of programs can be defined in the predefined, global system data list
$CONFIG.DAT. Variables in $CONFIG.DAT do not need to be declared with IMPORT since
they are automatically known in all application programs.
System data lists
Programmierung, Experte R2.2.8 08.98.00 en
162 of 164
8
Subprograms and functions
In order to reduce the amount of typing and the program length when dealing with similar,
often repeated program sections, subprograms and functions have been introduced as
language constructs.
One effect of subprograms and functions that should not be underestimated with large
programs is the possibility of re-using, in other programs, algorithms that have already been
written, and in particular the use of subprograms for structuring the program. This structuring
process can bring about a hierarchical configuration so that individual subprograms, called
up by a higher-level program, can process tasks completely and pass on the results.
8.1
Declaration
A subprogram or function is a separate program section, with its own program descriptor,
declaration section and instruction section, which can be called from any position in the main
program. After execution of the subprogram or function, the program jumps back to the next
command after the subprogram call (see Fig. 42).
Further subprograms and/or functions can be called from within a subprogram or function.
The maximum permissible nesting depth is 19. If this is exceeded, the error message
“
PROGRAM STACK OVERFLOW” is generated. Recurrent calling of subprograms and
functions is not allowed. In other words, a subprogram or function cannot recall itself.
DEF
All subprograms are declared in exactly the same way as the main program, with the DEF
declaration plus name, and concluded with END, e.g.:
DEF SUBPROG()
...
END
PROG.SRC
DEF PROG()
¼
SUBRPR()
¼
SUBPPR()
¼
END
;Main program
;Subprogram call
;Subprogram call
;End main program
DEF SUBPR() ;Subprogram
¼
END
;End main program
Fig. 42 Subprogram call and return to main program
Programmierung, Experte R2.2.8 08.98.00 en
131 of 164
DEFFCT
A function is a type of subprogram; the program name is, at the same time, however, a
variable of a specific data type. The result of the function can thus be passed on by simply
assigning a value to a variable. For this reason, when declaring functions with the keyword
DEFFCT, the data type of the function must also be specified along with the name of the
function. A function is concluded with ENDFCT. Since a function is supposed to communicate
a value, this value must be specified using the RETURN statement before the ENDFCT
statement. Example:
DEFFCT INT FUNCTION()
...
RETURN(X)
ENDFCT
Local
A fundamental distinction is made between local and global subprograms or functions. In the
case of local subprograms or functions, the main program and the subprograms/functions
are found in the same SRC file. The file bears the name of the main program. The main
program is always situated at the head of the source text, and can be followed by any quantity
of subprograms and functions in any order.
Global
Local subprograms/functions can only be called from within the SRC file in which they were
programmed. If it is necessary to be able to call subprograms/functions from other programs
they must be global. Global subprograms or functions are saved in a separate SRC file. In
this way, every program becomes a subprogram if it is called by another program (main
program, subprogram or function).
G All variables declared in the main program are recognized in local subprograms
or functions, as long as they have not been declared again, under the same
name, in the subprogram or function.
Variables declared in the main program are not recognized in global subprograms or functions.
G
G
A main program cannot access the local subprograms or functions of another
main program.
G
EXT
EXTFCT
Variables declared in subprograms or functions are not recognized in the main
program.
The maximum length of local subprogram/function names is 12 characters. The
maximum length with global subprograms/functions is 8 characters (because of
the file extensions).
The names and paths of all external subprograms and functions to be called should be
identified to the compiler, along with the parameters used, by means of the EXT or EXTFCT
declaration. By specifying the parameter list (see 8.2), the necessary memory location is also
unambiguously defined. Examples:
EXT PROG_3()
EXTFCT FUNCTION(REAL:IN)
The difference between global and local subprograms/functions is illustrated in Fig. 43:
LOCAL is a local subprogram and LOCALFUN a local function of the program PROG; GLOBAL
and PROG_2 are global subprograms, and GLOBFUN is a global function.
Programmierung, Experte R2.2.8 08.98.00 en
132 of 164
PROG.SRC
DEF PROG()
EXT PROG_2()
EXT GLOBFUN()
¼
A=A*LOCALFUN()
LOCAL()
¼
PROG_2()
¼
END
DEF LOCAL()
¼
G=GLOBFUN()
H=5+LOCALFUN()
¼
END
DEFFCT LOCALFUN()
¼
ENDFCT
GLOBAL.SRC
DEF GLOBAL()
¼
END
GLOBFUN.SRC
DEFFCT GLOBFUN()
EXT GLOBAL()
¼
GLOBAL()
¼
ENDFCT
PROG_2.SRC
DEF PROG_2()
¼
END
Fig. 43 Difference between local and global subprograms
Programmierung, Experte R2.2.8 08.98.00 en
133 of 164
8.2
Subprogram and function call and parameter transfer
A subprogram is called by entering the subprogram name plus round brackets. In this way
it looks like an instruction (see Section 2.1), e.g.:
SUBPROG1()
A function call is a special kind of value assignment. A function can thus never stand alone;
instead, the function value must constantly be assigned within the framework of a variable
expression of the same data type, e.g.:
INTVAR = 5 * INTFUNCTION() + 1
REALVAR = REALFUNCTION()
Parameter list
Variables declared in the main program are recognized in local subprograms and functions,
but not in global ones. Values can also be transferred to global subprograms and functions,
however, using a parameter list.
Transfer using parameter lists is also often useful in local subprograms and functions, as a
clear distinction can be made in this way between the main program and the subprogram/
function. All variables declared in the main program are only used there; all transfers to subprograms and functions are carried out using parameter lists. Programming in this structured
way significantly reduces programming errors.
There are two different mechanisms for transferring parameters:
G
Call by value (IN)
With this kind of transfer, a value from the main program is transferred to a variable in
the subprogram or function. The transferred value can be a constant, a variable, a
function call or an expression. Where different data types are involved, type matching
is carried out where possible.
G
Call by reference (OUT)
With “
Call by reference” only the address of a variable from the main program is trans,
ferred to the subprogram or function. The subprogram or function called can now overwrite the memory area using a variable name of its own and in this way also alter the
value of the variable in the main program. The data types must therefore be identical;
type matching is not possible in this case.
The difference between these two methods is shown in Fig. 44. Whereas, with “
Call by
value” variable X remains unchanged in the main program because of the separate memory
,
areas, in “
Call by reference”it is overwritten with the variable NUMBER in the function.
Programmierung, Experte R2.2.8 08.98.00 en
134 of 164
Call by value
X
15
NUMBER
15
225
DEF PROG()
INT X,Y,E
¼
X=5*3
Y=SQUARE(X) ;Y=225
E=Y/X
¼
END
DEFFCT SQUARE
(NUMBER:IN)
15
INT NUMBER
225 NUMBER=NUMBER*NUMBER
RETURN(NUMBER)
ENDFCT
Þ
X=15
Y= 225
E=15
15
225
X,NUMBER
15
225
Call by reference
DEFFCT SQUARE
(NUMBER:OUT)
INT NUMBER
NUMBER=NUMBER*NUMBER
RETURN(NUMBER)
ENDFCT
Þ
X=225
Y= 225
E=1
Fig. 44 Difference between “
Call by value”and “
Call by reference”
“
Call by value”is entered in the subprogram or function by the keyword IN
after every variable in the parameter list. “
Call by reference”is obtained by entering the word
OUT. OUT is also the default setting. Example:
DEF CALCULATE(X:OUT,Y:IN,Z:IN,B)
If the subprogram or function to be called is global, the external declaration in the main
program must specify what data type the respective variables are and which transfer mechanism is to be used. The default setting is again OUT. Example:
EXTFCT REAL FUNCT1(REAL:IN,BOOL:OUT,REAL,CHAR:IN)
The use of IN and OUT is illustrated in the following example. The subprogram and the
function are global.
Programmierung, Experte R2.2.8 08.98.00 en
135 of 164
DEF PROG()
EXT CALCULATE (INT:OUT,INT:IN,INT:IN)
EXTFCT REAL FUNCT1(REAL:IN,REAL:OUT,REAL:OUT,REAL:IN,REAL:OUT)
INT A,B,C
REAL D,E,F,G,H,X
A
B
C
D
E
F
G
H
=
=
=
=
=
=
=
=
1
2
3
1
2
3
4
5
CALCULATE (A,B,C)
;A is now 11
;B is now 2
;C is now 3
X = FUNCT1(H,D,E,F,G)
;D is now 3
;E is now 8
;F is now 3
;G is now 24
;H is now 5
;X is now 15
END
DEF CALCULATE(X1:OUT,X2:IN,X3:IN)
;global subprog
NT X1,X2,X3
1=X1+10
X2=X2+10
X3=X3+10
END
DEFFCT REAL FUNCT1(X1:IN,X2:OUT,X3:OUT,X4:IN,X5:OUT);global fct.
REAL X1,X2,X3,X4,X5
X1 = X1*2
X2 = X2*3
X3 = X3*4
X4 = X4*5
X5 = X5*6
RETURN(X4)
ENDFCT
When transferring an array, the array in the subprogram or function must also be declared
again, but without an index. For this, please refer to the following example in which the values
of an array X[]are doubled (the function is global):
Programmierung, Experte R2.2.8 08.98.00 en
136 of 164
DEF ARRAY ( )
EXT BAS (BAS_COMMAND:IN,REAL:IN)
INT X[5]
;Array declaration
INT I
EXT DOUBLE (INT[]:OUT)
BAS (#INITMOV,0)
FOR I=1 TO
X[I]=I
ENDFOR
5
;Initialize array X[]
;X[1]=1,X[2]=2,X[3]=3,X[4]=4,x[5]=5
DOUBLE (X[]) ;Call subprogramm with array parameter
;X[1]=2,X[2]=4,X[3]=6,X[4]=8,X[5]=10
END
DEF DOUBLE(A[]:OUT)
INT A[]
;Renewed declaration of the array
INT I
FOR I=1 TO 5
A[I]=2*A[I] ;Doubling of the values in the array
ENDFOR
END
Similarly, no indices are specified when transferring multi-dimensional arrays; however, the
dimensions of the array must be specified by entering commas. Examples:
A[,]
for two--dimensional arrays
A[,,]
for three--dimensional arrays
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
137 of 164
Programmierung, Experte R2.2.8 08.98.00 en
138 of 164
3
Oscilloscope
The submenu “
Oscilloscope” contains the two additional menu items “
Show” and “
Configure”
.
Using the menu key “
Monitor” open first the submenu “
,
Diagnosis”and then the menu “
Oscilloscope” The following submenu is displayed:
.
3.1
“Show” function
Saved traces can be viewed and analyzed with this function.
A window is opened on the display. All of the files which are saved in the directory C:\PROGRAMME\KRC\TRACE and which have the extension TRC are displayed here.
3.1.1
File selection
The desired file can be selected using the arrow keys. The name of the selected file will be
indicated by a color background. Move the cursor to a file having the end digit 1. It contains
data from the digital servoelectronics DSE.
After selecting this file, please press the softkey “ .
Ok”
A new window is opened.
3.1.2
The oscilloscope display
The contents of your screen should now look similar to those below. However, you have probably recorded other data with a different configuration. For this reason, the individual curves
also have different forms and different colors on your screen.
Diagnose R2.2.8 09.98.00 en
13 of 35
Blue
White
Magenta
Yellow
Green
Red
Brown
Cyan
Active color: Blue
More detailed information about the curves can be found in the upper part of the display. The
color, the assigned variable, the unit of measurement and the scale of the display are listed
in sequence for each curve.
The left bar (vertical) shows values which, when multiplied by the scale of the display, represent the value of a curve at a point in time that is shown below on the time axis (horizontal).
If signals from the controller’ inputs and outputs are displayed, the left bar (vertical) also
s
contains numbers as placeholders for the number of the selected inputs or outputs.
Inputs or outputs are only displayed while they have the value “
TRUE”(as long as an
input or output has the value “
FALSE” you will only see a broken gray line).
,
White
Red
Active color: White
The “
active”color is permanently displayed at the bottom left of the screen.
You can “
move”through the entire trace by using the arrrow keys.
You can exit the display function again at any time by pressing the softkey “
Close”
.
Diagnose R2.2.8 09.98.00 en
14 of 35
3.1.3
The information window
Now first press the softkey “
Info” A window is opened displaying further information about
.
the individual curves. The information window appears as follows for the example given
above:
The color and the number of each curve are displayed in the first column.
The second column specifies the file from which the data for the curve have been read.
You can see the channel to which the curve has been assigned and the variable that it represents in the columns “
Channel”and “
Name”
.
The name of the color of the curve is displayed in the column “
Color”
.
The last column indicates whether the curve is displayed or not.
Now press the softkey “
Info”again. The window is closed. You can switch between the two
functions by using this softkey.
3.1.4
The softkey bar
Let us now turn to the softkey bar. It has four levels in the function “
Show”
.
You can switch between these four levels by using the softkey “
=== & gt; ”
.
3.1.5
The color softkeys
To make it as easy as possible to read the display, a maximum of eight different colors (blue,
green, white, red, magenta, brown, yellow and cyan) are shown.
Curves can be displayed or removed on the basis of their colors with the aid of the color softkeys. This is done quite simply by pressing the appropriate color softkey.
Please remove the blue curve by pressing the softkey “
Blue”once. Then open the information window. Reminder: To do so, press the softkey “
Info”
.
Diagnose R2.2.8 09.98.00 en
15 of 35
Your action has been registered in the last column (far right). “
Visible”now has the value “
No”
for the blue curve.
Now close the information window again and then make the blue curve visible once more.
To do so, press the color softkey “
Blue”again.
If you press color softkeys while the information window is open, color assignments will be
cancelled. The procedure for recovering cancelled color assignments is described in Section 3.6.
Certain graphs can also be removed by selecting the desired graph in the information window and pressing the ”
Enter”key. More detailed information on this can be found in Section
3.7.
3.1.6
The zoom function
Press the softkey “
=== & gt; ”repeatedly until the zoom functions appear in the softkey bar.
When the softkey “
Zoom”is pressed, a white cross about five millimeters high appears in the
middle of the window. This can be moved about the entire window using the arrow keys. Move
it to the position of your choice and then press the Enter key. The point that is currently selected represents a corner point of the zoom window, which must now be expanded using the
arrow keys. Include everything that you want enlarged in this zoom window and then press
the Enter key again. The contents of the zoom window will then be enlarged on the display.
To undo zooming, please press the softkey “
Unzoom”
.
3.1.7
The scaling function
In the display, you are able to increase or reduce the amplitude of individual curves.
To do so, press the softkey “
Channel”until the color of the desired curve is active. The active
color is permanently displayed at the bottom left of the window.
Now observe what changes occur when you press the keys “
M”or “
N”in the ASCII alphabetic
keypad.
N Pressing the key “N”in the ASCII alphabetic keypad gradually increases the amplitude.
M”in the ASCII alphabetic keypad gradually decreases the amplitude.
M Pressing the key “
By using this function, it is also possible to clearly display curves which only have a small
deflection or which are hidden by other curves.
The current scale is given in the top area of the display.
Diagnose R2.2.8 09.98.00 en
16 of 35
Blue
White
Magenta
Yellow
3.1.8
Green
Red
Brown
Cyan
The r.m.s. value function
In order to determine the value that a curve represents during a certain period of time as easily as possible, the r.m.s. value function has been integrated.
To determine the r.m.s. value, you must press the softkey “
Channel”to select the color used
by the curve that is to be evaluated. The active color is permanently displayed at the bottom
left of the window.
Active color: Blue
Then press the softkey “
RMS” A vertical white line with the label “
.
Evaluation of RMS”is displayed in the window.
Green
Red
Brown
Cyan
Blue
White
Magenta
Yellow
Evaluation of RMS
Active color: Magenta
Now move this line to the start point of your r.m.s. value evaluation using the “ ”and “ ”
¬
®
arrow keys and then press the Enter key.
You can now use the “ ”and “ ”arrow keys to define a sort of “
¬
®
measuring range” which
,
is displayed as a white box.
Diagnose R2.2.8 09.98.00 en
17 of 35
Blue
White
Magenta
Yellow
Green
Red
Brown
Cyan
Evaluation of RMS
Active color: Magenta
After pressing the Enter key, the result of the evaluation is displayed in the window.
Should the text that is displayed be hidden by other curves and thus cannot be read,
simply remove the other curves for the time being. Reminder: To do so, use the color
softkeys.
To end the function “
RMS” please press the softkey “
,
RMS”again.
If you press the softkey “
Close”instead, the entire display function will be ended.
3.2
Printing
If you would like to print out the contents of the screen, please press the softkey “
Print”
.
The screen is printed on the current default printer of the operating system. The printer
should be set to “
Landscape”
.
Diagnose R2.2.8 09.98.00 en
18 of 35
3.3
The cursor functions
Press the softkey “
=== & gt; ”repeatedly until the cursor functions appear in the softkey bar.
You are able to place two vertical and two horizontal lines (cursors) inside the window with
these functions. This enables you to determine the value that a curve represented at a certain
time quite easily.
Press the softkey “
Channel”until the color of the desired curve is active. The active color is
permanently displayed at the bottom left of the window.
Active color: Blue
If you then press the softkey “
VCursor1” a vertical white line (cursor) is displayed in the
,
window.
Active color: Magenta
The value that the selected curve had at the time where the cursor is currently positioned
is displayed at the top left of the window. When inputs or outputs are displayed, the bit pattern
of the selected input or output group is shown here.
Diagnose R2.2.8 09.98.00 en
19 of 35
Active color: Blue
Now move the cursor using the arrow keys and observe how the top left of the display
changes.
Press the softkey “
VCursor2” A second vertical white line (cursor) is displayed in the window.
.
Active color: Magenta
The values for the second cursor now appear to the right of the display for the first cursor.
When inputs or outputs are displayed, the bit pattern of the selected input or output group
is also shown here. The time difference between these two cursors is displayed on the lefthand side.
Diagnose R2.2.8 09.98.00 en
20 of 35
These cursors can be removed again by pressing the softkey “
VCursor1”or “
VCursor2”once
more.
If the softkey “
HCursor1”is pressed, a horizontal white line with the label “
Function value cursor”will be displayed in the window.
When inputs and outputs are displayed, the function “
HCursor”is not suitable for showing the numbers.
Blue
White
Magenta
Green
Red
Brown
Active color: Magenta
The value where the cursor is currently positioned is displayed at the top left of the window.
Now move the cursor using the arrow keys and observe how the top left of the display
changes.
Press the softkey “
HCursor2” A second horizontal white line is displayed in the window.
.
When inputs and outputs are displayed, the function “
HCursor”is not suitable for showing the numbers.
Diagnose R2.2.8 09.98.00 en
21 of 35
Green
Red
Brown
Blue
White
Magenta
Active color: Magenta
The values for the second cursor now appear to the right of the display for the first cursor.
The time difference between these two cursors is displayed on the lefthand side.
These lines can be removed again by pressing the softkeys “
HCursor1”or “
HCursor2”once
more.
3.4
The filter function
By pressing this softkey, you can switch on a software filter which “
smooths”the displayed
curves. This filter is switched off again by pressing this softkey once more.
unfiltered
filtered
Diagnose R2.2.8 09.98.00 en
22 of 35
3.5
Superposing traces
To allow you to compare data from different traces with each other, the function “
TraceFile2”
has been integrated.
To use this function, please open the menu by means of the menu key “
Monitor” Then select
.
“
Diagnosis” The following display appears:
.
Tool definition
As you want to use the oscilloscope function “
Show”to view traces that have already been
saved, please confirm the offered selection “
Oscilloscope” A further menu is opened, in
.
which you also confirm the offered selection “
Show”again.
A window is opened on the display. All of the files which are saved in the directory
C:\PROGRAMME\KRC\TRACE and which have the extension TRC are displayed here.
The desired file can be selected using the arrow keys. The name of the selected file will be
indicated by a color background. Move the cursor to a file with, for example, the end digit 3.
Data from the controller’ inputs and outputs are recorded in this file.
s
After selecting this file, please press the softkey “
TraceFile2”
.
Now use the arrow keys to move the cursor to a file with the end digit 1, for example. DSE
data are recorded in this file.
After selecting this file, please now press the softkey “ .
Ok”
In the window, you can now see that the contents of these two traces are superposed on each
other.
Diagnose R2.2.8 09.98.00 en
23 of 35
White
Magenta
Red
Green
Active color: Magenta
3.6
Changing color assignments
The color assignments of the individual curves can be changed at any time. To do so, open
the information window by pressing the softkey “
Info”
.
As an example, we now want to interchange the color assignments of curves 1 (currently still
blue) and 3 (currently still red).
Press the color softkey “
Blue”to deactivate the assignment that is valid for the curve.
Move the highlight to the curve with the number 3.
Press the color softkey “
Blue”again to assign the color blue (which has just become available) to curve 3.
Move the highlight to curve 1, which is currently not assigned a color.
Press the color softkey “
Red”here to assign the color red to this curve.
Now close the information window again.
Diagnose R2.2.8 09.98.00 en
24 of 35
3.7
Switching curves on and off
It can sometimes be necessary to completely remove individual curves from the display. To
do so, open the information window by pressing the softkey “
Info”
.
Select the curve that you would like to remove from the display. The curve that is currently
selected is highlighted by a color background. Now press the Enter key.
Now close the information window again.
As you can see, your action has been registered. The deactivated curve is now no longer
displayed.
3.8
Configuration
Before you can record something with the oscilloscope, you must first tell it WHAT and HOW
it is to record. For this purpose, the oscilloscope function offers a range of configuration options.
A window is opened on the display. Data which characterize the trace in greater detail must
be entered here.
The various input boxes can be selected using the “
¯”and “
-”arrow keys. Then enter the
desired values by means of the keyboard or numeric keypad.
Diagnose R2.2.8 09.98.00 en
25 of 35
Use the “ ”and “ ”arrow keys in selection boxes, which can be identified by the arrow
¬
®
symbol on the right, to select from the options offered.
Actual_Velocity
3.8.1
If the “
Values to record” box is activated (dark blue highlight), you can also change the
channel name by pressing the “ ” and “ ” arrow keys. A channel name is activated or
¬
®
deactivated by repeatedly pressing the ”
Enter”key.
Name of recording
A file name under which the trace will be saved later can be defined here. Do not use more
than seven characters because a further digit is added to the file name by the system in order
to distinguish different types of trace.
These trace files can be found with the extension TRC in the directory
C:\PROGRAMME\KRC\TRACE.
3.8.2
Length of recording
Please enter an integer value here specifying the length of the trace in seconds.
The cycle rate for recording DSE data is 2 ms. 500 data sets are therefore generated in
one second. Please take this volume of data into account when programming the length
of the trace.
3.8.3
Trigger moment
Trigger
Specify the position in time of the trace in relation to the trigger time in this field. The value
between 0% and 100% that is entered refers to the programmed trace length.
Time
Recording of data from the
trigger time
Recording of data is already started
before the trace is triggered (from 50%
of the programmed trace time)
Recording of data up to the
trigger time
0%
50%
100%
Diagnose R2.2.8 09.98.00 en
26 of 35
3.8.4
Trigger value1/Trigger value2
In the field “
Trigger value1” enter the value that triggers the trace when it is undershot. In
,
the field “
Trigger value2” enter the value that triggers the trace when it is exceeded. This
,
trigger value is of the data type DOUBLE.
Trigger value 2
Trigger
Trigger value 1
Trigger
Information about data types can be found in the [KRL Reference Guide].
3.8.5
Trace status
The current working status of the oscilloscope can be seen in this box.
Trace status
#T_WAIT
Trace is started and is waiting for the trigger condition. All of the data
before the trace is triggered are recorded.
#TRIGGERED
Trace is triggered and runs for as long as specified in the boxes
“
Length of recording (sec)”and “
Triggermoment”
.
#T_END
3.8.6
Meaning
Trace is finished, the data are saved on the hard disk.
DSE (Digital Servoelectronics)
You can select here whether you want to record data from the first DSE or from the second
DSE. If you do not want to record any DSE data and only want to monitor the inputs and outputs of the controller, please select here the option “ DSE data”
No
.
Files containing the traces of DSE data are identified by the end digit “ .
1”
The cycle rate for recording DSE data is 2 ms. 500 data sets are therefore generated
per second.
Diagnose R2.2.8 09.98.00 en
27 of 35
3.8.7
Trigger variable
If you only want to record DSE data, please select here the option “ I/O”
No
.
Otherwise, you can distinguish the previous selection made under “
Input / output area”more
clearly here. From the 32 inputs and outputs that you selected previously, you can now have
the first or the last 16 inputs or outputs monitored for the occurrence of the trigger condition.
Files containing data about the status of inputs and outputs are identified by the end
digit 3.
The cycle rate for recording the activities of inputs and outputs is 12 ms. About 85 data
sets are therefore generated per second.
3.8.8
Input / output area
If you only want to record DSE data, please select here the option “
inactive”
.
The inputs and outputs are each combined into 32-bit groups. You can select here, for
example, whether inputs and outputs 1 to 32 or inputs and outputs 33 to 64, etc., are to be
recorded.
3.8.9
Trigger conditions
In this field, select the condition which, when met, will trigger recording.
Start by user, recording until buffer is full
The recording must be intitiated manually with the softkey “
Start” It continues until
.
the set recording length has been reached.
Cyclic recording, until user stops
Recording is carried out for the time specified in “
Length of recording” before
termination with the softkey “
Stop”is recorded.
Trigger on appearance of error
Recording is carried out for the time specified in “
Length of recording”around the
appearance of an error that stops the robot system. The location of this period of
time depends on the value set as the trigger moment.
Trigger on start of movement
The recording starts whenever the beginning of a motion instruction is reached or
a motion instruction is being executed. It continues until the set recording length
has been reached. The location of this recording time depends on the value set as
the trigger moment.
Trigger on signal & lt; & gt; value 1
The recording starts as soon as the value of the selected trigger variable is not
equal to the value specified as trigger value 1. It continues until the set recording
length has been reached. The location of this recording time depends on the value
set as the trigger moment.
Trigger on trigger variable = trigger value 1
The recording starts as soon as the value of the selected trigger variable is equal
to the value specified as trigger value 1. It continues until the set recording length
has been reached. The location of this recording time depends on the value set as
the trigger moment.
Diagnose R2.2.8 09.98.00 en
28 of 35
Trigger on trigger variable & lt; trigger value 1
The recording starts as soon as the value of the selected trigger variable is less
than the value specified as trigger value 1. It continues until the set recording length
has been reached. The location of this recording time depends on the value set as
the trigger moment.
Trigger on trigger variable & gt; trigger value 1
The recording starts as soon as the value of the selected trigger variable is greater
than the value specified as trigger value 1. It continues until the set recording length
has been reached. The location of this recording time depends on the value set as
the trigger moment.
Trigger on trigger value 1 & lt; trigger variable & lt; trigger value 2
The recording starts as soon as the value of the selected trigger variable is greater
than the value specified as trigger value 1 and less than the value specified as trigger value 2. It continues until the set recording length has been reached. The location of this recording time depends on the value set as the trigger moment.
Trigger on clearing filter
This option is intended for our service personnel only.
Trigger variable AND trigger value 1 = trigger value 2
The recording starts as soon as the result of the logical ANDing of the two operands
trigger variable / trigger value 1 is equal to trigger value 2. It continues until the set
recording length has been reached. The location of this recording time depends on
the value set as the trigger moment.
Trigger on DSE error
In this instance, recording is carried out for the time specified in “
Length of recording”around the appearance of a hardware error that is signalled by the digital servoelectronics (e.g. “
Command value out of range” “
, Cabinet temperature too high”
).
The location of this period of time depends on the value set as the trigger moment.
3.9
Values to record
The data from the DSE that are to be recorded are defined in this selection box.
Values to record
Meaning
Command Value *1)
Command value from the interpolator per position control
cycle
Actual Value *1)
Actual value per position control cycle
Following Error *1)
Difference between command position and actual position
Command Velocity *1)
At the position controller output
Actual Velocity *1)
Motor speed
Current *1)
At the speed controller output
Motor temperature *1)
In increments
Resolver *1)
Encoder position
Test_IN_1
This option is intended for our service personnel only.
Test_IN_2
This option is intended for our service personnel only.
Bus_Voltage-PM 1
Power module 1
Bus_Voltage-PM2
Power module 2
*1) For each of the channels 1...8
Diagnose R2.2.8 09.98.00 en
29 of 35
After selecting the variable that is to be recorded, the trace can be selected or deselected
by repeatedly pressing the Enter key.
3.9.1
Softkeys
The current configuration is saved by pressing the softkey “
Save” It is then available for
.
every further recording process.
Recording is started by pressing the softkey “
Start” It begins as soon as the selected trigger
.
condition is met.
Recording is started manually irrespective of the selected trigger condition by pressing the
softkey “
Trigger”
.
Recording is stopped by pressing the softkey “
Stop” All of the data that have been recorded
.
thus far are saved.
The softkey “
Monitor” has the same function as the menu key “
Monitor” followed by the
submenu “
Diagnosis”and the option “
Monitor” Further information can be found in Section
.
3.1.
The window for configuring the oscilloscope is closed by pressing the softkey “
Close” The
.
entered values will not be saved.
3.9.2
Examples of traces
As the oscilloscope function with all the configuration and display options is somewhat
complex, we want to introduce you to the use of this tool with the aid of a small example.
Example 1
The:
the command speed of the drive of axis 1,
the actual speed of the drive of axis 1,
the torque of the drive of axis 1
the status of outputs 1 to 16
are to be monitored.
Create a motion program which, amongst other things, moves axis 1 and operates outputs
1 to 16.
Press the menu key “
Monitor” and select the option “
Diagnosis” In the submenu which
.
opens, please confirm the selection “
Oscilloscope” Now select ”
.
Configuration”
.
Please leave the default name “
TRACE”as it is.
Enter the value “
12”in the field “
Length of recording (sec)”
.
Enter the value “
0”in the field “
Trigger moment”
.
Also enter the value “
0”in the fields “
Trigger value1”and “
Trigger value2”
.
Select the first DSE.
Select “
$IN[1..32], $OUT[1..32]”in the field “
Input / output area”
.
Specify “
Trigger on start of movement”as the trigger condition.
Diagnose R2.2.8 09.98.00 en
30 of 35
Switch on the trace for “
Command velocity channel 1” “
, Actual velocity channel 1” and
“
Torque channel 1”in the field “
Values to record”
.
Press the softkey “
Save”
.
Now start the motion program and then press the softkey “
Start”
.
The command speed, the actual speed and the torque of the drive of axis 1 and the statuses
of inputs 1 to 32 will now be recorded and saved until the data buffer is full and the trace status
changes to #T-END. The files are called TRACE1.trc and TRACE3.trc.
Diagnose R2.2.8 09.98.00 en
31 of 35
Example 2
The signals of inputs and outputs 1 to 32 are to be recorded as soon as input 3 takes on
the state “
TRUE”
.
G
Enter a concise name of your choice under “
Name of recording” Make sure that the
.
length of this name does not exceed seven characters because a digit will later be
added by the system in order to distinguish different types of trace.
G
Enter the value 12 in the box “
Length of recording” The recording length will then be
.
12 seconds.
G
Enter the value 0 in the box “
Triggermoment” The data will then be recorded from the
.
moment input 3 takes on the state “
TRUE”
.
G
Enter the value 4 for input 3 in the boxes “
Triggervalue 1”and “
Triggervalue 2”
.
Why the value 4?
Input
Signal
Bit
Binary
5 4 3 2 1
X
4 3 2 1 0
0 0 1 0 0
The binary value 100 corresponds to the decimal value 4.
The decimal value corresponding to an output or input is determined by raising the bit number to the power of 2.
Select “
Trigger variable AND trigger value 1 = trigger value 2”as the trigger condition.
Why this trigger condition?
Input
Signal
Bit
Binary
5 4 3 2 1
X X X
4 3 2 1 0
1 0 1 1 0
Binary
1 0 1 1 0 Value of the trigger variable; inputs 2, 3 and 5
set
Logical ANDing with
Binary
0 0 1 0 0 Trigger value 1, decimal: 4
Result of logical operation:
Binary
0 0 1 0 0 Trigger value 2, decimal: 4
G
Select “ DSE data”in the DSE data box.
No
G
Select the first input group ($IN[x..x+15]) as the trigger variable.
G
Select the first 32- group ($IN[1..32], $OUT[1..32]) in the box “
-bit
Input / output area”
.
G
Now save the configuration by pressing the softkey “
Save” then activate the data re,
cording process by means of the softkey “
Start”
.
Diagnose R2.2.8 09.98.00 en
32 of 35
Input 3 will now be monitored for occurrence of the trigger condition. The message
“
#T_WAIT” is displayed in the box “
Trace-status” This message changes to “
.
#TRIGGERED”as soon as the trigger condition is fulfilled. The signals of inputs and outputs 1 to
32 will be recorded for 12 seconds from this moment onwards.
Example 3
A robot program branches to various subprograms depending on how the PLC sets specific
signals. In a certain, unknown situation, the program branches to the subprogram
“
SP55.SRC” which is not desired in this configuration, however.
,
For the purpose of checking the I/O communication of the robot program with the PLC in this
situation, an unassigned output (e.g. output 32) can be set in the subprogram SP55 and reset
again on quitting the subprogram.
A trace can now be triggered at this output and the recorded sequence of events saved.
G
Enter a concise name of your choice under “
Name of recording” Make sure that the
.
length of this name does not exceed seven characters because a digit will later be
added by the system in order to distinguish different types of trace.
G
Enter the value 10 in the box “
Length of recording” The recording length will then be
.
10 seconds.
G
Enter the value 90 in the box “
Triggermoment”as it is primarily the pre-event history
that is of interest here. Recording of the data will then already start 90% of the recording
length (9 seconds in this example) before the trigger moment. The recording will overlap
the trigger moment by 1 second in this instance.
G
Enter the value 32768 for input 32 in the boxes “
Triggervalue 1”and “
Triggervalue 2”
.
Why the value 32768?
Input
Signal
34 33 32 31 30 ... 19 18 17 16 15 14 ... 3
X
...
...
Data word
3
Bit
Binary
1
0
2
0
0
2
1
1
0
0
0
1
15 14 13 ... 2 1 0 15 14 13 ... 2
1 0 0 ... 0 0 0 0 0 0 ... 0
The binary value I000 0000 0000 0000 of data word 2 corresponds to the decimal value
32768.
The decimal value corresponding to an output or input is determined by raising the bit number to the power of 2.
Select “
Trigger variable AND trigger value 1 = trigger value 2”as the trigger condition.
Diagnose R2.2.8 09.98.00 en
33 of 35
Why this trigger condition?
Input
Signal
Bit
Binary
34 33 32 31 30 ... 19 18 17 16 15 14 ... 3 2 1
X
...
...
1 0 15 14 13 ... 2 1 0 15 14 13 ... 2 1 0
0 0 1 0 0 ... 0 0 0 0 0 0 ... 0 0 0
Binary
0
0
1
0
0 ...
Value of trigger variable; inputs 2, 3 and 32 set
0
1
0
0 ...
Trigger value 1, decimal: 32768
1
0
0 ...
Trigger value 2, decimal: 32768
Logical ANDing with
Binary
0
Result of logical operation:
Binary
0
0
G
Select “ DSE data”in the DSE data box.
No
G
Then select the last output group ($OUT[x+16..x+31]) as the trigger variable.
G
Select the first 32- group ($IN[1..32], $OUT[1..32]) in the box “
-bit
Input / output area”
.
G
Now save the configuration by pressing the softkey “
Save” then activate the data re,
cording process by means of the softkey “
Start”
.
Output “
17” will now be monitored with regard to this trigger condition. The message
“
#T_WAIT” is displayed in the box “
Trace-status” This message changes to “
.
#TRIGGERED”when the trigger condition is fulfilled. The signals of inputs and outputs 1 to 32 will
be recorded for 10 seconds from this moment onwards.
Diagnose R2.2.8 09.98.00 en
34 of 35
Example 4
You discover that a robot program always stops at night because an error occurs in the I/O
communication with the PLC. It cannot be determined whether this error is caused by the
PLC program or the robot program since nothing is known about the incorrect communication at this point.
It is possible for the oscilloscope function to be started in the KRL robot program before this
situation and to be ended after it. The data are overwritten every time the program is correctly
executed. If the motion program is interrupted by an error message, however, the last trace
is saved and the error can be analyzed with the aid of the recorded data.
G
Enter a concise name of your choice under “
Name of recording” Make sure that the
.
length of this name does not exceed seven characters.
G
Enter a value in the box “
Length of recording”taking into account the time for communication between the robot and the PLC.
G
Enter the value 0 in the boxes “
Triggermoment” “
, Triggervalue 1”and “
Triggervalue 2”
.
G
Select the option ”
Start by user, recording until buffer is full”as the trigger condition.
G
Select “ DSE data”in the DSE data box.
No
G
Then select “ E/A”as the trigger variable.
No
G
Select the first 32- group ($IN[1..32], $OUT[1..32]) in the box “
-bit
Input / output area”
.
G
Now save the configuration by means of the softkey “
Save” and quit the oscilloscope
,
function by pressing the softkey “
Close”
.
G
Insert the following lines into the KRL program before the selected program section in
order to start the trace:
$TRACE.MODE=#T_START
REPEAT
UNTIL $TRACE.STATE == #T_WAIT
Insert the following lines into the KRL program after the selected program section in order
to stop the trace:
$TRACE.MODE=#T_END
REPEAT
UNTIL $TRACE.STATE == #T_END
These changes can only be made at the expert level.
As soon as the error has been located, these instructions must be removed from the program again.
1
Diagnose R2.2.8 09.98.00 en
35 of 35
5
KRL Assistant
KUKA technology packages contain the most important functions for normal robot applications. The user can create special functions, which go beyond this scope, by programming
the robot system directly in “
KRL” “
, KUKA Robot Language”
.
The “
KRL Assistant” has been integrated, so that even users who do not often use this
programming language can program special functions effectively.
The “
KRL Assistant”offers the user syntax-supported programming. After the desired KRL
command has been selected, instructions relating to the command are offered in masks. The
contents of these masks can be either left as they are or changed. All contents can be
changed again later as required.
Operation
To program a motion command, you must select a program or load it in the editor. More
detailed information on creating and altering programs can be found in the chapter
[Program creation].
Pay attention to the position of the
edit cursor. The program line created
by you will be inserted as a new line
under the cursor.
Open the menu using the menu key “
Commands” Select “
.
KRL Assistant” The following
.
submenu is displayed:
You can now make your selection from the motion instructions offered.
Programmierung, Experte R2.2.8 08.98.00 en
95 of 164
5.1
Position specifications
The placeholder “!”
The “ sign is a placeholder. Using it, it is possible to create a motion program without
!”
knowing the exact position of the points which later determine the path of the robot.
When the program is run later, it will stop here and you can teach the point as decribed below:
If, during subsequent execution of the program, the message “
Instruction not allowed”
appears in the message window, delete it using the softkey “
Ack”
.
Instruction not allowed
Move the robot system to the desired position.
Then press the softkey “
Touch Up” Read the message displayed in the message
.
window.
Confirmation that the position has been saved is displayed in the message window.
15:44 0
TPEXPERT Actual position “
{POS: X 1620, Y 0, Z 1910, A 0, B 90, C 0, S 2, T 2}”was transferred
This message can then also be deleted by pressing the softkey “
Ack”
.
Position specification using variables
In place of the free variable parameter you can also enter a valid variable name. A list of keywords reserved for KRL, which you thus cannot use, can be found in [KRL Reference Guide].
You should move the robot system to the desired position before programming this
function.
Information on moving the robot manually can be found in the chapter
[Manual traversing of the robot].
If the name you have entered is not recognized by the system, the softkey “
VAR”appears
in the softkey bar. You are prompted to use this softkey to assign a data format to the name.
After it is pressed, the softkey bar changes:
Programmierung, Experte R2.2.8 08.98.00 en
96 of 164
After one of the softkeys “
E6POS” “
, POS” “
, FRAME” “
, E6AXIS”or “
AXIS”is pressed, the
current position of the robot system is saved under the selected data format. This is confirmed by a message in the message window.
Point KUKA 01 touched with current coordinates
This message can then be deleted by pressing the softkey “
Ack”
.
Saving the position with “Touch Up”
Before you can save positions in a program using “
Touch Up” data regarding the posi,
tion of the valid robot coordinate system, and also valid tool/workpiece data, must be
passed on to the controller.
For this purpose, the INI sequence at the start of the program must be run.
You should move the robot system to the desired position before programming this
function.
If you press the softkey “
Touch Up” the current position of the robot system is saved.
,
A message is displayed in the message window confirming that the position has been saved.
15:44 0
TPEXPERT Actual position “
{POS: X 1620, Y 0, Z 1910, A 0, B 90, C 0, S 2, T 2}”was transferred
This message can then be deleted by pressing the softkey “
Ack”
.
Manual position specification
As well as being able to save positions already reached by the robot, you can also manually
enter points in space.
To do so, press the softkey “ ? }”after the inline form has appeared. The assignment of the
{
softkey bar changes:
After a data format has been selected by pressing the corresponding softkey, the current
position is saved in the inline form.
Programmierung, Experte R2.2.8 08.98.00 en
97 of 164
Using the edit functions you can alter these position specifications to suit your requirements.
The geometric operator “:”
Position specifications of types POS and FRAME are combined using the geometric operator “ . This is always necessary if, for example, the origin of a coordinate system needs to
:”
be shifted using a correction value.
Programmierung, Experte R2.2.8 08.98.00 en
98 of 164
5.2
[PTP] positioning
Here, the robot system is positioned using the quickest route between two points in the work
envelope. Since the motion starts and ends in all of the axes at the same time, the axes must
be synchronized. The path taken by the robot cannot, therefore, be predicted exactly.
When this instruction is used, the path taken by the robot cannot be predicted
exactly. For this reason there is the risk of collision in the proximity of obstacles
within the work envelope. The motion characteristics of the robot near obstacles
must be tested at reduced velocity!
Placeholder for position
specification
Back
Geometric expressions for
position specification, cartesian
Geometric expressions for
position specification, axisrelated
Placeholder for position
specification
Switch between PTP, LIN and CIRC
Switch between
PTP and PTP REL
Back
Approximate positioning
between two PTP motions
Approximate positioning
between PTP and LIN or
CIRC commands. Criteria:
distance (DIS), velocity
(VEL) and tool/workpiece
orientation (ORI)
Save current position
Programmierung, Experte R2.2.8 08.98.00 en
99 of 164
Placeholder for position
specification
Back
Geometric expressions for
position specification, cartesian
Geometric expressions for
position specification, axisrelated
Placeholder for position
specification
Switch between
PTP REL and PTP
Back
Approximate positioning
between two PTP motions
Approximate positioning between PTP and LIN or CIRC
commands. Criteria:
distance (DIS), velocity
(VEL) and tool/workpiece
orientation (ORI)
Save current position
Programmierung, Experte R2.2.8 08.98.00 en
100 of 164
5.3
[LIN] linear motion
Here, the robot system is positioned using the shortest route between two points in the work
envelope - a straight line. The axes of the robot system are here synchronized in such a way
that the path velocity remains constant along the length of this straight line.
Placeholder for position
specification
Back
Geometric expressions for
position specification, cartesian
Placeholder for position
specification
Switch between LIN, CIRC and PTP
Switch between LIN and LIN REL
Back
Approximate positioning
between PTP and LIN or
CIRC commands. Criteria:
distance (DIS), velocity
(VEL) and tool/workpiece
orientation (ORI)
Save current position
Programmierung, Experte R2.2.8 08.98.00 en
101 of 164
Placeholder for position
specification
Back
Geometric expressions for
position specification, cartesian
Placeholder for position
specification
Switch between
LIN REL and LIN
Back
Approximate positioning
between PTP and LIN or
CIRC commands. Criteria:
distance (DIS), velocity
(VEL) and tool/workpiece
orientation (ORI)
Save current position
Programmierung, Experte R2.2.8 08.98.00 en
102 of 164
5.4
[CIRC] circular motion
The robot system is here positioned along a circular path in the work envelope defined by
start point, intermediate point and destination point. The axes of the robot system are here
synchronized in such a way that the path velocity remains constant along this circular path.
Placeholder for position
specification
Back
Geometric expressions for
position specification, cartesian
Placeholder for position
specification
Switch between CIRC, PTP and LIN
Switch between CIRC and CIRC REL
Specification of the angle that is to be executed;
priority higher than that of the destination point
Back
Approximate positioning
between PTP and LIN or
CIRC commands. Criteria:
distance (DIS), velocity
(VEL) and tool/workpiece
orientation (ORI)
Save current position
Programmierung, Experte R2.2.8 08.98.00 en
103 of 164
Placeholder for position
specification
Back
Geometric expressions for
position specification, cartesian
Placeholder for position
specification
Switch between
CIRC and CIRC REL
Specification of the angle that is to be executed;
priority higher than that of the destination point
Back
Approximate positioning
between PTP and LIN or
CIRC commands. Criteria:
distance (DIS), velocity
(VEL) and tool/workpiece
orientation (ORI)
Save current position
Programmierung, Experte R2.2.8 08.98.00 en
104 of 164
10
Trigger - Path- related switching actions
Unlike the interrupt functions, which are independent of robot motion, some applications also
require switching actions which are triggered depending on the motion path. Such applications include, e.g.:
G
Closing or opening the welding gun during spot welding
G
Switching the welding current on/off during arc welding
G
Starting or stopping the flow of adhesive in bonding or sealing applications.
In the KR C1, these path-related switching actions are possible using the TRIGGER statement. Parallel to the next robot motion, a subprogram can be executed in accordance with
a path criterion, or a value assigned to a variable or PULSE statement, by means of TRIGGER.
10.1
Switching action at the start or destination point of the path
TRIGGER
If a switching action relating to the start or destination point of a motion path is required,
program a TRIGGER statement before the relevant motion instruction (PTP, LIN or CIRC)
using the following syntax:
TRIGGER WHEN DISTANCE=switching point DELAY=time DO
instruction PRIO=priority
The arguments are described in greater detail in Tab. 28.
Argument
Switching
point
Time
Data
type
INT
Meaning
INT
Using the specification DELAY, it is possible to delay
or advance the switching point by a certain amount
of time. The switching point can, however, only be
delayed or advanced in so far as it still remains in the
block concerned.
The unit is milliseconds.
The instruction can be
S a subprogram call
S the assignment of a value to a variable
S or a PULSE statement.
INT
Every TRIGGER statement with a subprogram call
must be assigned a priority. Values from 1...39 and
81...128 are permissible. The priorities are thus the
same as those for interrupts (see Section 9).
The values 40...80 are reserved for automatic priority allocation by the robot system. For this, program
PRIO=--1.
Instruction
Priority
Priority
In the case of individual blocks, DISTANCE=0
designates the start point and DISTANCE=1 the
destination point of the following motion.
In approximation blocks, the specification
DISTANCE=1 signifies the middle of the subsequent
approximate positioning arc.
If the previous block is already an approximation
block, DISTANCE=0 signifies the destination point
of the preceding approximate positioning arc.
Tab. 29 Arguments in the TRIGGER statement
Programmierung, Experte R2.2.8 08.98.00 en
151 of 164
Using the instruction sequence
?
LIN POINT2
?
TRIGGER WHEN DISTANCE = 0 DELAY=20 DO $OUT[4]=TRUE
TRIGGER WHEN DISTANCE = 1 DELAY=-25 DO UP1() PRIO=-1
LIN POINT3
?
LIN POINT4
?
output 4 is set exactly 20 milliseconds after the start of the linear motion to POINT3, and the
subprogram UP1() is called 25 milliseconds before the destination point is reached. Priorities
are automatically allocated by the system.
For an explanation of the different effects of the specification DISTANCE on individual blocks
and approximate positioning blocks see Fig. 48 - Fig. 51.
-
DISTANCE
0
1
0
POINT2
Switching range DELAY
0 -- 1
1 -- 0
+
--
+
POINT3
1
Fig. 48 Switching ranges and possible delay values if start and destination points are
exact positioning points
Programmierung, Experte R2.2.8 08.98.00 en
152 of 164
0
POINT2
DISTANCE
0
1
+
Switching range DELAY
0 -- 1a
1a -- 1b
+
±
1a
1
-
1b
POINT3
POINT4
+
Fig. 49 Switching ranges and possible delay values if the start point is an exact positioning point and the destination point is an approximate positioning point
POINT2
DISTANCE Switching range DELAY
0
0 -- 1a
+
1
1a -- 1b
±
0
+
1a
POINT3
1
1b
+
POINT4
Fig. 50 Switching ranges and possible delay values if start and destination points are
approximate positioning points
Programmierung, Experte R2.2.8 08.98.00 en
153 of 164
DISTANCE
0
1
POINT2
Switching range DELAY
0 -- 1
1 -- 0
+
--
0
+
POINT3
1
Fig. 51 Switching ranges and possible delay values if the start point is an approximate
positioning point and the destination point is an exact positioning point
For switching actions relating to the start point of approximate positioning, a
correction value must be added to the DELAY value determined theoretically. The
correction value is half the value of the system variable $Filter.
In order to obtain the value of the system variable $Filter (dependent on the
robot model), run the INI fold in a selected motion program by pressing the Start
key. The form for modifying variables is reached by means of the menu key
“Monitor”/ menu item “Variable”/ menu item “Modify”. After you have selected
the box “Name”, enter the variable $Filter and press the Enter key. The value
in ms of the variable $Filter can now be read from the box “Actual Value”.
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
154 of 164
10.2
Switching action at any point on the path (Software R2.2 and later)
If you are using the path-related TRIGGER statement, you can trigger the switching action
at any position along the path by specifying a distance. As with switching actions at the start
or destination points, this again can additionally be delayed or brought forward.
The path-related switching action is only allowed with continuous-path motions (LIN or
CIRC). The TRIGGER statement refers here to the next programmed motion block and has
the following syntax:
TRIGGER WHEN PATH = distance DELAY = time DO instruction
á
PRIO=priorityñ
The arguments are described in greater detail in Tab. 30.
Argument
Meaning
Distance
Data
type
INT
Time
INT
Using the specification DELAY, it is possible to delay
(+) or advance (--) the switching point relative to the
PATH specification by a certain amount of time.
The switching point can only be delayed or
advanced, however, as far as the next exact positioning point. With approximate positioning motions, the
switching point can be advanced, at most, as far as
the start of approximate positioning of the start point.
The unit is milliseconds.
With distance you can specify the desired distance
from the destination point programmed after the
trigger.
If this destination point is an approximate positioning motion, distance specifies the desired
distance of the switching action from the position in
the approximate positioning range closest to the
destination point.
The switching point can be shifted back as far as the
start point by entering a negative distance. If the
start point is an approximate positioning point, the
switching point can be shifted as far as the start of the
approximate positioning range (see Fig. 52).
By entering a positive distance, a shift as far as the
next exact positioning point programmed after the
trigger is possible (see Fig. 53).
The unit is millimeters.
Programmierung, Experte R2.2.8 08.98.00 en
155 of 164
The instruction can be
S a subprogram call
S the assignment of a value to a variable
S or a PULSE statement.
Instruction
Priority
Priority
Every TRIGGER statement with a subprogram call
must be assigned a priority. Values from 1...39 and
81...128 are permissible. The priorities are thus the
same as those for interrupts (see Section 9).
The values 40...80 are reserved for automatic priority
allocation by the robot system. For this, program
PRIO=--1.
INT
Tab. 30 Arguments in the TRIGGER statement
Using the instruction sequence
?
PTP POINT2
TRIGGER WHEN PATH = 20 DELAY=-10 DO $OUT[2]=TRUE
LIN POINT3 C_DIS
LIN POINT4 C_DIS
LIN POINT5
?
output 2, for example, is set exactly 10 milliseconds before the tool center point has covered
a distance of 20 millimeters along its path from POINT3 to POINT5 via POINT4.
Since the switching point can be shifted from the motion point before which it was programmed, past all subsequent approximate positioning points, as far as the next exact positioning
point, a shift to POINT5 is possible.
0
POINT2
PATH Switching range DELAY
±X
±X
0 -- X
X -- 2
-+
POINT5
-
PATH=0
2
+
DELAY specification
POINT3
POINT4
+
Xmm
PATH specification
Fig. 52 Switching ranges if the start point is an exact positioning point
Programmierung, Experte R2.2.8 08.98.00 en
156 of 164
0a
-
+
0
PATH Switching range DELAY
POINT2
±X
±X
0a -- X
X -- 2
-+
-Xmm
-
-
+
POINT3
2
DELAY with pos. PATH
DELAY with neg. PATH
POINT4
+
PATH specification
+Xmm
Fig. 53 Switching ranges if the start point is an approximate positioning point
NOTES:
Programmierung, Experte R2.2.8 08.98.00 en
157 of 164
Special cases:
G
BCO run
If block selection is carried out to a continuous--path motion, this movement is
performed as a BCO run. Since the start point for this BCO run is entirely
arbitrary, it can be of no use as the start point for a distance specification.
Therefore, if TRIGGER commands with PATH specification are programmed
before such a motion, and if a block selection is made to these commands,
they will all be executed at the destination point.
G
Approximation not possible
If approximation is not possible; an exact positioning motion is carried out at
this position. In this context, however, it is treated in the same way as an
approximate positioning motion. Switching actions further along the path
remain saved and are triggered at the relevant position. Generally speaking,
however, they will no longer be exactly as programmed, since the path, and
thus the path length, are now different. Switching actions set in the first half of
the approximate positioning range by means of a negative PATH value cannot
now be triggered before the approximate positioning point:
?
LIN P1 C_DIS
TRIGGER WHEN PATH=-120 DELAY=0 DO UP1() PRIO=-1
TRIGGER WHEN PATH=-70 DELAY=0 DO $OUT[2]=TRUE
LIN P2 C_DIS
?
In the above example, the distance between the start and destination points
should be 100 mm. If approximation is possible for P1, the subprogram call
UP1() is executed 20 mm before the point on the path nearest to the approximate positioning point P1 is reached. Output 2 is set 30 mm after this point on
the path. If it was not possible to carry out approximation for P1, the path runs
through P1, where exact positioning takes place. The subprogram call UP1()
is now executed immediately after leaving P1 and output 2 is set at a distance
of 30 mm from P1.
G
Cancelling a motion
If a motion is cancelled, by block selection or reset, for example, and not
subsequently completed, switching actions that have not yet been executed
will be deleted, not executed, in the event of a DISTANCE specification.
G
Path-related TRIGGER statement for a PTP motion
If a TRIGGER statement with path specification is programmed for a PTP
motion, this will be refused by the interpreter when the motion is executed.
G
PTP-CP approximate positioning
If a TRIGGER statement is programmed for a motion whose start point is a
PTP--CP approximate positioning point, the switching action can take place, at
the earliest, at the end of this approximate positioning range, since the whole
approximate positioning range is now covered using a PTP motion.
In the event of a CP--PTP approximate positioning range, all TRIGGER statements which are still active, but have not yet been switched on, are triggered
at the start point of the approximate positioning range. This is because the
motion is continued as PTP from this point and path assignment is no longer
possible.
Programmierung, Experte R2.2.8 08.98.00 en
158 of 164
In the next example, switching actions with DISTANCE specifications and also with PATH
specifications are programmed. The individual switching points and the motion path are
illustrated in Fig. 54.
POS 1
POS 2
B
2’
$OUT[3]
30
2’
$OUT[6]
E
2’
$OUT[2]
180
8
$OUT[1]
$OUT[5]
B
3’
$OUT[8]
20
POS 0
3’
POS 3
$OUT[4]
$OUT[7]
E
3’
POS 4
Fig. 54 Switching points and motion path from example 9.1
Programmierung, Experte R2.2.8 08.98.00 en
159 of 164
DEF TRIG ( )
;------- Declaration section ------EXT BAS (BAS_COMMAND :IN,REAL :IN)
DECL AXIS HOME
INT I
SIGNAL GLUE $OUT[3]
;---------- Initialization --------INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 ) ;Initialization of velocities,
;accelerations, $BASE, $TOOL, etc.
$APO.CDIS=35
;Define approximation distance
HOME={AXIS: A1 0,A2 -90,A3 90,A4 0,A5 30,A6 0}
POS0={POS: X 1564,Y -114,Z 713,A 128,B 85,C 22,S 6,T 50}
POS1={X 1383,Y -14,Z 713,A 128,B 85,C 22}
POS2={X 1383,Y 200,Z 713,A 128,B 85,C 22}
POS3={X 1527,Y 200,Z 713,A 128,B 85,C 22}
POS4={X 1527,Y 352,Z 713,A 128,B 85,C 22}
FOR I=1 TO 16
$OUT[I]=FALSE
ENDFOR
;---------- Main section ---------PTP HOME ;BCO run
PTP POS0
TRIGGER WHEN DISTANCE=0 DELAY=40 DO $OUT[1]=TRUE
TRIGGER WHEN PATH=-30 DELAY=0 DO UP1(2) PRIO=-1
LIN POS1
TRIGGER WHEN DISTANCE=1 DELAY=-50 DO GLUE=TRUE
TRIGGER WHEN PATH=180 DELAY 55 DO PULSE($OUT[4],TRUE,0.9)
TRIGGER WHEN PATH=0 DELAY=40 DO $OUT[6]=TRUE
LIN POS2 C_DIS
TRIGGER WHEN DISTANCE=0 DELAY=40 DO PULSE ($OUT[5],TRUE,1.4 )
TRIGGER WHEN PATH=-20 DELAY=-15 DO $OUT[8]
LIN POS3 C_DIS
TRIGGER WHEN DISTANCE=1 DELAY=-15 DO UP1 (7 ) PRIO= -1
LIN POS4
PTP HOME
END
DEF UP1 (NO :IN )
INT NO
IF $IN[1]==TRUE THEN
$OUT[NO]=TRUE
ENDIF
END
Programmierung, Experte R2.2.8 08.98.00 en
160 of 164
3
Calibration - External kinematics
3.1
Fundamentals
3.1.1
General
If the robot is mathematically coupled to an external kinematic system, such as a turntable
or a two-axis positioner, the robot controller must know the exact position of this kinematic
system to ensure correct operation.
The fixed, invariable data of this kinematic system are entered in the machine data of the
robot system.
Data that depend on the installation and setup are individually determined by calibrating the
external kinematic system with the robot.
The data for up to 6 external kinematic systems can be stored. These data are called up in
the user program by means of their number.
For reasons of safety, the calibration programs can only be executed in the
“Manual” operating mode (Single Step (T1) or Single Step (T2)).
The meaning of the symbols, icons and particular font conventions is explained in the
chapter [About this documentation].
3.1.2
Preconditions
Using the calibration functions requires adequate knowledge of operating the robot system. Relevant information can be found in the documentation
·
[The KUKA Control Panel KCP],
·
[Manual traversing of the robot]
·
[Robot mastering/unmastering] and
·
[Calibration - Tools and workpieces].
The following preconditions must be met on the part of the robot:
G the data of the external kinematic system must be correctly entered in the machine data;
G all axes must be correctly mastered;
G no program may be selected;
G mode Single Step (T1) or Single Step (T2) is selected.
Konfiguration R2.2.8 09.98.00 en
61 of 80
3.2
External kinematic calibration
3.2.1
Overview
The submenu “
External kinematic”contains the following subprograms:
Program
Calibration by...
Root point
moving the distance between the robot and the external
kinematic system
Root point (numeric)
manual entry of the distance the robot and the external
kinematic system
Offset
moving the distance between the external kinematic system and the workpiece
Offset (numeric)
manual entry of the distance the external kinematic system
and the workpiece
Offset external kinematic
moving the robot to a fixed tool on an external kinematic
system
Each of these calibration programs is assigned forms that guide you interactively through the
program.
3.2.2
Root point
Z
II
I
I
I
X
The distance between coordinate
system I
Iand coordinate system I I
I
is entered in the machine data.
The distance between coordinate
system Iand coordinate system I
I
must be manually entered or calibrated.
I
Y
The menu item “
Root point”is opened via the menu key “
Setup” the menu “
,
Calibrate”and
the submenu “
External kinematic”
.
Konfiguration R2.2.8 09.98.00 en
62 of 80
The input window for selecting the kinematic system is opened:
Select the desired kinematic number (1...6) using the +/- status key at the bottom right of
the display.
Press the softkey “
ExtBase Ok”(at the bottom left of the display) in order to enter data for
this kinematic system.
The dialog window for entering the reference tool is then opened:
Konfiguration R2.2.8 09.98.00 en
63 of 80
A reference tool is a tool whose dimensions are known to the operator.
Use the +/- status key to select the tool number (1...16).
-
...
Press the softkey “
Tool Ok”in order to perform the calibration with this tool.
The next window is opened:
You are prompted to re-check the entry in the machine data for the distance between the
origin of the kinematic coordinate system I Iand the reference mark.
I
If this distance is not correctly entered, the machine data must be corrected. Cancel the calibration procedure, in this case, by pressing the “
ESC”key. (The entries made up to this point
will not be saved.)
If the distance is correctly entered, confirm it by pressing the softkey “
Point OK”
.
You will then be prompted to move the axes of the external kinematic system and to position
the TCP (tool center point) of the reference tool to the reference mark in a number of different
positions. The following steps are necessary for this:
Konfiguration R2.2.8 09.98.00 en
64 of 80
Step 1 - Move the TCP to the reference mark
This can be done using either the traversing keys or the Space Mouse.
Reduce the traversing velocity in the vicinity of the reference mark in order to avoid
a collision.
To do so, repeatedly press the status key “
HOV” which is depicted here, and can be found
,
on the right of the display.
Step 2 - Save the point
When the TCP is located exactly on the reference mark, save its position by pressing the
softkey “
Point Ok”
.
Step 3 - Move the axis/axes of the external kinematic system
After the point has been accepted by the controller, you are prompted to define the root point
of the kinematic system by carrying out further measurements.
The external kinematic system is moved for this purpose.
Repeat steps 1 to 3 until the reference mark has been addressed in a total of four different
positions of the external kinematic system.
Konfiguration R2.2.8 09.98.00 en
65 of 80
After all necessary measurements have been successfully completed, the dialog window for
saving the root data is opened:
At the end of the calibration procedure, you will be offered the softkey “
Save”(at the bottom
of the display). Save the data of the kinematic system by pressing this softkey. The function
is then terminated.
3.2.3
Root point (numeric)
Z
II
I
I
I
X
The distance between coordinate
system I
Iand coordinate system I I
I
is entered in the machine data.
The distance between coordinate
system Iand coordinate system I
I
must be manually entered or calibrated.
I
Y
Using the menu key “
Setup”(at the top of the display) open the menu “
Calibrate”and “
External kinematic”and there select the submenu “
Root point (numeric)”
.
Konfiguration R2.2.8 09.98.00 en
66 of 80
The input window for selecting the kinematic system is opened:
Select the desired kinematic number (1...6) using the +/- status key at the bottom right of
the display.
Press the softkey “
ExtBase OK”(at the bottom left of the display) in order to enter data for
this kinematic system. A window is opened for entering the root point data:
Now enter the values by means of the numeric keypad. You can move between the input
boxes using the “
¯”or “
-”arrow keys.
Konfiguration R2.2.8 09.98.00 en
67 of 80
The abbreviations in the dialog box have the following meaning:
X, Y, Z
Distance between the root point of the kinematic system and the world1)
coordinate system.
1) In
A, B, C
the basic setting, the world and robot coordinate systems coincide.
Rotational offset of the kinematic coordinate system from the world1)
coordinate system.
Z
X
+
+
-
Magnitude A
Z
X
X
Y
1.) Rotation about Z
1) In
Z
-
Y
2.) Rotation about Y
Magnitude B
Y
3.) Rotation about X
Magnitude C
the basic setting, the world and robot coordinate systems coincide.
When all entries have been made, confirm them by pressing the softkey “
Data Ok”
.
By pressing the softkey “
Offset”on the bottom lefthand side of the display , it is possible to
switch directly to the input form with the same name. Further information can be found in Sections 3.2.4 and 3.2.5.
Save the data of the kinematic system by pressing the softkey “
Save”(at the bottom right
of the display). The function is then terminated.
Konfiguration R2.2.8 09.98.00 en
68 of 80
3.2.4
Offset
IV
II
I
The distance between coordinate system III and coordinate system IV must be
manually entered or calibrated.
The menu item “
Offset”is opened via the menu key “
Setup” the menu “
,
Calibrate”and the
submenu “
External kinematic”
.
The input window for selecting the kinematic system is opened:
Select the desired kinematic number (1...6) using the +/- status key at the bottom right of
the display.
Konfiguration R2.2.8 09.98.00 en
69 of 80
Press the softkey “
ExtBase OK”(at the bottom left of the display) in order to enter data for
this kinematic system. A window is opened for entering the reference tool:
Use the +/- status key to select the tool number (1...16).
-
...
Press the softkey “
Tool OK”in order to perform the calibration with this tool.
The following window is then opened:
You are prompted to position the TCP (Tool Center Point) to the future origin of the base coordinate system (BASE). This can be done using either the traversing keys or the Space
Mouse.
Reduce the traversing velocity in the vicinity of the workpiece in order to avoid a
collision.
To do so, repeatedly press the +/- status key “
HOV”(on the right of the display).
When the TCP (tool center point) is located exactly at the desired origin of the base coordinate system (BASE), save this position by pressing the softkey “
Point Ok”
.
Konfiguration R2.2.8 09.98.00 en
70 of 80
The next dialog window is then opened:
You are prompted to show the controller the positive side of the X axis by positioning the TCP
to a specific point.
First move the tool away from the workpiece:
Reduce the traversing velocity in the vicinity of the workpiece in order to avoid a
collision.
To do so, repeatedly press the +/- status key “
HOV”again.
When the TCP (tool center point) is located exactly at the desired point, save this position
by pressing the softkey “
Point OK”
.
Konfiguration R2.2.8 09.98.00 en
71 of 80
The status window changes:
You are prompted to show the controller the orientation of the XY plane by moving the tool
to a point with a positive Y value.
Here also, move the tool away from the workpiece first.
Reduce the traversing velocity in the vicinity of the workpiece in order to avoid a
collision.
To do so, repeatedly press the status key “
HOV”
.
When the TCP (tool center point) is located exactly at the point with a positive Y value on
the XY plane, save this position by pressing the softkey “
Point OK”
.
Konfiguration R2.2.8 09.98.00 en
72 of 80
At the end of the calibration procedure, you will again be offered the softkey “
Save”situated
at the bottom of the display. Save the kinematic data by pressing this softkey. The function
is then terminated.
3.2.5
Offset (numeric)
IV
II
I
The distance between coordinate system III and coordinate system IV must be
manually entered or calibrated.
The menu item “
Offset (numeric)”is opened via the menu key “
Setup” the menu “
,
Calibrate”
and the submenu “
External kinematic”
.
Konfiguration R2.2.8 09.98.00 en
73 of 80
The input window for selecting the kinematic system is opened:
Select the kinematic number (1...6) using the +/- status key at the bottom right of the display.
-
Press the softkey “
ExtBase OK”in order to enter data for selected kinematic system.
The following dialog window for entering the offset data is then opened:
Enter the desired values by means of the numeric keypad.
Konfiguration R2.2.8 09.98.00 en
74 of 80
You can move between the input boxes using the “
¯”or “
-”arrow keys.
The abbreviations in the status window have the following meaning:
X, Y, Z
Distance between the workpiece reference point (BASE), IV in the illustration, and the kinematic coordinate system, III in the illustration.
A, B, C
Rotational offset of the base coordinate system from the
kinematic coordinate system.
Z
X
Z
+
+
-
X
X
Y
1.) Rotation about Z
Magnitude A
Z
-
Y
2.) Rotation about Y
Magnitude B
Y
3.) Rotation about X
Magnitude C
When all entries have been made, confirm them by pressing the softkey “
Data OK”situated
at the bottom of the display.
Save the offset data by pressing the softkey “
Save” You will find this softkey at the bottom
.
right of the display. The function is thus completed.
Konfiguration R2.2.8 09.98.00 en
75 of 80
3.2.6
Offset external kinematic
With this definition procedure, you can define a tool on an external kinematic system.
IV
II
I
Here a tool has been mounted on
the external kinematic system.
The distance between coordinate
system III and coordinate system
IV must be manually entered or
calibrated.
Press the menu key “
Setup” then select the menu “
,
Calibrate”and the submenu “
Fixed tool”
.
The following form is then opened:
Konfiguration R2.2.8 09.98.00 en
76 of 80
Use the +/- status key (at the bottom right of the display) to select the tool number (1...6)
of the tool to be calibrated on the external kinematic system.
Press the softkey “
ExtBase OK”(at the bottom of the display) in order to calibrate the external
tool.
The window for selecting the reference tool is opened:
Now select the number of the desired reference tool (1...16).
...
Press the softkey “
Tool OK”in order to specify the calibration method for this tool.
The following window is opened:
Here you can select the measurement method that is to be used. The selected method affects the orientation of the tool coordinate system.
The 5D method is used if only the working direction of the tool is required for its positioning
and manipulation (MIG/MAG welding, laser or waterjet cutting).
The 6D method is used if the orientation of all three tool axes is required for positioning and
manipulation (for welding guns, grippers, adhesive nozzles, etc.).
Konfiguration R2.2.8 09.98.00 en
77 of 80
5D method
In this method, the Z axis of the robot flange coordinate system tool must be oriented
parallel to the future working direction of the tool. The Y and Z axes are oriented by
the robot controller. The orientation of these axes is not readily foreseeable in this
instance, but it is exactly the same in each calibration procedure.
In the event of 5D calibration, the angle “
C”(corresponding to a rotation about the X-axis
of the tool direction) is set by default to “ .
0”
X
Condition:
Z parallel to X0
Y
Z
X0
Y0
Robot flange
coordinate system
Z0
Resulting tool coordinate system, orientation of Y and Z not
readily foreseeable.
6D method
In this method, the robot flange must be oriented in alignment with the tool. The axes
of the robot flange coordinate system must be parallel to the future axes of the tool
coordinate system.
X
Conditions:
X parallel to Z 0
Y parallel to Y0
Z parallel to X0
Y
Z
Robot flange
coordinate system
X0
Z0
Y0
Resulting tool
coordinate system
Konfiguration R2.2.8 09.98.00 en
78 of 80
Use the status key (at the bottom right of the display) to select the method meeting your requirements and confirm your choice by pressing the softkey “
Data OK”(at the bottom of the
display).
Use the softkey “
Data Ok”to confirm your selection and open the form for defining the TCP.
You are prompted to move the TCP (tool center point) of the selected reference tool to the
future TCP (tool center point) of the tool attached to the external kinematic system.
Reduce the traversing velocity in the vicinity of the tool in order to avoid a collision.
To do so, repeatedly press the +/- key of the status key “
HOV”(on the right of the display).
When the two TCPs (tool center points) coincide exactly, save this position by pressing the
softkey “
Point Ok”
.
TCP of the reference tool
TCP of the external tool
The next status window asks for a change in the orientation of the wrist flange:
Konfiguration R2.2.8 09.98.00 en
79 of 80
Now align the robot flange perpendicular to the future working direction of the tool attached
to the external kinematic system using the axis traversing keys or the Space Mouse.
Reduce the traversing velocity in the vicinity of the tool in order to avoid a collision.
To do so, repeatedly press the status key “
HOV”again.
When the robot flange is exactly perpendicular to the working direction of the tool, save this
position by pressing the softkey “
Point OK” The next dialog window shows the number and
.
the data of the calibrated tool:
The data are saved and the calibration program is ended by pressing the softkey “
Save”
.
1
Konfiguration R2.2.8 09.98.00 en
80 of 80
SOFTWARE
KR C1
Introduction, Safety
Release 2.2
Einleitung, Sicherheit R2.2.8 08.98.00 en
1 of 32
eCopyright
KUKA Roboter GmbH
This documentation or excerpts therefrom may not be reproduced or disclosed to third parties without the express permission of the publishers.
Other functions not described in this documentation may be operable in the controller. The user has no claim 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 software 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
regular basis, however, and necessary corrections will be incorporated in subsequent editions.
Subject to technical alterations without an effect on the function.
Length of documentation: 32 pages
PD Interleaf
Einleitung, Sicherheit R2.2.8 08.98.00 en
2 of 32
Contents
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
2
Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.1
Liability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.2
Safety symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.3
General safety regulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
2.4
Particular safety measures for users and operating personnel . . . . . . . . . . . . . . . . . . . . . . . .
10
2.5
2.5.1
2.5.2
2.5.3
2.5.4
2.5.5
2.5.6
2.5.7
2.5.8
2.5.9
Safety features on the robot system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Working space limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Load limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Counterbalancing system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Motor monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Voltage monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Temperature monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jog mode (deadman function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other safety facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Safety functions of the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
12
12
12
12
12
12
12
13
13
2.6
Release device for robot axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.7
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6
2.7.7
2.7.8
2.7.9
2.7.10
2.7.11
Planning and construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Foundations and substructures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Load ratings of the robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Safety (exclusion) zones and working zones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Collision protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tool change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Safety mats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interface characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EMERGENCY STOP circuit (EN 418) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Presetting of outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tooling and additional equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Safety regulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
14
14
14
16
16
16
16
16
16
17
17
2.8
2.8.1
2.8.2
2.8.3
2.8.4
2.8.5
2.8.6
2.8.7
2.8.8
2.8.9
Installation, operation and other work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mains connection conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Protection from dirt and UV radiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Start-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Shut-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Safety instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
18
18
18
18
19
19
19
19
20
2.9
2.9.1
2.9.2
2.9.3
Safety labelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Control cabinet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
21
21
21
2.10
ESD directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
Einleitung, Sicherheit R2.2.8 08.98.00 en
3 of 32
2.10.1
2.10.2
2.10.3
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Handling ESD modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Packaging suitable for ESDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
26
26
3
About this documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
3.1
General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
3.2
3.2.1
3.2.2
Meaning of symbols, words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Safety instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other information and symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
27
27
3.3
Meaning of the font styles used in this documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
3.4
Your opinion counts! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4
Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
4.1
Procedure for dealing with queries or problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
4.2
Worldwide service centers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
Einleitung, Sicherheit R2.2.8 08.98.00 en
4 of 32