EasyManua.ls Logo

Siemens SIMATIC S7-200 - Scan Cycle of the S7-200 CPU; Reading the Digital Inputs; Understanding the Scan Cycle of the CPU

Siemens SIMATIC S7-200
606 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Basic Concepts for Programming an S7-200 CPU
4-22
S7-200 Programmable Controller System Manual
A5E00066097-02
4.6 Understanding the Scan Cycle of the CPU
The S7-200 CPU is designed to execute a series of tasks, including your program,
repetitively. This cyclical execution of tasks is called the scan cycle. During the
scan cycle shown in Figure 4-12, the CPU performs most or all of the following
tasks:
Reading the inputs
Executing the program
Processing any communication requests
Executing the CPU self-test diagnostics
Writing to the outputs
Executing the program
Processing any communications requests
Executing the CPU self-test diagnostics
Writing to the outputs
Reading the inputs
One Scan Cycle
Figure 4-12 Scan Cycle of the S7-200 CPU
The series of tasks executed during the scan cycle is dependent upon the
operating mode of the CPU. The S7-200 CPU has two modes of operation, STOP
mode and RUN mode. With respect to the scan cycle, the main difference between
STOP and RUN mode is that in RUN mode your program is executed, and in
STOP mode your program is not executed.
Reading the Digital Inputs
Each scan cycle begins by reading the current value of the digital inputs and then
writing these values to the process-image input register.
The CPU reserves the process-image input register in increments of eight bits (one
byte). If the CPU or expansion module does not provide a physical input point for
each bit of the reserved byte, you cannot reallocate these bits to subsequent
modules in the I/O chain or use them in your program. The CPU resets these
unused inputs to zero in the image register at the beginning of every scan.
However, if your CPU can accommodate several expansion modules and you are
not using this I/O capacity (have not installed the expansion modules), you can use
the unused expansion input bits as additional memory bits.

Table of Contents

Other manuals for Siemens SIMATIC S7-200

Related product manuals