Installation manual

Publication 1747-RM001G-EN-P - November 2008
Understanding Interrupt Routines 11-25
For applications that measure the rate of incoming DII pulses while
using a STI (Selectable Timed Interrupt), SLC 5/03 OS301 and above
updates the DII accumulator prior to executing the first rung of the STI
subroutine.
Discrete Input Interrupt Application Example
The following example shows how to use the Discrete Input Interrupt to
control a high-speed application. In the example, the DII is used to ensure that
all bottles exiting a filling and capping machine have their caps installed.
The bottle proximity switch is used as the DII input. When a bottle passes the
proximity switch, the processor executes the DII subroutine. In the subroutine
the processor reads the state of the cap proximity switch. If the cap is installed,
the chute solenoid does not energize; allowing the bottle to continue down the
line. If the cap is missing, the chute solenoid energizes, causing the defective
bottle to divert down the chute and into the reject bin.
The following parameters are used to program the DII for the above
application.
S:33/8 Interrupt Latency Control Bit = 1
S:46 File = 3
S:47 Slot = 1
S:48 Mask = 00000001
S:49 Compare = 00000001
S:50 Preset = 1
Bottle Proximity (I:1/0)
Cap Proximity (I:1/8)
Chute (O:2/0)
Reject Bin