Entry type: FAQ, Entry ID: 14960968, Entry date: 06/17/2015
(3)
Rate

Which information is entered in the diagnostic buffer of the SIMATIC S7 CPU with STEP 7 V5.x?

  • Entry
  • Associated product(s)
System diagnostics is for recognizing, evaluating and displaying errors that occur in an automation system. For this there is a diagnostic buffer in each CPU and module that supports system diagnostics, in which detailed information on all the diagnostic events is entered.

Description
With system diagnostics, the operating system of the module gives errors a system-wide uniform number (cause) and time of occurrence. These are displayed as plain text in the medium shown.

In addition, the previous history of an error is registered, because this error message is stored automatically in a diagnostic buffer without the user doing anything.

The basic functions of system diagnostics include all error events of the operating system and particularities of the run of the user program, which are stored in the diagnostic buffer with location, time, error number and additional relevant information.

In addition, the user can use the SFC52 WR_USMSG to enter user-defined diagnostic events (information about the run of the user program, for example) in the diagnostic buffer or send user-defined diagnostics messages to registered nodes (monitoring devices like PG, OP and TD, for example).

Diagnostic buffer
The diagnostic buffer provides the user with the following options:

  • Rapid detection of error causes and therefore increased plant availability.
  • In the case of plant stoppage, evaluation of the events just prior to the STOP to find the cause of the STOP.

The diagnostic buffer is a ring buffer with separate diagnostics entries. In the diagnostic buffer, the diagnostic events are displayed in the order of their occurrence. The first entry contains the latest event. When the buffer is full, the oldest entry is overwritten with each new diagnostic buffer entry. Depending on the CPU, the size of the diagnostic buffer is either fixed or can be set with parameters in the hardware configuration.

Items entered in the diagnostic buffer

  • Error events
  • Mode changes and other operating events important for the user
  • User-defined diagnostic events (with SFC52 WR_USMSG)

In STOP, as few as possible events are entered in the diagnostic buffer so that when the plant stops, the user can find the STOP cause easily in the buffer. There, the operating system ensures that events are entered in the diagnostic buffer only if the event requires a user reaction (for example if the system requests an overall reset or a battery has to be changed) or important information has to be registered (firmware update executed or station failure, for example).

No user programs are processed in the STOP mode. Therefore, in STOP mode, no diagnostic buffer entries triggered by the user program are entered. 

Items NOT entered in the diagnostic buffer

  • Temporary error events
  • Statistics information and traces
  • Information about the quality of data or services
  • Cyclic OB start calls

Error events that occur cyclically are usually only entered the first time they occur and only again when the event of the outgoing error is recognized. This ensures that important entries are not so easily overwritten in the case of diagnostic buffer overflow. Using the Online Help the user can recognize the possible causes and appropriate remedies for each event from the diagnostic buffer. 

Practical evaluation of the diagnostic buffer
You use the diagnostic tools like the S7 System Diagnostics or the user program to evaluate the diagnostic buffer entries.

Increase the diagnostic buffer to maximum number of entries in RUN mode
The maximum number of entries in the diagnostic buffer depends on the CPU type. In the diagnostic buffer you click the "Settings" button and make the following changes:

  1. Change the default setting from "Default set according to module property" to "Preselect".
  2. In the input field you enter the maximum number of entries (500, for example).
  3. Enable the "Save settings for this dialog box" option.
  4. Save the settings with OK.
       

Fig. 01

If you then click the "Update" button in the diagnostics buffer, the maximum number of entries is shown in the display. Using the "Save as..." function you can save the contents of the diagnostic buffer as ASCII text (in a file named "Diagnostic.txt", for example).

Example of an event in the diagnostic buffer
   

Event IDCommentRemedy
16#3583First refer to the information in the diagnostic buffer. However, it might also be a CPU hardware error (OB84).

If the event occurs only once, check the hardware setup for external influences (EMC, grounding, temperature, etc.).
 

If the event occurs multiple times and external influences can be excluded, the RAM memory might be defective. Replace the CPU.