·600·
Installation manual
CNC 8055
CNC 8055i
15.
CUSTOMIZABLE SCREENS
SOFT: V02.2X
Arithmetic operations
15.4 Arithmetic operations
Math operations are only available in version 2 of the configuration language. With math operations
(arithmetic, trigonometric, logic, etc.) it is possible to assign to a "widget" element the result of several
operations taking CNC variables, PLC resources, constants, etc. as operands.
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))
GUP1005 = (GUP100 AND (NOT(GUP200 OR GUP299)))
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°.
A numeric value must be assigned through an internal CNC variable (GUP100 - GUP255, GUP1000 -
GUP1255, GUP2000 - GUP2255). A constant (a number) cannot be assigned directly to a widget.
+ add. GUP100=3 + 4 GUP100=7
- subtraction, also a negative value. GUP101=5 - 2
GUP100= -(2 * 3)
GUP101=3
GUP103=-6
* multiplication. GUP104=2 * 3 GUP104=6
/ division. GUP105=9 / 2 GUP105=4.5
MOD Module or remainder of the division. GUP106=7 MOD 4 GUP106=3
EXP exponential. GUP107=2 EXP 3 GUP107=8
EQ equal. (GUP100 EQ GUP200)
NE different. (GUP101 NE 2.5)
GT greater than. (GUP102 EQ 0)
GE greater than or equal to. (GUP103 GE 1)
LT Less than. (GUP104 LT GUP100)
LE Less than or equal to. (GUP105 LE 66)
SIN sine. GUP101=SIN(30) GUP101=0.5
COS cosine. GUP102=COS(30) GUP102=0.8660
TAN tangent. GUP103=TAN(30) GUP103=0.5773
ASIN arcsine (degrees). GUP104=ASIN(1) GUP104=90º
ACOS arccosine (degrees). GUP105=ACOS(1) GUP105=0º
ATAN arctangent (degrees). GUP106=ATAN(1) GUP106=45º
ARG ARG(x,y) arctangent y/x (degrees). GUP107=ARG(-1 ,-2) GUP107=243.4349º