Installation manual

Publication 1747-RM001G-EN-P - November 2008
11-20 Understanding Interrupt Routines
Event Mode
This mode is active when the preset value (S:50) contains a 0 or 1.
1. The DII reads the first byte of input data of a selected discrete input
card at least once every 100µs.
(1)
Note that this “polling” of the input
data has no effect on processor scan time.
2. When the input data matches the programmed masked value, the
interrupt is generated.
3. The DII subroutine is executed.
(2)
4. The cycle repeats.
(1)
DII Subroutine Content
For identification of your DII subroutine, use the INT instruction as the first
instruction in your first rung.
The DII subroutine contains the rungs of your application logic. You can
program any instruction inside the DII subroutine except a TND, REF, or
SVC instruction. IIM or IOM instructions are needed in a DII subroutine if
your application requires immediate update of input or output points. End the
DII subroutine with an RET instruction.
JSR stack depth is limited to 3. You may call other subroutines to a level 3
deep from an DII subroutine.
(1)
You must add interrupt latency time to the final transition or count that causes the interrupt subroutine to
execute.
(2)
The DII continues to compare the input data to the programmed masked value while executing the DII
subroutine.