Programming manual.
CNC 8070
CREATING A PROGRAM.
1.
Arithmetic and logic operators and functions.
·51·
(REF: 1709)
Boolean constants.
Trigonometric functions.
In these type of functions the following must be borne in mind:
• In the "TAN" function, the argument cannot take the values ...-90º, 90º, 270º...
• In the "ASIN" and "ACOS" functions, the argument must always be within ±1.
• There are two functions to calculate the arctangent:
Mathematical functions.
In these type of functions the following must be borne in mind:
• In the "LN" and "LOG" functions, the argument must be grater than zero.
• In the "SQRT" function, the argument must be positive.
Other functions.
In the "EXIST" function, programming "$IF EXIST[P1] == TRUE" is the same as
programming "$IF EXIST[P1]".
TRUE True $IF V.S.VAR == TRUE
FALSE Not true $IF V.S.VAR == FALSE
SIN[...] Sine P1 = SIN[30] P1 = 0.5
COS[...] Cosine P2 = COS[30] P2 = 0.866
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[...] Arctangent y/x P7=ARG[-1,1] P7=315
"ATAN" It returns the result between ±90º.
"ARG" It returns the result between 0º and 360º.
ABS[...] Absolute value P1 = ABS[-10] P1 = 10
SQR[...] Square function P2 = SQR[4] P2 = 16
SQRT[...] Square root P3 = SQRT[16] P3 = 4
LOG[...] Decimal logarithm P4 = LOG[100] P4 = 2
LN[...] Neperian logarithm P5 = LN[100] P5 = 4.6051
EXP[...] "e" function P6 = EXP[1] P6 = 2.7182
DEXP[...] Decimal exponent P6 = DEXP[2] P7 = 100
INT[...] Returns the integer P1 = INT[4.92] P1 = 4
FRACT[...] Returns decimal portion P2 = FRACT[1.56] P2 = 0.56
ROUND[...] Rounds up or down to the nearest
integer
P3 = ROUND[3.12]
P4 = ROUND[4.89]
P3 = 3
P4 = 5
FUP[...] Returns the integer plus one. (If the
number is an integer, it returns it)
P5 = FUP[3.12]
P6 = FUP[9]
P5 = 4
P6 = 9
EXIST[...] It checks whether the selected
variable or parameter exists or not
$IF EXIST[P1]
$IF EXIST[P3] == FALSE