FANUC Series 16/18/160/180-Model C for Lathe Operator Manual

PROGRAMMING
16. CUSTOM MACRO
B–62754EN/01
322
To return control from a custom macro interrupt to the interrupted
program, specify M99. A sequence number in the interrupted program
can also be specified using address P. If this is specified, the program is
searched from the beginning for the specified sequence number. Control
is returned to the first sequence number found.
When a custom macro interrupt program is being executed, no interrupts
are generated. To enable another interrupt, execute M99. When M99 is
specified alone, it is executed before the preceding commands terminate.
Therefore, a custom macro interrupt is enabled for the last command of
the interrupt program. If this is inconvenient, custom macro interrupts
should be controlled by specifying M96 and M97 in the program.
When a custom macro interrupt is being executed, no other custom macro
interrupts are generated; when an interrupt is generated, additional
interrupts are inhibited automatically. Executing M99 makes it possible
for another custom macro interrupt to occur. M99 specified alone in a
block is executed before the previous block terminates. In the following
example, an interrupt is enabled for the Gxx block of O1234. When the
signal is input, O1234 is executed again. O5678 is controlled by M96 and
M97. In this case, an interrupt is not enabled for O5678 (enabled after
control is returned to O1000).
M99;
GxxXxxx;
O1234
O1000;
M96P1234;
M96P5678
M97
O5678
GxxXxxx;
M96;
M99;
M97
×
Interrupt
Interrupt
Interrupt
Interrupt
NOTE
When an M99 block consists only of address O, N, P, L, or
M, this block is regarded as belonging to the previous block
in the program. Therefore, a single–block stop does not
occur for this block. In terms of programming, the following
(1) and (2) are basically the same. (The difference is
whether Gff is executed before M99 is recognized.)
(1) Gff Xfff ;
M99 ;
(2) Gff Xfff M99 ;
D Return from a custom
macro interrupt

Leave a Reply

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