Programming and Operating Manual (Turning)
126 01/2017
;Indirectly assign R5 the value 27.123
Local User Data (LUD)
Functionality
The operator/programmer (user) can define his/her own variable in the program from various data types (LUD = Local User
Data). These variables are only available in the program in which they were defined. The definition takes place immediately
at the start of the program and can also be associated with a value assignment at the same time. Otherwise the starting
value is zero.
The name of a variable can be defined by the programmer. The naming is subject to the following rules:
● A maximum of 31 characters can be used.
● It is imperative to use letters for the first two characters; the remaining characters can be either letters, underscore or
digits.
● Do not use a name already used in the control system (NC addresses, keywords, names of programs, subroutines, etc.).
;Boolean type, values: TRUE (=1), FALSE (=0)
;Char type, 1 ASCII code character: "a", "b", ...
;Numerical code value: 0 ... 255
;Integer type, integer values, 32 bit value range:
;-2 147 483 648 through +2 147 483 647 (decimal)
;Real type, natural number (like arithmetic parameter R),
;Value range: ±(0.000 0001 ... 9999 9999)
;(8 decimal places, arithmetic sign and decimal point) or
;Exponential notation: ± (10 to power of -300 ... 10 to power of +300)
DEF STRING[string length] varname41
; STRING type, [string length]: Maximum number of characters
Each data type requires its own program line. However, several variables of the same type can be defined in one line.
Example:
DEF INT PVAR1, PVAR2, PVAR3=12, PVAR4
Example for STRING type with assignment:
DEF STRING[12] PVAR="Hello"
; Define variable PVAR with a maximum of 12 char-
acters and assign string "Hello"
In addition to the individual variables, one or two-dimensional fields of variables of these data types can also be defined:
;One-dimensional field, type INT, n: integer
;Two-dimensional field, type INT, n, m: integer
Example:
;Field with 3 elements of the type INT
Within the program, the individual field elements can be reached via the field index and can be treated like individual
variables. The field index runs from 0 to a small number of the elements.
Example:
;The third field element (with index 2) is assigned the value
24.
Value assignment for field with SET instruction:
;After the 3rd field element, different values are assigned.
Value assignment for field with REP instruction:
;After field element [4] - all are assigned the same value,
here 2.