STP (Exit program) instruction
Table 7- 106 STP instruction
LAD / FBD
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.
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.
Table 7- 107 GET_ERROR instruction
LAD / FBD
Table 7- 108 Data types for the parameters
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
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
Indicates that a local program block execution error has occurred
and fills a predefined error data structure with detailed error
Error data structure: You can rename the structure, but not the
members within the structure.
7.8 Program control operations