beautypg.com

Preface – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 204

background image

Preface

MicroLogix 1000 Programmable Controllers User Manual

11–16

4.

If while an STI is pending, the STI timer expires, the STI lost bit (S:5/10) is set.

5.

When the STI subroutine scan is completed, scanning of the program resumes at
the point where it left off, unless an STI is pending. In this case the subroutine
is immediately scanned again.

6.

The cycle repeats.

For identification of your STI subroutine, include an INT instruction as the first
instruction on the first rung of the file.

STI Subroutine Content

The STI subroutine contains the rungs of your application logic. You can program
any instruction inside the STI subroutine except a TND instruction. IIM or IOM
instructions are needed in an STI subroutine if your application requires immediate
update of input or output points. End the STI subroutine with an RET instruction.

JSR stack depth is limited to 3. You may call other subroutines to a level 3 deep
from an STI subroutine.

Interrupt Latency and Interrupt Occurrences

Interrupt latency is the interval between the STI timeout and the start of the interrupt
subroutine. STI interrupts can occur at any point in your program, but not
necessarily at the same point on successive interrupts. The table below shows the
interaction between an interrupt and the controller operating cycle.

STI

Between instruction updates

Between communication packets

At start and end

Controller Overhead

Communication

Output Scan

Program Scan

Input Scan

Events in the processor operating cycle