beautypg.com

Operation, Interrupt subroutine (isr) content, Interrupt occurrences – Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual

Page 432

background image

5/02 Processor Only

Chapter 31
Understanding I/O Interrupts –

31–2

When you download your program and enter the Run mode, the I/O interrupt
begins operation as follows:

The specialty I/O module determines that it needs servicing and generates
an interrupt request to the SLC processor.

The processor is interrupted from what it is doing, and the specified
interrupt subroutine file (ISR) is scanned.

When the ISR scan is completed, the specialty I/O module is notified.
This informs the specialty I/O module that it is allowed to generate a new
interrupt.

The processor resumes normal operation from where it left off.

Interrupt Subroutine (ISR) Content

Include an Interrupt Subroutine (INT) instruction as the first instruction in
your ISR. This identifies the subroutine file as an interrupt subroutine versus
a regular subroutine.

The ISR will contain the rungs of your application logic. You can program
any instruction inside an ISR except a TND, REF, or SVC instruction. IIM
or IOM instructions are needed in an ISR if your application requires
immediate update of input or output points. Terminate the ISR with an RET
(return) instruction.

JSR stack depth is limited to 3. That is, you may call other subroutines to a
level 3 deep from an ISR.

Interrupt Occurrences

I/O interrupts can occur at any point in your program, but not necessarily at
the same point on successive interrupts. Interrupts can only occur between
instructions in your program, inside the I/O scan (between slots), or between
the servicing of communications packets. ISR execution time adds directly
to the overall scan time.

Processor Overhead

Communication

Output Scan

Program Scan

Input Scan

Between slot updates

Between instruction executions

Between slot updates

Between communication packets

Events in the processor operating cycle

I/O interrupts can occur:

Operation