Siemens SINUMERIK 840D sl Programming Manual page 33

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Parameters
Operators/Mathematical functions
+
-
*
/
DIV
MOD
:
Sin()
COS()
TAN()
ASIN()
ACOS()
ATAN2 (,)
SQRT()
ABS()
POT()
TRUNC()
ROUND()
LN()
EXP()
CTRANS()
CROT ()
CSCALE()
CMIRROR()
Example: Initialization of complete variable arrays
R1=R1+1
R1=R2+R3 R4=R5-R6 R7=R8*R9
R10=R11/R12 R13=SIN(25.3)
R14=R1*R2+R3
R14=(R1+R2)*R3
R15=SQRT(POT(R1)+POT(R2))
RESFRAME= FRAME1:FRAME2
FRAME3=CTRANS(...):CROT(...)
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Addition
Subtraction
Multiplication
Division
Caution: (type INT)/(type INT)=(type REAL)
;example: 3/4 = 0.75
Division, for variable type INT and REAL
Caution: (type INT)DIV(type INT)=(type INT)
;example: 3 DIV 4 = 0
Modulo division (INT or REAL) produces remainder of INT
division,
e.g., 3 MOD 4=3
Chain operator (for FRAME variables)
Sine
Cosine
Tangent
Arcsine
Arccosine
Arctangent2
Square root
Absolute value
2. power (square)
Truncate to integer
Round to integer
Natural logarithm
Exponential function
Translation
Rotation
Change of scale
Mirroring
;New R1 = old R1 +1
;Multiplication or division takes precedence
over addition or subtraction
;Parentheses are calculated first
;Inner parentheses are resolved first
;R15 = square root of (R12+R22)
;The concatenation operator links frames
to form a resulting frame or assigns values
to frame components
Flexible NC programming
1.6 Arithmetic operations/functions
1-19

Advertisement

Table of Contents
loading

Table of Contents