22
Task 4:
Enter the
Conditions for a
Return from the
Subroutine
You have to describe the condition for a return
from the interrupt subroutine. That is, you have
to tell the CPU when to return to the main
program execution. There are two instructions
available: IRT (immediate return with no
condition) and IRTC (immediate return with a
condition).
The example shows an interrupt subroutine
that uses both commands. The conditional
return (IRTC) can appear anywhere in the
subroutine, but unconditional return (IRT) must
be the very last instruction in the subroutine.
Helpful Hints: In our Direct SOFT programming software, the IRTC and the IRT
instructions are available on the Coil Browser. Look under the class listed as "Interrupt."
You've just seen all of the steps involved in writing the control program. Now you're
ready to use the Interrupt Input module to solve your high-speed interrupt problems!
Conditional Return –
If X35 is on, return to the
main program execution
Unconditional Return
(Main Program)
INT
O 0
X20
X35
X35
END
Y5
OUTI
IRTC
Y0
Y1
RSTI
IRT
Need help?
Do you have a question about the DL405 and is the answer not in the manual?
Questions and answers