Program Control Instructions; Conditional End; Stop; Watchdog Reset - Siemens Simatic S7-200 System Manual

Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual

Program Control Instructions

Conditional End

The Conditional End instruction (END) terminates the current scan
based upon the condition of the preceding logic. You can use the
Conditional End instruction in the main program, but you cannot use
it in either subroutines or interrupt routines.

Stop

The Stop instruction (STOP) terminates the execution of your
program by causing a transition of the S7-200 CPU from RUN to
STOP mode.
If the Stop instruction is executed in an interrupt routine, the interrupt
routine is terminated immediately, and all pending interrupts are
ignored. Remaining actions in the current scan cycle are completed,
including execution of the main user program, and the transition
6
from RUN to STOP mode is made at the end of the current scan.

Watchdog Reset

The Watchdog Reset instruction (WDR) retriggers the system watchdog timer of the S7-200 CPU to
extend the time that the scan is allowed to take without getting a watchdog error.
You should use the Watchdog Reset instruction carefully. If you use looping instructions either to prevent
scan completion or to delay excessively the completion of the scan, the following processes are inhibited
until the scan cycle is completed:
-
Communications (except Freeport Mode)
-
I/O updating (except Immediate I/O)
-
Force updating
-
SM bit updating (SM0, SM5 to SM29 are not updated)
-
Run-time diagnostics
-
10-ms and 100-ms timers will not properly accumulate time for scans exceeding 25 seconds
-
STOP instruction, when used in an interrupt routine
-
Expansion modules with discrete outputs also include a watchdog timer that turns off outputs if the
module is not written by the S7-200. Use an immediate write to each expansion module with
discrete outputs to keep the correct outputs on during extended scan times. Refer to the example
that follows this description.
Tip
If you expect your scan time to exceed 500 ms, or if you expect a burst of interrupt activity that could
prevent returning to the main scan for more than 500 ms, you should use the Watchdog Reset
instruction to retrigger the watchdog timer.
Each time you use the Watchdog Reset instruction, you should also use an immediate write to one
output byte (QB) in each discrete expansion module to reset each expansion module watchdog.
If you use the Watchdog Reset instruction to allow the execution of a program that requires a long scan
time, changing the mode switch to the STOP position causes the S7-200 to transition to STOP mode
within 1.4 seconds.
168

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents