(Common to Power Mate i–D and –H)
13. CUSTOM MACRO
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).
Fig.13.11.2 (a) Return from a custom macro interrupt
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 G is executed before M99 is recognized.)
(1) G X ;
(2) G X M99 ;
Return from a custom