Basic instructions
8.8 Program control operations
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
311
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 8- 144 GET_ERROR instruction
Indicates that a local program block execution error has occurred
and fills a predefined error data structure with detailed error infor-
mation.
Table 8- 145 Data types for the parameters
ERROR ErrorStruct Error data structure: You can rename the structure, but not the
members within the structure.
Table 8- 146 Elements of the ErrorStruct data structure
FLAGS Byte Shows if an error occurred during a block call.
• 16#01: Error during a block call.
• 16#00: No error during a block call.
REACTION Byte Default reaction:
• 0: Ignore (write error),
• 1: Continue with substitute value "0" (read error),
• 2: Skip instruction (system error)
Information about the address and type of block
BLOCK_TYPE Byte Type of block where the error occurred:
• 1: OB
• 2: FC
• 3: FB
Reference to the internal memory
MODE Byte Access mode: Depending on the type of access, the following infor-