beautypg.com

Rockwell Automation 1772-LS_LSP,D17726.8.6 PROG/OPER MANUAL-MINI PLC-2/05 User Manual

Page 177

background image

Selectable Timed Interrupt

Chapter 15

15Ć3

Figure 15.2

Time Relationship of Subroutine Execution Time versus Service Time

Time Base

Service Time

0

1

2

3

4

5

6

Subroutine

Execution

Time

Less Than

Service Time

Subroutine

Execution

Time

Greater Than

Service Time

Subroutine

Execution

Time

Greater Than

STI Period

Figure 15.2b

Figure 15.2c

Figure 15.2d

Figure 15.2e

Figure 15.2a

Selectable timed interrupts are executed at every time period once they are
enabled, including the I/O scan. During the program, the program is interrupted
while the STI subroutine is executed. The program returns to the point of
interrupt and continues execution just as if nothing has happened. However,
during an I/O scan, a block transfer may be requested by a module. In this case,
the STI is not executed until the block transfer is completed. In addition, the
STI is disabled during an insert/remove or a mode of operation change.

Should the subroutine execution time plus program transition time exceed
service time (Figure 15.2d), the selectable timed interrupt is no longer accurate.
Two things happen:

The STI too long bit (02702) is set on. This bit is available for your use and

can be used to initiate annunciators or other status indicators. The bit
functions similar to a latch instruction and must be reset with an
Unlatch instruction.

The processor completely executes the subroutine. It waits one complete STI

period before executing the subroutine again (Figure 15.2d and 15.2e).

In this chapter, we showed you how to execute subroutines at timed intervals.
The next chapter shows you how to edit instructions in your program.

Chapter Summary