beautypg.com

C.5.1 scan time c.5.2 program execution – Rockwell Automation 1772-LP3 PLC - 2/30 Programmable Controller Programming and Operations Manual User Manual

Page 337

background image

Programming .01ĆSecond Timers

Appendix C

CĆ6

The Mini-PLC-2 Processor performs an I/O scan and then a program scan,
in sequence. Scan time is the sum of the times required for both of these
scans. (Note that the processor does not scan unused memory, nor does it
scan that portion of the memory used to store messages.)

During an I/O scan, the processor examines Output Image table bits

2

and

updates or corrects the ON/OFF signals applied to the output modules. It
also examines the ON/OFF signals from the input modules and updates the
ON/OFF status of the corresponding input image table bits.

During a program scan, the processor scans each instruction in the
program, one at a time. It executes output instructions only if the rung is
true. The sequential nature of this scan is discussed further in the next
section.

Scan time cannot be specified exactly for all processors because each
user program is different. The length of the scan time depends on both
the number and the type of instructions the program contains. (Actual
scan-time computation is discussed in a separate section.) For purposes of
discussion, scan time is generally assumed to be about 25 msec, though in
practice, it will range from about 15 to 50 msec, or more, in extreme cases.

The second consideration for 10-msec timer programming is the sequential
nature of the program scan. The processor executes one program
instruction at a time. After it executes an instruction, it cannot examine that
instruction again until the next scan of memory. With respect to timer
instructions, particularly, the processor cannot increment the accumulated
value except when it is executing that instruction.

Furthermore, the only states of any memory bits that affect the execution
of any single instruction are the states those bits have at the instant the
processor executes the instruction. If a bit changes state after the
instruction is executed, the change of state will not affect the instruction
until it is executed the next time.

For example, suppose one program instruction is Examine On 110/13. If
the device is open, the processor will detect an “off” signal from the input
module during the I/O scan and will clear (reset to “0”) the corresponding
input image table bit. After the I/O scan, the program scan begins.

Suppose, in this case, that the input device wired to a terminal at address
110/13 is closed when the program scan begins. The corresponding image
table bit will remain “0” (device is open) until the next I/O scan after
the current program scan is finished, or until the processor executes an
Immediate Input instruction addressed to word 110.

2

For a discussion of memory areas, refer to publication no. 1772Ć6.8.4, The Organization and Structure of the MiniĆPLCĆ2 Memory.

C.5.1
Scan Time

C.5.2
Program Execution