
PROGRAMMING
B–63444EN/01
14. CUSTOM MACRO
171
Once G66 is issued to specify a modal call a macro is called after a block
specifying movement along axes is executed. This continues until G67
is issued to cancel a modal call.
O0001 ;
:
G66 P9100 L2 A1.0 B2.0 ;
G00 G90 X100.0 ;
Z120.0 ;
X150.0 ;
G67 ;
:
M30 ;
O9100 ;
:
G00 Z–#1 ;
G01 Z–#2 F300 ;
:
:
:
:
M99 ;
G66 P p L ȏ <argument–specification> ;
P : Number of the program to call
ȏ : Repetition count (1 by default)
Argument : Data passed to the macro
⋅ After G66, specify at address P a program number subject to a modal
call.
⋅ When a number of repetitions is required, a number from 1 to 9999 can
be specified at address L.
⋅ As with a simple call (G65), data passed to a macro program is
specified in arguments.
When a G67 code is specified, modal macro calls are no longer performed
in subsequent blocks.
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).
Modal calls can be nested by specifying another G66 code during a modal
call.
⋅ In a G66 block, no macros can be called.
⋅ G66 needs to be specified before any arguments.
⋅ No macros can be called in a block which contains a code such as a
miscellaneous function that does not involve movement along an axis.
⋅ Local variables (arguments) can only be set in G66 blocks. Note that
local variables are not set each time a modal call is performed.
14.6.2
Modal Call (G66)
Explanations
D Call
D Cancellation
D Call nesting
D Modal call nesting
Limitations