13. Program Support Functions
13.12 Macro Interrupt; ION, IOF
387
Calling method
User macro interrupt is classified into the following two types depending on the way an interrupt
program is called. These two types of interrupt are selected by parameter "#1229 set01/bit0".
Both types of interrupt are included in calculation of the nest level. The subprograms and user
macros called in the interrupt program are also included in calculation of the nest level.
a. Subprogram type interrupt
b. Macro type interrupt
Subprogram type interrupt
The user macro interrupt program is called as a subprogram.
As with calling by G22, the local variable level remains
unchanged before and after an interrupt.
Macro type interrupt
The user macro interrupt program is called as a user macro. As
with calling by G65, the local variable level changes before and
after an interrupt.
No arguments in the main program can be passed to the
interrupt program.
Acceptance of user macro interrupt signal (UIT)
A user macro interrupt signal (UIT) is accepted in the following two modes: These two modes are
selected by a parameter "#1112 S_TRG".
a. Status trigger mode
b. Edge trigger mode
Status trigger mode
The user macro interrupt signal (UIT) is accepted as valid when
it is on.
If the interrupt signal (UIT) is ON when the user macro interrupt
function is enabled by ION, the interrupt program is activated.
By keeping the interrupt signal (UIT) ON, the interrupt program
can be executed repeatedly.
Edge trigger mode
The user macro interrupt signal (UIT) is accepted as valid at its
rising edge, that is, at the instance it turns on.
This mode is useful to execute an interrupt program once.
User macro interrupt signal (UIT)
(Status trigger mode)
(Edge trigger mode)
User macro interrupt
ON
OFF
Accepting user macro interrupt signal (UIT)