Installation manual

Publication 1747-RM001G-EN-P - November 2008
11-32 Understanding Interrupt Routines
I/O Interrupt Executing (Word S:32) - This word contains the slot
number of the specialty I/O module that generated the currently
executing ISR. This value is cleared upon completion of the ISR, run
mode entry, or upon power up. You can interrogate this word inside of
your DII or STI subroutine or fault routine if you wish to know if these
higher priority interrupts have interrupted an executing ISR. You may
also use this value to discern interrupt slot identity when multiplexing
two or more specialty I/O module interrupts to the same ISR.
I/O Interrupt Disable (IID)
and
I/O Interrupt Enable (IIE)
These instructions are generally used in pairs to prevent I/O interrupts from
occurring during time-critical or sequence-critical portions of your main
program or subroutine. The I/O Event-Driven Interrupt function is used with
specialty I/O modules capable of generating an interrupt.
Use these instructions together to create a zone in your main ladder program
file or subroutine file in which I/O interrupts cannot occur. Both instructions
take effect immediately upon execution. You must specify a subroutine to be
executed upon receipt of such an interrupt.
SLC 5/02 specific: Setting/clearing the I/O interrupt enable bits (S:27 and S:28)
with a programming device or standard instruction such as MVM takes effect
at the END of the scan only.
SLC 5/03 and higher processors: Setting/clearing the I/O interrupt enable bits
(S:27 and S:28) with a programming device or standard instruction such as
MVM takes effect immediately.
IID Operation
When true, this instruction clears the I/O interrupt enable bits (S:27/1
through S:28/14) corresponding to the slots parameter of the instruction.
Interrupt subroutines of the affected slots are not able to execute when an
interrupt request is made. Instead, the corresponding I/O pending bits (S:25/1
through S:26/14) are set. The ISR is not executed until an IIE instruction with
the same slot parameter is executed, or until the end of the scan during which
you use a programming device to set the corresponding status file bit.
IID
I/O Interrupt Disable
Slots 0
IID
IIE
I/O Interrupt Enable
Slots 0
IIE
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
••••