4-7
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Understanding the Basic Scan Cycle of the PDS 210
The scan cycle for the PDS 210 is similar to the scan cycle for the CPU 210. Because the
PDS 210 communicates with STEP 7-Micro/WIN, it must process any communication
requests. The PDS 210 also updates the timers before executing the program, which is
different from the CPU 210.
As shown in Figure 4-5, the PDS 210 performs the following tasks during the scan cycle:
1. During the first scan (after power is turned on) only, the PDS 210 clears the outputs (Q),
bit memory (M) area, and the current values for the timers (T). The PDS 210 clears these
elements only during the first scan.
2. The PDS 210 filters the inputs and updates the value of the analog adjustment
potentiometer (stored in SMW2). This delays the scan by approximately 15 ms.
3. The PDS 210 updates the time base for the 100 ms timers. (Notice that the PDS 210
updates the timers before executing the program.)
4. The PDS 210 executes the user program. As the program writes values to the outputs,
the PDS 210 immediately updates the outputs.
5. The PDS 210 processes any communication requests from STEP 7-Micro/WIN.
The interrupt routine is not executed as part of the normal scan cycle, but is executed when
the interrupt event occurs (which may be at any point in the scan cycle). After the Enable
Interrupt (ENI) instruction in the main program segment has been executed, the PDS 210
executes the interrupt routine on the rising edge of I0.0. The PDS 210 can run the interrupt
routine any time within the scan cycle.
Clear the outputs.
Clear M memory.
Clear the current
values for the timers.
Read the filtered
inputs.
Update the analog
potentiometer value.
Update the time
base for the timers.
First Scan Only
All Scans
After the interrupt routine has been enabled, interrupt events can start the
interrupt routine at any time in the scan,
PDS Tasks
Process any
communication
requests.
Execute the
program.
Write the outputs.
Figure 4-5 Scan Cycle for the PDS 210
Basic Concepts for Programming the CPU 210