Stop Scan Cycle Instruction; Get Error Instructions - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

100BBasic instructions
7.8 Program control
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
Maximum cycle time
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
STP();
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.
222
Minimum value
1 ms
Description
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.
Maximum value
6000 ms
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
Default value
150 ms

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents