Debugging functions, diagnostics and troubleshooting
10.3 Overview: Diagnostics
S7-300, CPU 31xC and CPU 31x: Installation
10-6
Operating Instructions, Edition 08/2004, A5E00105492-05
Diagnostic buffer
If an error occurs, the CPU writes the cause of error to the diagnostic buffer. In
STEP 7 you
can read the diagnostic buffer with your PG. This location holds error information in plain
text.
Other modules capable of diagnostics can be equipped with their own diagnostic buffer. In
STEP 7 HW Config > Hardware diagnostics you can read out his buffer on your PG.
Diagnosable modules without diagnostic buffer write their error information to the CPU's
diagnostic buffer.
When an error or an interrupt event occurs, (e.g. time-of-day interrupt), the CPU switches to
STOP mode, or you can react in the user program via error/interrupt OBs. This would be
OB82 in the above example.
Diagnostics of field devices on PROFINET
For further information, refer to the
PROFINET System Description and to the From
PROFIBUS DP to PROFINET IO Programming Manual. In the next chapter we will
concentrate on the diagnostics of local or distributed modules on PROFIBUS.
Diagnostics with system functions
If the following CPUs are used, we recommend that you use the more user-friendly SFB 54
RALRM (called in diagnostic OB82) to evaluate the diagnostics from centralized or
distributed modules or DP slaves:
CPU
As of firmware version
31xC,
312, 314, 315-2 DP
V 2.0.0
317-2 DP
V 2.1.0
317-2 PN/DP
V 2.2.0
Further options for diagnostics with system functions are listed below:
•
Using SFC 51 "RDSYSST" to read an SSL partial list or an extract thereof.
•
Reading the diagnostic data (slave diagnostics) of a DP slave, using SFC 13
"DPNRM_DG"
Every DP slave provides slave diagnostic data according to EN 50 170 Volume 2,
PROFIBUS. You can use SFC 13 "DPNRM_DG" to read these diagnostic data. Error
information is stored in hex code. Refer to the relevant module manual for information on
the meaning of the read code.
For example, the entry of the value 50H (= dual 0101 0000) in byte 7 of the slave
diagnostics for the distributed I/O module ET 200B indicates a faulty fuse or missing load
voltage in channel group 2 and 3.