Installation manual
Publication 1747-RM001G-EN-P - November 2008
11-18 Understanding Interrupt Routines
Discrete Input Interrupt 
Overview
Use the Discrete Input Interrupt (DII) for high-speed processing applications 
or any application that needs to respond to an event quickly. This instruction 
allows the processor to execute a ladder subroutine when the input bit pattern 
of a discrete I/O card matches a compare value that you programmed.
The status file contains six bit values and six word values used to program and 
monitor the DII function. The DII does not require ladder logic instructions 
for configuration. You program the DII to examine the input bit pattern of the 
first bits of any single I/O slot, which contains any discrete input card (such as 
IG16, IV16, IB8, IB32). When the input bit pattern matches the compare 
value, the accumulator is incremented. The DII accumulator counts to the 
preset value and, once the interrupt is generated, it immediately wraps around 
and begins counting again at zero.
While scanning the DII subroutine, you can reconfigure the DII to look for an 
entirely different event. This facilitates DII sequencing. The DII can be 
programmed to compare each input point to either a high (1) or low (0) state. 
The accumulator is incremented on the input transition that causes the input 
points to match the compare value.
IIM or IOM instructions are needed in the DII subroutine if your application 
requires immediate update of input or output points. End the DII subroutine 
with an RET instruction.
Basic Programming Procedure for the DII Function
To use the DII function with your main program file:
1. Create a subroutine file (range is from 3 to 255) and enter the desired 
ladder rungs. This is your DII subroutine file.
(Project Tree - Controller Folder - Processor Status File - DII Tab)
2. Enter the Input Slot number (word S:47).
3. Enter the Bit Mask (word S:48). Valid Bit Masks range from 0 to 255.
4. Enter the Compare Value (word S:49). Valid Compare Values range 
from 0 to 255.
5. Enter the Preset Value (word S:50). Valid Preset Values range from 0 to 
32,767.
6. Enter the DII subroutine File Number in word S:46 of the status file. 
(See page B-55.) A zero value disables the DII function.
Fixed SLC 
5/01
SLC 
5/02
SLC 
5/03
SLC 
5/04
SLC 
5/05
•••










