Fundamental Principles of NC Programming
2.2 Language elements of the programming language
Fundamentals
Programming Manual, 11/2006, 6FC5398-1BP10-2BA0
59
Operators/mathematical functions
Operators and
mathematical
functions
Meaning
+ Addition
- Subtraction
* Multiplication
/ Division
Notice: (type INT)/(type INT)=(type REAL); example: 3/4 = 0.75
DIV Division, for variable types INT and REAL
Notice: (type INT)DIV(type INT)=(type INT); example: 3 DIV 4 = 0
MOD Modulo division (only for type INT) produces remainder of INT division;
Example 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() 2. 2nd power (square)
TRUNC() Truncate to integer
ROUND() Round to integer
LN() Natural logarithm
EXP() Exponential function
MINVAL Smaller value, two variables
MAXVAL Higher value, two variables
BOUND Variable value that lies in the defined value range