FANUC Series 16/18/160/180-Model C Machining Center Operators Manual

PROGRAMMING
B–62764EN/01
16. CUSTOM MACRO
397
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 ;
Y200.0 ;
X150.0 Y300.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
S After G66, specify at address P a program number subject to a modal
call.
S When a number of repetitions is required, a number from 1 to 9999 can
be specified at address L.
S 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.
S In a G66 block, no macros can be called.
S G66 needs to be specified before any arguments.
S 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.
S Local variables (arguments) can only be set in G66 blocks. Note that
local variables are not set each time a modal call is performed.
16.6.2
Modal Call (G66)

D Call
D Cancellation
D Call nesting
D Modal call nesting


Leave a Reply

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