Siemens SINUMERIK 802D sl Programming And Operating Manual page 104

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

Advertisement

Programming
3.9 Arithmetic parameters, LUD and PLC variables
Assignments to other addresses
The flexibility of an NC program lies in assigning these arithmetic parameters or expressions
with arithmetic parameters to other NC addresses. Values, arithmetic expressions and
arithmetic parameters can be assigned to all addresses; Exception: addresses N, G, and L.
When assigning, write the " = " sign after the address character. It is also possible to have an
assignment with a minus sign.
A separate block is required for assignments to axis addresses (traversing instructions).
Example:
N10 G0 X=R2
Arithmetic operations/arithmetic functions
When operators/arithmetic functions are used, it is imperative to use conventional mathe-
matical notation. Machining priorities are set using round brackets. Otherwise, multiplication
or division takes precedence over addition or subtraction.
For the trigonometric function, degrees are specified.
Permitted arithmetic functions: see Section "List of instructions"
Programming example: Calculating with R parameters
N10 R1= R1+1
N20 R1=R2+R3 R4=R5-R6 R7=R8
R10=R11/R12
N30 R13=SIN(25.3)
N40 R14=R1
N50 R14=R3+R2
N60 R15=SQRT(R1*R1+R2*R2)
N70 R1= -R1
Programming example: Assign R parameters to the axes
N10 G1 G91 X=R1 Z=R2 F300
N20 Z=R3
N30 X=-R4
N40 Z= SIN(25.3)-R5
...
Programming example: Indirect programming
N10 R1=5
...
N100 R[R1]=27.123
3-74
;Assignment to X axis
R9
*
R2+R3
*
R1
*
; The new R1 is calculated from the old R1 +1
;R13 equals sine of 25.3 degrees
; Multiplication or division takes precedence
over addition or subtraction R14=(R1
; 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 and Operating manual, 06/2006, 6FC5398-4CP10-0BA0
R2)+R3
*
Grinding

Advertisement

Table of Contents
loading

Table of Contents