22ć3 – Rockwell Automation 1772-L8_LW_LWP_LX_LXP,D17726.5.8 User Manual User Manual

Page 350

Advertising
background image

Selectable Timed Interrupt

Chapter 22

22-3

The processor scans the user program (rungs 1-6) until it reaches the
subroutine area. The processor then identifies the subroutine area as
having an STI if:

1.

The STI subroutine begins in the first rung of the subroutine area

2.

The first instruction of the STI rung is a Get instruction

ATTENTION: The Get instruction must be used solely for the
purpose of designating the time period of the STI. STI
subroutine execution time should be limited to approximately
2/3 of the STI interval.

The transition time from main program to STI and return is
50 microseconds.

The Get instruction must be used solely as the STI time base and can have
any data table address (yyy) except a processor work area. Available time
bases (xxx) are 1-999 milliseconds. Your program, through the use of a
Get/Put instruction (see chapter 12) can be used to change the time base of
the selectable timed interrupt. The STI subroutine must end with an
unconditional Return instruction (rung 10 of Figure 22.1). The function is
disabled if you enter zero as the time base in the Get instruction.

The Label instruction is optional and is only used when the main program
wants to call the subroutine based on other conditions rather than selected
time periods. If the subroutine timed interrupt is used as a direct
subroutine with a Label instruction, you can have seven subroutines plus
the STI. If the subroutine is not used as a direct subroutine, you can have
eight subroutines plus the STI.

The STI is executed every time period once it has been enabled during the
I/O scan. The program, or I/O scan, is interrupted when the STI subroutine
is executed. The program returns to the point of interruption and continues
execution just as if nothing has happened. However, during an I/O scan, if
a block transfer is in process, 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.

Selectable Timed Interrupt

Advertising