
B-63944EN/02 PROGRAMMING 16.CUSTOM MACRO
- 443 -
[Example]
G66 P9100 ; O9100 ; O9200 ;
X10.0 ; (1-1) Z50.0 ; (2-1) X60.0 ; (3-1)
G66 P9200 ; M99 ; Y70.0 ; (3-2)
X15.0 ; (1-2) M99;
G67 ; Cancels P9200.
G67 ; Cancels P9100.
X-25.0 ; (1-3)
Execution order of the above program (blocks not containing the
move command omitted)
(1-1) (1-2) (1-3)
(2-1) (3-1) (3-2)
(2-1) (2-1)
* No modal call is performed after (1-3) because the mode is not
the macro call mode.
Limitation
• G66 and G67 blocks are specified in pairs in the same program.
If a G67 code is specified not in the G66 mode, an alarm PS1100
occurs. Bit 0 (G67) of parameter No. 6000 can be set to 1 to
specify that the alarm does not occur in this case.
• In a G66 block, no macros can be called. Local variables
(arguments) are set, however.
• G66 needs to be specified before any arguments.
• No macros can be called in a block which contains a code such as a
auxiliary 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.
NOTE
If M99 is specified in a block in which a call is
performed, it is executed after the call is
performed.