·390·
Programming manual
CNC 8055
CNC 8055i
13.
HIGH-LEVEL LANGUAGE PROGRAMMING
·M· & ·EN· MODELS
SOFT: V02.2X
Operators
13.4 Operators
An operator is a symbol that indicates the mathematical or logic operations to carry out. The CNC
has arithmetic, relational, logic, binary, trigonometric operators and special operators.
Arithmetic operators.
Relational operators.
Logic and binary operators.
NOT, OR, AND, XOR: The act as logic operators between conditions and as binary operators
between variables and constants.
IF (FIRST AND GS1 EQ 1) GOTO N100
P5 = (P1 AND (NOT P2 OR P3))
Trigonometric functions.
There are two functions for calculating the arc tangent ATAN which returns the result between ±90°
and ARG given between 0 and 360°.
+ add. P1=3 + 4 P1=7
- subtraction, also a negative value. P2=5 - 2
P3= -(2 * 3)
P2=3
P3=-6
* multiplication. P4=2 * 3 P4=6
/ division. P5=9 / 2 P5=4.5
MOD Module or remainder of the division. P6=7 MOD 4 P6=3
EXP exponential. P7=2 EXP 3 P7=8
EQ equal.
NE different.
GT greater than.
GE greater than or equal to.
LT Less than.
LE Less than or equal to.
SIN sine. P1=SIN 30 P1=0.5
COS cosine. P2=COS 30 P2=0.8660
TAN tangent. P3=TAN 30 P3=0.5773
ASIN arc sine. P4=ASIN 1 P4=90
ACOS arc cosine. P5=ACOS 1 P5=0
ATAN arc tangent. P6=ATAN 1 P6=45
ARG ARG(x,y) arctangent y/x. P7=ARG(-1,-2) P7=243.4349