Program instructions   
7.13 Program control 
  S7-200 SMART 
354  System Manual, V2.3, 07/2017, A5E03822230-AF 
 
END, STOP, and WDR (watchdog timer reset) 
 
 
 
 
The conditional END instruction 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.  
 
 
The conditional STOP instruction terminates the execution of your pro-
gram by causing a transition of the 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 ig-
nored. Remaining actions in the current scan cycle are completed, 
including execution of the main user program. The transition from RUN 
to STOP mode is made at the end of the current scan. 
 
 
The watchdog reset instruction retriggers the system watchdog timer 
and adds 500 milliseconds to the time allowed for the scan to complete 
before a watchdog timeout error occurs.  
When the CPU is in RUN mode, the duration of the main scan is limited to 500 milliseconds, 
by default. If the duration of the main scan exceeds 500 milliseconds, then the CPU 
automatically transitions to STOP mode and the non-fatal error 001AH (Scan watchdog 
timeout) is issued. 
You can extend the duration of the Main Scan by executing the Watchdog Reset (WDR) 
instruction in your program. The scan watchdog timeout period is reset to 500 milliseconds 
each time the WDR instruction is executed. 
However, there is an absolute maximum main scan duration of 5 seconds. The CPU will 
unconditionally transition to STOP mode if the current scan duration reaches 5 seconds.