100BBasic instructions
7.8 Program control
S7-1200 Programmable controller
222
System Manual, 11/2011, A5E02486680-05
Setting the PLC maximum cycle time
Configure the value for maximum scan cycle time in the Device configuration for "Cycle
time".
Table 7- 117 Cycle time values
Cycle time monitor
Minimum value
Maximum value
Default value
Maximum cycle time
1 ms
6000 ms
150 ms
Watchdog timeout
If the maximum scan cycle timer expires before the scan cycle has been completed, an error
is generated. If the error handling code block OB 80 is included in the user program, the
CPU executes OB 80 where you may add program logic to create a special reaction. If OB
80 is not included, the first timeout condition is ignored.
If a second maximum scan time timeout occurs in the same program scan (2 times the
maximum cycle time value), an error is triggered that causes the CPU to transition to STOP
mode.
In STOP mode, your program execution stops while CPU system communications and
system diagnostics continue.
7.8.16
Stop scan cycle instruction
Table 7- 118 STP instruction
LAD / FBD
SCL
Description
STP();
STP (Stop scan cycle) puts the CPU in STOP mode. When the CPU is in
STOP mode, the execution of your program and physical updates from the
process image are stopped.
For more information see: Configuring the outputs on a RUN-to-STOP transition (Page 80).
If EN = TRUE, then the CPU goes to STOP mode, the program execution stops, and the
ENO state is meaningless. Otherwise, EN = ENO = 0.
7.8.17
Get Error instructions
The get error instructions provide information about program block execution errors. If you
add a GetError or GetErrorID instruction to your code block, you can handle program errors
within your program block.