Specifications
Basic Concepts for Programming an S7-200 CPU
4-5
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
4.2 Concepts of an S7-200 Program
Relating the Program to Inputs and Outputs
The basic operation of the S7-200 CPU is very simple:
The CPU reads the status of the inputs.
The program that is stored in the CPU uses these inputs to evaluate the control
logic. As the program runs, the CPU updates the data.
The CPU writes the data to the outputs.
Figure 4-2 shows a simple diagram of how an electrical relay diagram relates to
the S7-200 CPU. In this example, the state of the operator panel switch for
opening the drain is added to the states of other inputs. The calculations of these
states then determine the state for the output that goes to the solenoid that closes
the drain.
The CPU continuously cycles through the program, reading and writing data.
S
Drain Solenoid
Operator Station
Output
Area
Input
Area
Areas of Memory
in the CPU
S7-200 CPU
Input
Output
Opn_Drn_PB
Drain_Sol
Cls_Drn_PB A_Mtr_Fbk Drain_SolE_Stop_On
Figure 4-2 Relating the Program to Inputs and Outputs