ERROR_ID
Hexadecimal
253E
253F
2575
2576
2942
2943
Operation
By default, the CPU responds to a block execution error by logging an error in the
Diagnostics buffer and transitioning to STOP mode. However, if you place one or more
GET_ERROR or ERR_ID instructions within a code block, this block is now set to handle
errors within the block. In this case, the CPU does not transition to STOP and does not log
an error in the diagnostics buffer. Instead, the error information is reported in the output of
the GET_ERROR or GET_ERR_ID instruction. You can read the detailed error information
with the GET_ERROR instruction, or read just the error identifier with GET_ERR_ID
instruction. Normally the first error is the most important, with the following errors only
consequences of the first error.
The first execution of a GET_ERROR or GET_ERR_ID instruction within a block returns the
first error detected during block execution. This error could have occurred anywhere
between the start of the block and the execution of either GET_ERROR or GET_ERR_ID.
Subsequent executions of either GET_ERROR or GET_ERR_ID return the first error since
the previous execution of GET_ERROR or GET_ERR_ID. The history of errors is not saved,
and execution of either instruction will re-arm the PLC system to catch the next error.
The ErrorStruct data type used by the GET_ERROR instruction can be added in the Data
block editor and block interface editors, so your program logic can access these values.
Select ErrorStruct from the data type drop-down list to add this structure. You can create
multiple ErrorStructs by using unique names. The members of an ErrorStruct cannot be
renamed.
Error condition indicated by ENO
If EN = TRUE and GET_ERROR or GET_ERR_ID executes, then:
● ENO = TRUE indicates a code block execution error occurred and error data is present
● ENO = FALSE indicates no code block execution error occurred
You can connect error reaction program logic to ENO which activates after an error occurs. If
an error exists, then the output parameter stores the error data where your program has
access to it.
GET_ERROR and GET_ERR_ID can be used to send error information from the currently
executing block (called block) to a calling block. Place the instruction in the last network of
the called block program to report the final execution status of the called block.
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02
ERROR_ID
Program block execution error
Decimal
9534
Wrong version or FB does not exist
9535
Instruction does not exist
9589
Program nesting depth error
9590
Local data allocation error
10562
Physical input point does not exist
10563
Physical output point does not exist
Programming instructions
6.2 Extended instructions
153