EasyManuals Logo

Siemens SINUMERIK 802D sl Operation And Programming Manual

Siemens SINUMERIK 802D sl
212 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #177 background imageLoading...
Page #177 background image
Programming
8.7 Arithmetic parameters R, LUD and PLC variables
8-177
SINUMERIK 802D sl Operation and Programming Nibbling (BP-N), 06/2006 Edition
6FC5 398-3CP10-0BA0
8.7.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 name of a variable can be defined by the programmer himself. The naming is subject to
the following rules:
S A maximum of 32 characters can be used.
S It is imperative to use letters for the first two characters; the remaining characters can be
either letters, underscore or digits.
S Do not use a name already used in the control system (NC addresses, keywords, names
of programs, subroutines, etc.).
Programming / data types
DEF BOOL varname1 ; “Bool” type, values: TRUE (=1), FALSE (=0)
DEF CHAR varname2 ; “Char” type, 1 character in the ASCII code: „a„, „b„, ...
; Numerical code value: 0 ... 255
DEF INT varname3 ; Integer type, integer values, 32-bit value range:
; –2 147 483 648 to +2 147 483 648 (decimal)
DEF REAL varname4 ; “Real” type, natural number (like arithmetic parameters R),
; Range of values: (0.000 0001 ... 9999 9999)
; (8 decimal places and leading sign and decimal point) or
; Exponential notation: ( 10
–300
... 10
+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 ; 4 variables of the INT type
Example for the STRING type with assignment:
DEF STRING[12] PVAR=“Hello” ; Define PVAR variable with maximum
character length 12 and assign string Hello
Fields
In addition to individual variables, it is also possible to define one- or two-dimensional vari-
able fields of these data types:
DEF INT PVAR5[n] ; One-dimensional field of the INT type, n: Integer
DEF INT PVAR6[n,m] ; Two-dimensional field of the INT type, n, m: Integer
Example:
DEF INT PVAR7[3] ; Field with 3 elements of the INT type

Table of Contents

Other manuals for Siemens SINUMERIK 802D sl

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK 802D sl and is the answer not in the manual?

Siemens SINUMERIK 802D sl Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK 802D sl
CategoryController
LanguageEnglish

Related product manuals