Get_Error (Get Non-Fatal Error Code) - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.13 Program control
7.13.5

GET_ERROR (Get non-fatal error code)

LAD / FBD
STL
GERR ECODE
Non-fatal errors with ENO = 0
0006H Indirect address
Input / output
Data type
ECODE
WORD
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)
356
Description
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.
SM bits affected
None
Operand
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, *VD, *LD, *AC
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents