EasyManua.ls Logo

Siemens SIMATIC S7 - GET_ERROR (Get Non-Fatal Error Code)

Siemens SIMATIC S7
866 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...
Program instructions
7.13 Program control
S7-200 SMART
356 System Manual, V2.3, 07/2017, A5E03822230-AF
7.13.5
GET_ERROR (Get non-fatal error code)
LAD / FBD
STL
Description
GERR ECODE
The get non-fatal error code instruction stores the CPU's current non-fatal error
code in the location assigned to ECODE. After the error code is stored, the non-
fatal error code is cleared in the CPU.
Non-fatal errors with ENO = 0
SM bits affected
0006H Indirect address
None
Input / output
Data type
Operand
ECODE
WORD
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, *VD, *LD, *AC
Non-fatal run-time errors also affect certain special memory error flag addresses that can be
evaluated along with the GET_ERROR instruction to determine the cause of a run-time fault.
In the event that the generic error flag SM4.3 = 1 (Run-time programming problem) is active,
a GET_ERROR execution can be used to identify the specific error.
Non-fatal error code 0000H indicates that no actual error currently exists. In the case of a
temporary run-time non-fatal error, a GET_ERROR (ECODE output) produces a non-zero
error value and then the next program scan can produce a zero ECODE value.
You should use compare logic to save the ECODE value in another memory location. Your
program can then test the saved error code value and begin a programmatic reaction.
Note
The error codes for the ECODE output are listed in the PLC non
-fatal error codes table (see
reference below). The error code values are in hexadecimal (16#xxxx).
See Also
PLC non-fatal error codes (Page 792)
PLC non-fatal error SM flags (Page 795)

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals