Programming
10.9 Arithmetic parameters, LUD and PLC variables
Cylindrical grinding
Programming and Operating Manual, 07/2009, 6FC5398-4CP10-2BA0
305
Note
There can be several assignments in one block incl. assignments of arithmetic expressions.
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
;Assignment to X axis
Arithmetic operations/arithmetic functions
When operators/arithmetic functions are used, it is imperative to use conventional
mathematical notation. Machining priorities are set using round brackets. Otherwise,
multiplication and division take precedence over addition and subtraction.
Degrees are used for the trigonometrical functions.
Permitted arithmetic functions: see Section "List of instructions"
Programming example: Calculating with R parameters
N10 R1= R1+1
;The new R1 is calculated from the old R1
plus 1
N20 R1=R2+R3 R4=R5-R6 R7=R8*R9 R10=R11/R12
N30 R13=SIN(25.3)
;R13 equals sine of 25.3 degrees
N40 R14=R1*R2+R3
; Multiplication and division take precedence
over addition or subtraction R14=(R1*R2)+R3
N50 R14=R3+R2*R1
;Result, the same as block N40
N60 R15=SQRT(R1*R1+R2*R2)
;Meaning:
N70 R1= -R1
;The new R1 is the negative old R1
Содержание SINUMERIK 802D
Страница 6: ...Preface Cylindrical grinding 6 Programming and Operating Manual 07 2009 6FC5398 4CP10 2BA0 ...
Страница 12: ...Table of contents Cylindrical grinding 12 Programming and Operating Manual 07 2009 6FC5398 4CP10 2BA0 ...
Страница 64: ...Define 4 10 User data Cylindrical grinding 64 Programming and Operating Manual 07 2009 6FC5398 4CP10 2BA0 ...
Страница 152: ...System 8 7 Alarm display Cylindrical grinding 152 Programming and Operating Manual 07 2009 6FC5398 4CP10 2BA0 ...
Страница 334: ...Programming 10 15 Oscillation Cylindrical grinding 334 Programming and Operating Manual 07 2009 6FC5398 4CP10 2BA0 ...
Страница 394: ...Appendix A 5 Overview Cylindrical grinding 394 Programming and Operating Manual 07 2009 6FC5398 4CP10 2BA0 ...
Страница 399: ...Index Cylindrical grinding Programming and Operating Manual 07 2009 6FC5398 4CP10 2BA0 399 W Word structure 221 ...