100BBasic instructions
7.8 Program control
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
223
GetError
Table 7- 119 GetError instruction
LAD / FBD
SCL
Description
Not available
Indicates that a local program block execution error has occurred and fills a
predefined error data structure with detailed error information.
Table 7- 120 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 7- 121 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
Access mode: Depending on the type of access, the following
information can be output:
Mode
(A)
(B)
(C)
(D)
(E)
0
1
Offset
2
Area
3
Location Scope
Number
4
Area
Offset
MODE
Byte
5
Area
DB no.
Offset