338
7 APPLICATION INSTRUCTION
7.3 Program execution control instruction
Returning from the interrupt program
IRET
This instruction indicates an end of the processing of an interrupt program.
When an interrupt (input or timer) is generated while the main program is executing, the program execution jumps to an
interrupt (I) routine. The IRET instruction returns the program execution to the main routine.
The table below shows two types of jump to an interrupt routine.
Ladder diagram Structured text
Not supported
Function Interrupt No. Description
Interrupt from inputs (including
counter)
I0 to I23 Interrupt pointer used for the CPU built-in functions (such as input interrupt, high-speed comparison
match interrupt)
Internal timer interrupt I28 to I31 Interrupt pointer used for fixed-cycle interrupts of the internal timer
Error code
(SD0/SD8067)
Description
33E6 The IRET instruction is executed in the main program.