PROGRAMMING15. CUSTOM MACRO
B–63614EN/01
338
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
schemes.
1
0
Interrupt signal (UINT)
Interrupt
execution
Interrupt
execution
Interrupt
execution
Interrupt
execution
Interrupt
execution
Status–triggered
scheme
Edge–triggered
scheme
In the above example, 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.
D Custom macro interrupt
signal (UINT)