Using The Debug Option To Specify The Number Of Scans - Siemens Simatic S7-200 CPU 210 System Manual

Table of Contents

Advertisement

Basic Concepts for Programming the CPU 210

Using the Debug Option to Specify the Number of Scans

STEP 7-Micro/WIN allows you to debug your program by specifying a number of scans to be
run on the PDS 210 before stopping. (See Section 2.9.) You can specify to run one scan or
several. The PDS 210 executes the first scan as if power were just turned on. At the end of
the specified number of scans, all of the outputs are cleared.
You can only use the debug option with the PDS 210.
As shown in Figure 4-6, the PDS 210 performs the following tasks when debugging a
program:
1. During the first scan only, the PDS 210 clears the outputs (Q), bit memory (M) area, and
the current values for the timers (T).
2. The PDS 210 filters the inputs and updates the value of the analog adjustment
potentiometer (stored in SMW2).
3. The PDS 210 updates the time base for the 100 ms timers.
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.
6. If you specified more than 1 scan, the PDS 210 starts the next scan, starting with Step 2.
7. After the specified number of scans have been run, the PDS 210 clears all outputs and
disables the hardware interrupt.
PDS Tasks
Clear the outputs.
Clear M memory.
Clear the current
values for the timers.
The PDS 210
executes the
number of
scans specified
by the software
Figure 4-6
Scan Cycle for the Debug Option
4-8
After the interrupt routine has been enabled, interrupt events can start
the interrupt routine at any time in the scan,
Read the filtered
Update the time
inputs.
base for the
timers.
Update the analog
potentiometer value.
Single Scan
Multiple Scans
Execute the
Process any
Clear the outputs.
program.
communication
requests.
Write the outputs.
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents