Local User Data (Lud) - Siemens sinumerik 808d Programming And Operating Manual

Hide thumbs Also See for sinumerik 808d:
Table of Contents

Advertisement

Programming example: Calculating with R parameters
N10 R1= R1+1
N20 R1=R2+R3 R4=R5-R6 R7=R8*R9 R10=R11/R12
N30 R13=SIN(25.3)
N40 R14=R1*R2+R3
N50 R14=R3+R2*R1
N60 R15=SQRT(R1*R1+R2*R2)
N70 R1= -R1
Programming example: Assign R parameters to the axes
N10 G1 G91 G94 X=R1 Z=R2 F300
N20 Z=R3
N30 X=-R4
N40 Z= SIN(25.3)-R5
M30
Programming example: Indirect programming
N10 R1=5
R2=6
R1=R2-1
N100 R[R1]=27.123
M30
1.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 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 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
Turning Part 2: Programming (Siemens instructions)
Programming and Operating Manual, 05/2012, 6FC5398-5DP10-0BA0
either letters, underscore or digits.
of programs, subroutines, etc.).
1.9 Arithmetic parameters, LUD and PLC variables
;The new R1 is calculated from the old R1
plus 1
;R13 equals sine of 25.3 degrees
;Multiplication and division take precedence
over addition or subtraction R14=(R1*R2)+R3
;Result, the same as block N40
;Meaning:
;The new R1 is the negative old R1
;Separate blocks (traversing blocks)
;With arithmetic operations
;Assigning R1 directly value 5 (integer)
;Indirectly assign R5 the value 27.123
Programming principles
87

Advertisement

Table of Contents
loading

Table of Contents