Fanuc Series 15i/150i-MA (Programming) Operators Manual 17.CUSTOM MACRO PROGRAMMING B-63324EN/03
- 582 -
n (1 to 9) of optional block skip/n cannot be replaced with a
variable.
No variable number can be specified directly using a variable.
[Example] When replacing 5 of #5 with #30, specify #[#30] instead of
##30.
Values exceeding the maximum allowable number for each address
cannot be specified.
[Example] When #140 = 120, G#140 exceeds the maximum allowable
number.
When a variable is used as address data, the value of the variable is
automatically rounded to the significant number of decimal places for
[Example] If G00 X#1; is executed when #1 = 12.3456 on a machine
for which the increment system is 1/1000 mm (IS-B), the
result is G00 X12.346;.
By using <expression> described later, the number after an address can
be replaced with <expression>. When the following is programmed :
the value of <expression> or the compliment of the value of
<expression> is used as the value of the address. Note that a constant
with no decimal point used in [ ] is assumed to have a decimal point at
the end.
[Example] X[#24+#18*COS[#1]]
Z-[#18+#26]
- Undefined variable
When the value of a variable is not defined, such a variable is referred
to as a "null" variable. Variable #0 is always a null variable. It cannot
be written to, but it can be read.
(a) Quotation
When an undefined variable is quotated, the address itself is also
ignored.
Original command G90 X100 Y#1
Equivalent command when #1 = <null>
G90 X100
Equivalent command when #1 = 0
G90 X100 Y0
operations
If a local variable or common variable is replaced directly with
<null>, the result becomes <null>. If a system variable is replaced
directly with <null>, or the result of an operation in which <null>
is used is replaced, it is treated in the same way as for a variable
assigned with 0.
Original arithmetic expression
(example of local variable)
#2=#1 #2=#1*5 #2=#1+#1
Replacement result (if #1=<null>)
<null> 0 0
Replacement result (if #1=0)
00 0 