17.CUSTOM MACRO PROGRAMMING B-63324EN/03
- 672 -
- Custom macro interrupt during execution of a block that involves cycle operation
For type I
Even when cycle operation is in progress, movement is interrupted, and
the interrupt program is executed. If the interrupt program contains no
NC statements, the cycle operation is restarted after control is returned
to the interrupted program. If there are NC statements, the remaining
operations in the interrupted cycle are discarded, and the next block is
For type II
When the last movement of the cycle operation is started, macro
statements in the interrupt program are executed unless an NC
statement is encountered. NC statements are executed after cycle
operation is completed.
- Custom macro interrupt signal (UINT)
There are two schemes for custom macro interrupt signal (UINT) input:
The status-triggered scheme and edge- triggered scheme. When the
status-triggered scheme is used, the signal is valid when it is on. When
the edge triggered scheme is used, the signal becomes valid on the
rising edge when it switches from off to on status.
One of the two schemes is selected with TSE (bit 3 of parameter 6003).
When the status-triggered scheme is selected by this parameter, a
custom macro interrupt is generated if the interrupt signal (UINT) is on
at the time the signal becomes valid. By keeping the interrupt signal
(UINT) on, the interrupt program can be executed repeatedly.
When the edge-triggered scheme is selected, the interrupt signal
(UINT) becomes valid only on its rising edge. Therefore, the interrupt
program is executed only momentarily (in cases when the program
consists of only macro statements). When the status-triggered scheme
is inappropriate, or when a custom macro interrupt is to be performed
just once for the entire program (in this case, the interrupt signal may
be kept on), the edge-triggered scheme is useful.
Except for the specific applications mentioned above, use of either
scheme results in the same effects. The time from signal input until a
custom macro interrupt is executed does not vary between the two
In the Fig.17.14.2 (c), an interrupt is executed four times when the
status triggered scheme is used; when the edge- triggered scheme is
used, the interrupt is executed just once.