Interrupting The Scan Cycle; Process-Image Input And Output Registers; Immediate I/O - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Basic Concepts for Programming an S7-200 CPU
The CPU reserves the process-image output register in increments of eight bits
(one byte). If the CPU or expansion module does not provide a physical output
point for each bit of the reserved byte, you cannot reallocate these bits to
subsequent modules in the I/O chain.
When the CPU operating mode is changed from RUN to STOP, the digital outputs
are set to the values defined in the Output Table, or are left in their current state
(see Section 6.4).The default action is that the digital outputs are turned off.
Analog outputs remain at the value last written.

Interrupting the Scan Cycle

If you use interrupts, the routines associated with each interrupt event are stored
as part of the program. The interrupt routines are not executed as part of the
normal scan cycle, but are executed when the interrupt event occurs (which may
be at any point in the scan cycle). Interrupts are serviced by the CPU on a
first-come-first-served basis within their respective priority assignments.

Process-Image Input and Output Registers

It is usually advantageous to use the process-image register rather than to directly
access inputs or outputs during the execution of your program. There are three
reasons for using the image registers:
The sampling of all inputs at the top of the scan synchronizes and freezes the
values of the inputs for the program execution phase of the scan cycle. The
outputs are updated from the image register after the execution of the program
is complete. This provides a stabilizing effect on the system.
Your program can access the image register much quicker than it can access
I/O points, allowing faster execution of the program.
I/O points are bit entities and must be accessed as bits, but you can access the
image register as bits, bytes, words, or double words. Thus, the image registers
provide additional flexibility.

Immediate I/O

Immediate I/O instructions allow direct access to the actual input or output point,
even though the image registers are normally used as either the source or the
destination for I/O accesses. The corresponding process-image input register
location is not modified when you use an immediate instruction to access an input
point. The corresponding process-image output register location is updated
simultaneously when you use an immediate instruction to access an output point.
The CPU treats analog I/O as immediate data unless digital filtering of analog input
is enabled. See Section 6.5 . When you write a value to an analog output, the
output is updated immediately.
4-24
S7-200 Programmable Controller System Manual
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents