6 BASIC INSTRUCTIONS
6.6 Program Execution Control Instructions
331
6
Recovery from interrupt programs
IRET
• Indicates the completion of interrupt program processing.
• Returns to sequence program processing following the execution of the IRET instruction.
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
• The following program adds 1 to D0 if M0 is ON when the number 3 interrupt is generated.
Setting
data
Internal device R, ZR J\ U\G Zn Constant Others
Bit Word Bit Word
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4220 There is no pointer corresponding to the interrupt number.
4221 After an interrupt occurred, the END, FEND, GOEND, or STOP instruction
was executed prior to the IRET instruction.
4223 The IRET instruction was executed before the interrupt program is executed.
The IRET instruction was executed during the fixed scan execution type
program.
[Ladder Mode] [List Mode]
Basic
Process
High
performance
Redundant
Universal
LCPU