Rockwell Automation 1785-Vx0B, D17856.5.9 PLC-5 VME VMEbus Programmable Controllers User Manual User Manual
Page 115

Performance and Theory of Operations
Chapter 7
7-10
If I:000/02 is:
Rungs 2 and 3 are:
On
Skipped
Off
Executed
If you use subroutines, program scan times can vary by the scan time of
entire logic files.
Effects of Using Interrupts on Program Scan Time
Program scan time is also affected by interrupt programs. An interrupt is a
special situation that causes a separate program to run independent of the
normal logic scan. You define the special event and the type of interrupt
that is to occur.
For example, a selectable timed interrupt (STI) is a program file that you
define to execute once every time period. If :
you configure an STI to execute every 20 ms
the STI program takes 3 ms to execute
the logic scan is 21.8 ms
housekeeping takes 3.2 ms
the first program scan in this example lasts a total of 28 ms.
Logic Scan
STI
Time = 0
Time = 40 ms
Program Scan 2
Housekeeping
STI
Time = 0
Time = 20 ms
3.2 + 21.8 + 3 = 28 ms
House-
keeping
Logic
Scan
STI
Scan
Program Scan 1
The STI occurred 20 ms
into the first program scan.
Time = 40 ms (20 ms + 20 ms)
but program scan 1 = 28 ms,
meaning that the STI interrupts
12 ms into the second
program scan.
Housekeeping
Logic Scan
Since the first program scan takes 28 ms, the STI actually occurs 12 ms
into the second program scan (28 + 12 = 40, which is the time for the
second STI to occur). This example points out that when the STI time
period is different than the program scan time, the STI occurs in different
places in the program scan. Also note that, due to fluctuations in
program-scan times, multiple STIs may be executed during one scan and
no STIs during other scans.
When you enable VME interrupts on the PLC-5 processor, you must
disable the corresponding levels of the VME host’s interrupt-handling
hardware. If you do not do this, and both the VME host and the PLC-5
processor try to handle the same interrupt level, a hardware race condition
ensues and indeterminate interrupt processing may occur.