Local User Data (Lud) - Siemens SINUMERIK 802D sl Programming And Operating Manual

Hide thumbs Also See for SINUMERIK 802D sl:
Table of Contents

Advertisement

3.9.2

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 initial
value is zero.
The programmer defines the name of a variable himself. The naming is subject to the follo-
wing rules:
● A maximum of 32 characters can be used.
● It is imperative to use letters for the first two characters; the remaining characters can be
● Do not use a name already used in the control system (NC addresses, keywords, names
Programming / data types
DEF BOOL varname1
DEF CHAR varname2
DEF INT varname3
DEF REAL varname4
DEF STRING[string length ] var-
name41
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"
Grinding
Programming and Operating manual, 06/2006, 6FC5398-4CP10-0BA0
either letters, underscore or digits.
of programs, subroutines, etc.).
3.9 Arithmetic parameters, LUD and PLC variables
; Boolean typ, 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 ... +2 147 483 648 (decimal)
; Real type, natural number (like arithmetic pa-
rameter R),
; value range: ±(0.000 0001 ... 9999 9999)
; (8 decimal places and sign and decimal point or
; exponential notatioin: ± ( 10
; STRING type, [string length]: Maximum number of
characters
; 4 type INT variables
; Define variable PVAR with a maximum of 12 charac-
ters and assign string Hello
Programming
-300
+300
... 10
)
3-75

Advertisement

Table of Contents
loading

Table of Contents