
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
69
PLC concepts
4
The basic function of the CPU is to monitor field inputs and, based on your control logic, turn
on or off field output devices. This chapter explains the concepts used to execute your
program, the various types of memory used, and how that memory is retained.
4.1
Execution of the control logic
The CPU continuously cycles through the control logic in your program, reading and writing
data. The basic operation 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.
The figure shows a simple diagram of
how an electrical relay diagram relates
to the CPU. In this example, the state
of the switch for starting the motor is
combined with the states of other in-
puts. The calculations of these states
then determine the state for the output
that goes to the actuator which starts
the motor.