1
04.00 Flexible NC Programming
1.6 Arithmetic o
erations/functions
1
840D
NCU 571
840D
NCU 572
NCU 573
FM-NC 810D 840Di
ï›™
Siemens AG 2000. All rights reserved
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA)
−
04.00 Edition
1-39
1.6 Arithmetic operations/functions
Arithmetic functions are used predominantly for R
parameters and variables (or constants and functions)
of the type REAL. The types INT and CHAR are also
permitted.
Standard mathematical notation is used in arithmetic
operations. Priorities for execution are indicated by
parentheses. Angles are specified for trigonometry
functions and their inverse functions (right angle = 90°).
Operators/arithmetic functions
+
Addition
-
Subtraction
*
Multiplication
/
Division
Caution
: (Type
INT
)/(Type
INT
)=(Type
REAL
); Example: 3/4 = 0.75
DIV
Division, for variable type INT and REAL
Caution
: (Type
INT
)
DIV
(Type
INT
)=(Type
INT
); Example: 3 DIV 4 = 0
MOD
Modulo division (
INT
or
REAL
) produces the remainder of an INT division,
e.g. 3 MOD 4=3
:
: Chain operator (for FRAME variables)
Sin()
Sine
COS()
Cosine
TAN()
Tangent
ASIN()
Arcsine
ACOS()
Arccosine
ATAN2(,)
Arctangent2
SQRT()
Square root
ABS()
Absolute number
POT()
Square of Z (square)
TRUNC()
Truncate to integer
ROUND()
Round to integer
LN()
Natural logarithm
EXP()
Exponential function
CTRANS()
Translation
CROT()
Rotation
CSCALE()
Scale change
CMIRROR()
Mirroring