Programming instructions
10-6
Variable Assignments and Arithmetic Functions NC Programming 17VRS
DOK-MTC200-NC**PRO*V17-ANW1-EN-P
10.2 Angle Unit for Trigonometric Functions ‘RAD’, ‘DEG’
The arguments of the trigonometric functions "SIN," "COS," "TAN" and
the results of the inverse functions of the trigonometric functions "ASIN,"
"ACOS," "ATAN" can be stated or calculated in the unit "radians" as well
as a fraction or multiple of the size of the unit circle (radius = 1) and as
the unit "degrees."
RAD
DEG
•
The "RAD" unit is the power-on state and is modally active until it is
overwritten by the unit "DEG." "RAD" is set automatically at the end of
the program (RET) or by the "BST" command, depending on process
parameter Bxx.042.
10.3 Mathematical Expressions
The assignment of an expression is initiated by an equal sign and is
ended by a space or the end-of-line character.
•
Within an expression, a space is interpreted as the end of the expres-
sion, which therefore leads to a premature termination. The following
text characters then usually result in syntax errors.
Calculation of an expression halts NC block preparation, in other words,
look-ahead interpretation of the subsequent NC blocks is not resumed
until the expression is fully calculated. This means that traverse move
stop at the programmed end point and that steps to achieve smooth block
transitions (G06, G08) do not take effect.
Expressions are comprised of:
•
Operands
•
Operators
•
Parenthetical signs
•
Functions
Examples of expressions
@100=X+SQRT(2)*SQRT(X*X+Z*Z)
F=0.1*PI*800
@101=TAN©
@102=SQRT(@100)+F
@103=@105+@106/@107-50
Syntax