Fanuc Series 15i/150i-MA (Programming) Operators Manual

- 617 -
- Natural logarithm #i = LN[#j];
- When the antilogarithm (#j) is zero or smaller, alarm PS0119 is
- A constant can be used instead of the #j variable.
- Exponential function #i = EXP[#j];
- When the result (j) of the operation exceeds about 709, an
overflow occurs and alarm PS0111 is issued.
- A constant can be used instead of the #j variable.
- ROUND function
- When the ROUND function is included in an arithmetic or logic
operation command, IF statement, or WHILE statement, the
ROUND function rounds off at the first decimal place.
[Example]When #1=ROUND[#2]; is executed where #2 holds
1.2345, the value of variable #1 is 1.0.
- When the ROUND function is used in NC statement addresses,
the ROUND function rounds off the specified value according to
the least input increment of the address.
[Example]Creation of a drilling program that cuts according to the
values of variables #1 and #2, then returns to the original
position Suppose that the increment system is 1/1000 mm,
variable #1 holds 1.2345, and variable #2 holds 2.3456.
G00 G91 X-#1; Moves 1.235 mm.
G01 X-#2 F300; Moves 2.346 mm.
G00 X[#1+#2]; Since 1.2345 + 2.3456 = 3.5801, the travel
distance is 3.580, which does not return
the tool to the original position.
This difference comes from whether addition is performed
before or after rounding off.
G00X-[ROUND[#1]+ROUND[#2]] must be specified to
return the tool to the original position.
- ADP (Add Decimal Point)
- By using ADP[#n] (where n = 1 to 33), a subprogram can add the
decimal point to an argument passed without the decimal point.
[Example] In the subprogram called by G65 P_X10;, the value of
ADP[#24] is 10., with a decimal point added at the end
of the argument. This can be used when the
subprogram does not consider the increment system.
If, however, 1 is set for parameter CVA (bit 4 of No.
7000), the ADP function cannot be used because the
argument is converted to 0.01 as soon as it is passed.
To maintain program compatibility, it is
recommended that the decimal point be added by the
argument specification at the time of a macro call,
instead of the ADP function.

Leave a Reply

Your email address will not be published. Required fields are marked *