How the Control Program Works (GS 2.1)

When you download a program to your PLC and place the PLC in RUN mode, the central processing unit (CPU) of the PLC executes the program in the following sequence:

·The CPU reads the status of all inputs connected to the programmable controller. This data is stored in the input memory area, known as the process-image input register.

·The CPU uses these inputs to evaluate (or execute) the logic of the control program.

·As the program is evaluated, the CPU stores the results of the program logic in the output memory area, known as the process-image output register.

·At the end of the program, the CPU writes the data from the process-image output register to the field outputs.

·The cycle of tasks is repeated.

This cyclic execution of CPU tasks is known as the scan cycle. The scan cycle in the S7-200 CPU includes the following tasks:

·Reading the digital inputs

·Executing the program

·Processing any communication requests

·Executing the CPU self-test diagnostics

·Writing to the digital outputs

See Also: