Arithmetic Functions - Siemens Sinumerik 840D sl Programming Manual

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

Advertisement

Flexible NC programming

1.3 Arithmetic functions

1.3
Arithmetic functions
Function
The arithmetic functions are primarily for R parameters and variables (or constants and
functions) of type REAL. The types INT and CHAR are also permitted.
Operator / arithmetic function Meaning
+
-
*
/
DIV
MOD
:
Sin()
COS()
TAN()
ASIN()
ACOS()
ATAN2( ,
SQRT()
ABS()
POT()
TRUNC()
ROUND()
LN()
EXP()
MINVAL ()
MAXVAL ()
64
Addition
Subtraction
Multiplication
Division
Notice:
(type INT)/(type INT)=(type REAL); example: 3/4 = 0.75
Division, for variable type INT and REAL
Notice:
(type INT)DIV(type INT)=(type INT); example: 3 DIV 4 = 0
Modulo division (only for type INT) supplies remainder of an
INT division
Example: 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
The accuracy for comparison commands can be set using
TRUNC (see "Precision correction on comparison errors
(TRUNC) [Page 69]")
Round to integer
Natural logarithm
Exponential function
Lower value of two variables
(see "Variable minimum, maximum and range (MINVAL,
MAXVAL and BOUND) [Page 71]")
Larger value of two variables
(see "Variable minimum, maximum and range (MINVAL,
MAXVAL and BOUND) [Page 71]")
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Job planning

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents