EasyManua.ls Logo

Siemens SIMATIC S7-1200 - 8.8.8 GET_ERROR and GET_ERROR_ID (Get error and error ID locally) instructions

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Basic instructions
8.8 Program control operations
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
311
8.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 8- 144 GET_ERROR instruction
LAD / FBD
SCL
Description
GET_ERROR(_out_);
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
Parameter
Data type
Description
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
Structure components
Data type
Description
ERROR_ID
Word
Error ID
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)
CODE_ADDRESS
CREF
Information about the address and type of block
BLOCK_TYPE Byte Type of block where the error occurred:
1: OB
2: FC
3: FB
CB_NUMBER
UInt
Number of the code block
OFFSET
UDInt
Reference to the internal memory
MODE Byte Access mode: Depending on the type of access, the following infor-
mation can be output:
Mode
(A)
(B)
(C)
(D)
(E)

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals