Reading out the diagnostics buffer of a CPU - STEP 7

Device and network diagnostics

ft:publication_title
Device and network diagnostics
Product
STEP 7
Version
V20
Publication date
11/2024
Language
en-US
Reading out the diagnostics buffer of a CPU

Where do you read out the diagnostics buffer of a CPU?

You read out the diagnostics buffer of a CPU in the "Diagnostics buffer" group in the "Diagnostics" folder in the Online and Diagnostics view.

Structure of the "Diagnostics buffer" group

The "Diagnostics buffer" group consists of the following areas:

  • "Events"

  • "Settings"

Diagnostics buffer

The diagnostics buffer is used as a log file for the diagnostics events that occurred on the CPU and the modules assigned to it. These are entered in the order of their occurrence, with the latest event shown at the top.

"Events" area

The "Events" area consists of the following elements:

  • Check box "CPU time stamp takes into account local PG/PC time"

  • "Filter" text box

  • Event table

  • "Freeze display" or "Cancel freeze" button

  • Details of the event: Event no., event ID, module and possibly station or device name, rack/slot, description, help on the event, plant designation, location identifier, coming/going information, event type

  • "Open in editor", "Save as" buttons

Check box "CPU time stamp takes into account local PG/PC time"

If you have not activated the check box, the diagnostics buffer entries are shown with the module time.

If you have activated the check box, the diagnostics buffer entries are shown with the time given by the following formula:

Displayed time = module time + time zone offset on your programming device / PC

This requires the module time to be identical to UTC.

You should use this setting if you wish to see the times of the diagnostics buffer entries for the module expressed in the local time of your programming device / PC.

Selecting or clearing the check box immediately changes the times displayed for the diagnostics buffer entries.

Note

If you use the "WR_SYS_T" instruction in your program or if you set the real-time clock of the CPU using an HMI device instead of using UTC, we recommend that you clear the "CPU time stamp takes into account local PG/PC time" check box. In this case, the module time is the sole time of concern.

"Filter" text box

The diagnostics events displayed in the event table can be filtered using the text input. This makes it easier to find specific events.

Event table

The following information is displayed in the table for each diagnostics event:

  • Sequential number of the entry

    The first entry contains the latest event.

  • Date and time of the diagnostics event

    If no date and time are shown, the module has no integrated clock.

  • Short name of the event and, if applicable, the reaction of the CPU

    Note

    If an individual parameter of a text cannot be determined, the character string "###" is shown in its place.

    If no display text is yet available for new modules or new events, the numbers of the events and the individual parameters are stated as hexadecimal values.

  • Only for S7-1200 and S7-1500 CPUs: Icon for the event type

    The following table shows the available icons and their meaning.

Icon

Meaning

OK (no maintenance and/or no fault)

Maintenance required

Maintenance demanded

Error

  • Icon for information related to incoming/outgoing status

    The following table shows the available icons and their meaning.

Icon

Meaning

Incoming event

Outgoing event

Incoming event to which there is no independent outgoing event

User-defined diagnostics event

You can change the order of the columns, adjust the column widths and remove and add individual columns in the event table. In addition, you can sort as follows: by sequential number, by "Date and time" and by "Event".

"Freeze display" or "Cancel freeze" button

The "Freeze display" or "Cancel freeze" button is only enabled when there is an online connection to the CPU.

The default setting is "Freeze display".

The following happens when you click the "Freeze display" button:

  • The current display of the diagnostics buffer entries is frozen.

  • The labeling of the button changes to "Cancel freeze".

If an error has occurred in your system, diagnostics events can occur very quickly in succession. This produces a high update rate on the display. Freezing the display allows you to calmly examine the situation in more detail.

If the display is frozen and you click the "Cancel freeze" button, the following happens:

  • The display of the diagnostics buffer entries is updated again.

  • The labeling of the button changes to "Freeze display".

Note

If you freeze the diagnostics buffer display, the CPU continues to enter events in the diagnostics buffer.

Details of the event

If you select a line in the list of events, you obtain detailed information on the respective event:

  • Sequential number of the event in the diagnostics buffer

  • Event ID

  • Module and, if applicable, station or device name

  • Rack/slot

  • Description of the event with event-specific additional information. Examples of this additional information:

    • Command that caused the event

    • Operating mode switch caused by the diagnostics event

  • Help on the event: The selected event is explained in more detail and possible solutions may be specified. With outgoing events, the text "Outgoing event: "No user action required" is displayed.

  • Only for S7-1200 and S7-1500 CPUs: Plant designation, location identifier

  • Information on whether the event is an incoming or outgoing event

  • Type of event. The following types of event are possible:

    • OK (no maintenance and/or no fault)

    • Maintenance required

    • Maintenance demanded

    • Error

"Open in editor" button

The following table shows if the "Open block" button is active and which function it conceals.

When is the "Open in editor" button enabled?

What happens when you click this button?

If the diagnostics event references the relative address of a block.

This is the address of the command that caused the event.

The "Open in editor" function opens the referenced block in the offline view at the programming instruction that causes the error. This allows you to check and, if necessary, change the source code of the block at the specified place and then download it again to the CPU.

If the diagnostics event was triggered by a module.

The "Open in editor" function opens the Device view of the module involved.

"Save as ..." button

If you click this button, the content of the diagnostics buffer is saved in a text file. "Diagnostics", depending on the language, with the extension ".txt" is suggested as the file name. You can however change this name.

"Settings" area

The "Settings" area consists of the following elements:

  • "Display events" list

  • "Apply settings as default" button

  • "Output event information in hexadecimal format" check box

List "Display events:"

There is an check box in this list for every event class (default setting: all check boxes are selected). If you clear a check box, the events of that event class is no longer displayed in the "Events" area. Reselecting the check box displays the associated events once again.

"Apply settings as default" button

If you click this button, the settings are also applied to future occasions when the "Events" tab is opened.

"Output event information in hexadecimal format" check box

If you select the check box, the event IDs in the Events list of the "Events" area is displayed in hexadecimal format. If you clear the check box, the event information is given in text form.