7.8.7
STP (Exit program) instruction
Table 7- 106 STP instruction
LAD / FBD
SCL
STP();
For more information see: Configuring the outputs on a RUN-to-STOP transition (Page 104).
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.8
GET_ERROR and GET_ERROR_ID (Get error and error ID locally) instructions
The get error instructions provide information about program block execution errors. If you
add a GET_ERROR or GET_ERROR_ID instruction to your code block, you can handle
program errors within your program block.
GET_ERROR
Table 7- 107 GET_ERROR instruction
LAD / FBD
SCL
GET_ERROR(_out_);
Table 7- 108 Data types for the parameters
Parameter
Data type
ERROR
ErrorStruct
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Description
STP 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.
Description
Indicates that a local program block execution error has occurred
and fills a predefined error data structure with detailed error
information.
Description
Error data structure: You can rename the structure, but not the
members within the structure.
Basic instructions
7.8 Program control operations
263