Section:
Page
PROGRAMMING
36
Chapter: 6
PARAMETRIC
PROGRAMMING
F11 Comparison
It compares an arithmetic parameter with another one or with a numeric constant
indicating whether the first operand is equal, different, greater, or smaller than the
second operand.
This operation is greatly used when working with conditional jumps G26, G27,
G28 and G29, which are described later on.
N101 P10 F11 P12
Compares the values of P10 and P12
N102 P10 F11 K100
Checks whether the value of P10 is equal, different, greater
than or smaller than 100
F12 Integer
N101 P10 F12 P12
P10 takes the integer part of P12
N102 P10 F12 K12.34 P10 = 12, integer of 12.34
F13 Integer plus one
N101 P10 F13 P12
P10 takes the integer value of P12 plus one
N102 P10 F13 K12.34 P10 = 13, (integer of 12.34) + 1
F14 Integer minus one
N101 P10 F14 P12
P10 takes the integer value of P12 minus 1
N102 P10 F14 K12.34 P10 = 11, (integer of 12.34) - 1
F15 Absolute value
N101 P10 F15 P12
P10 takes the absolute (unsigned) value of P12
N102 P10 F15 K-12.3
P10 = 12.3
N103 P10 F15 K4.5
P10 = 4.5
F16 Complement
N101 P10 F16 P12
P10 takes the value of P12 with the opposite sign
N102 P10 F16 K-12.3
P10 = -12.3
N103 P10 F16 K4.5
P10 = -4.5