Understanding How The S7-200 Executes Your Control Logic - Siemens SIMATIC S7-200 System Manual

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

Advertisement

S7-200 Programmable Controller System Manual

Understanding How the S7-200 Executes Your Control Logic

The S7-200 continuously cycles through the control logic in your program, reading and writing
data.
The S7-200 Relates Your Program to the Physical Inputs and Outputs
The basic operation of the S7-200 is very simple:
The S7-200 reads the status of the inputs.
-
The program that is stored in the S7-200 uses
-
these inputs to evaluate the control logic. As
the program runs, the S7-200 updates the
data.
The S7-200 writes the data to the outputs.
-
Figure 4-1 shows a simple diagram of how an
electrical relay diagram relates to the S7-200. In this
example, the state of the switch for starting the
motor is combined with the states of other inputs.
The calculations of these states then determine the
The calculations of these states then determine the
state for the output that goes to the actuator which
starts the motor.
The S7-200 Executes Its Tasks in a Scan Cycle
The S7-200 executes a series of tasks repetitively. This cyclical execution of tasks is called the
scan cycle. As shown in Figure 4-2, the S7-200 performs most or all of the following tasks during a
scan cycle:
Reading the inputs: The S7-200 copies the
-
state of the physical inputs to the
process-image input register.
Executing the control logic in the program:
-
The S7-200 executes the instructions of the
program and stores the values in the various
memory areas.
Processing any communications requests:
-
The S7-200 performs any tasks required for
communications.
Executing the CPU self-test diagnostics: The
-
S7-200 ensures that the firmware, the
program memory, and any expansion
modules are working properly.
Writing to the outputs: The values stored in
W iti
t th
-
-
the process-image output register are written
to the physical outputs.
The execution of the user program is dependent upon whether the S7-200 is in STOP mode or in
RUN mode. In RUN mode, your program is executed; in STOP mode, your program is not
executed.
24
t
t Th
l
t
d i
Start_PB
E_Stop
M_Starter
Output
Input
Figure 4-1
Controlling Inputs and Outputs
Writes to the outputs
Perform the CPU Diagnostics
Process any
Communications Requests
Execute the Program
Reads the inputs
Figure 4-2
S7-200 Scan Cycle
M_Starter
Motor
Motor Starter
Start / Stop Switch
Scan Cycle

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents