
PROGRAMMING16. CUSTOM MACRO
B–63684EN/01
278
The NC internally identifies argument specification I and argument
specification II. If a mixture of argument specification I and argument
specification II is specified, the type of argument specification specified
later takes precedence.
Example
G65 A1.0 B2.0 I–3.0 I4.0 D5.0 P1000;
<Variables>
#1:1.0
#2:2.0
#3:
#4:–3.0
#5:
#6:
#7:4.0
When both the I4.0 and D5.0 arguments are commanded for
variable #7 in this example, the latter, D5.0, is valid.
5.0
The units used for argument data passed without a decimal point
correspond to the least input increment of each address. The value of an
argument passed without a decimal point may vary according to the
system configuration of the machine. It is good practice to use decimal
points in macro call arguments to maintain program compatibility.
Calls can be nested to a depth of four levels including simple calls (G65)
and modal calls (G66). This does not include subprogram calls (M98).
S Local variables from level 0 to 4 are provided for nesting.
S The level of the main program is 0.
S Each time a macro is called (with G65 or G66), the local variable level
is incremented by one. The values of the local variables at the previous
level are saved in the NC.
D Mixture of argument
specifications I and II
D Position of the decimal
point
D Call nesting
D Local variable levels