PROGRAMMING 15. CUSTOM MACRO
B–63604EN/01
297
There are two types of custom macro interrupts: Subprogram–type
interrupts and macro–type interrupts. The interrupt type used is selected
by MSB (bit 5 of parameter 6003).
(a) Subprogram–type interrupt
An interrupt program is called as a subprogram. This means that the
levels of local variables remain unchanged before and after the
interrupt. This interrupt is not included in the nesting level of
subprogram calls.
(b) Macro–type interrupt
An interrupt program is called as a custom macro. This means that
the levels of local variables change before and after the interrupt. The
interrupt is not included in the nesting level of custom macro calls.
When a subprogram call or a custom macro call is performed within
the interrupt program, this call is included in the nesting level of
subprogram calls or custom macro calls. Arguments cannot be passed
from the current program even when the custom macro interrupt is a
macro–type interrupt.
In general, custom macro interrupts are controlled by M96 and M97.
However, these M codes, may already being used for other purposes (such
as an M function or macro M code call) by some machine tool builders.
For this reason, MPR (bit 4 of parameter 6003) is provided to set M codes
for custom macro interrupt control.
When specifying this parameter to use the custom macro interrupt control
M codes set by parameters, set parameters 6033 and 6034 as follows:
Set the M code to enable custom macro interrupts in parameter 6033, and
set the M code to disable custom macro interrupts in parameter 6034.
When specifying that parameter–set M codes are not used, M96 and M97
are used as the custom macro control M codes regardless of the settings
of parameters 6033 and 6034.
The M codes used for custom macro interrupt control are processed
internally (they are not output to external units). However, in terms of
program compatibility, it is undesirable to use M codes other than M96
and M97 to control custom macro interrupts.
When performing a custom macro interrupt, the user may want to
interrupt the NC statement being executed, or the user may not want to
perform the interrupt until the execution of the current block is completed.
MIN (bit 2 of parameter 6003)is used to select whether to perform
interrupts even in the middle of a block or to wait until the end of the
block.
15.11.2
Details of Functions
Explanations
D ubprogram–type
interrupt and macro–type
interrupt
D M codes for custom
macro interrupt control
D Custom macro interrupts
and NC statements