Configuring S7-300/400 Hardware Diagnostics in WinCC via STEP 7
Hardware diagnostics on a SIMATIC S7-300/S7-400 station is the foundation of any maintenance strategy. When an ET 200S slave drops off Profibus, an SM 321 DI module fails, or a rack power supply enters a fault, the PLC detects the event and the HMI must surface the message in operator-readable language. Siemens' standard mechanism for this on legacy S7-300/400 systems is the Report System Error (RSE) function in STEP 7 V5.x, paired with WinCC as the HMI/SCADA layer. This article provides the engineer-level procedure, the underlying OBs/SFBs/SFCs, the WinCC tag and alarm wiring, and a field-tested verification workflow.
1. Diagnostic Information Flow Overview
Before configuring, understand the data path:
- An I/O module or DP slave enters a fault state and writes a diagnostic record to its local diagnostic buffer.
- The CPU's diagnostic OB (OB82, OB83, OB84, OB85, OB86, OB87, OB121, OB122) is triggered. RSE installs a centralized
FB 192withSFB 192-style behaviour that reads the diagnostic info usingSFC 13 (DP_TOPOL)/SFC 51 (RDSYSST)/SFB 54 (RALRM). - RSE generates one standardized bit per slot (the "module status" bit) and writes a structured text block describing the error to a configured DB.
- WinCC reads the status bits via the integrated project connection (no separate driver required) and displays the text block on the Alarm Logging view.
| Layer | Component | Function |
|---|---|---|
| Physical | ET 200S, SM modules | Build diagnostic record (channel-level) |
| CPU | OB82/83/84/85/86/87/121/122 | Triggered on diagnostic events |
| RSE function | FB 192 (system-supplied) | Collects, formats, and stores diagnostics |
| AS-OS data block | DB 192 (default) | Bit per slot + structured text buffer |
| WinCC | Alarm Logging, internal tags | Displays the alarm text; tags split the alarm source |
2. Prerequisites
Verify the following before opening the Hardware Catalog:
| Item | Requirement | Notes |
|---|---|---|
| STEP 7 | V5.5 SP4 or later | Older V5.4 works, but V5.5+ is recommended for full TIA migration support |
| WinCC | V7.0 SP3 or later (Flexible 2008 SP2 for Panel) | For Panel (Comfort/Comfort Panel), use WinCC Flexible 2008 SP2 with the same RSE mechanism |
| Project integration | "Integrate WinCC into STEP 7 project" option enabled | Right-click SIMATIC station → "Integrate WinCC Application…" |
| CPU | S7-300 (CPU 31x) or S7-400 (CPU 41x) with firmware ≥ required for diagnostic OBs | Refer to Siemens FAQ 22727527 |
| Hardware catalog | Updated HW catalog with installed modules (HSP update if needed) | Missing HSPs cause modules to be treated as unsupported → no diagnostic block generated |
| Profinet/Profibus | Diagnostic-capable slaves (must support channel-level diagnostics) | ET 200S, ET 200M, ET 200Pro, IM 153/154, IM 151-1 High Feature, etc. |
3. STEP 7 V5.x Project Configuration
3.1 Open the Diagnostic Wizard
- In SIMATIC Manager, select the S7 program node of your station (e.g.
S7-400 / CPU 414-3). - Right-click → Special Object Properties → Report System Error…
- The Report System Error dialog appears. Enable "Activate Report System Error" with a checkmark.
3.2 Configure the AS-OS Interface
RSE writes status bits and message text into a single DB. By convention Siemens uses DB 192 (AS-OS data block), but any unused DB number works.
| Parameter | Recommended Value | Effect |
|---|---|---|
| DB number for status bits | 192 | WinCC polls this DB for the alarm trigger bit |
| DB number for message texts | 193 (auto-generated) | Contains the STRING buffer per slot |
| FB 192 instance DB | 194 (auto) | Background data for the central diagnostic FB |
| OB priority | Default (OB1 priority mapping) | Adjust if you need cyclic polling vs. event-driven |
| Send acknowledgment | Disabled for HMI; Enabled for WinCC ACK buttons | Enables operator ACK from the panel |
| Language | English + German, or single-language | Generated text DBs are language-switched via WinCC |
Click Generate. STEP 7 will insert:
- FB 192 with instance DB 194 — the central RSE block (installed in OB1, OB82, OB86, etc., as required)
- DB 192 — 1 bit per module slot, used by WinCC as a "coming/going" trigger
- DB 193 — STRING array, one entry per slot, containing the localized alarm text
- Text libraries in the project (German + English), with a user-editable comment field for custom messages
4. WinCC Configuration
4.1 Integrated Project Connection
When the WinCC project is integrated into the STEP 7 project (right-click → "Integrate WinCC Application"), the tag and alarm configuration is automated:
- Open the WinCC Explorer. Switch to Tag Management.
- Under SIMATIC S7 PROTOCOL SUITE → TCP/IP (or named connection), the system auto-creates the connection.
- Open Alarm Logging. You will see a populated message class (default: "System") with the generated RSE messages for every slot in the project.
4.2 Internal Tags for Splitting the Alarm Source
The message text references @(slot) placeholders. To filter, sort, or display per-rack/per-station alarms, add internal tags in WinCC:
| Internal Tag | Data Type | Source | Purpose |
|---|---|---|---|
FaultModuleNumber |
Word | WinCC tag, polled from DB192 bit index | Identifies which module triggered the alarm |
FaultRackNumber |
Byte | Computed in WinCC script from FaultModuleNumber | Used to filter by physical rack (0, 1, 2…) |
FaultSlot |
Byte | Bit offset in DB192 byte | Slot number in the rack |
FaultSubmodule |
Byte | Channel-level | Submodule index for ET 200S |
AlarmState |
Bool | Triggered by incoming/outgoing edge of any DB192 bit | Used in Global Script to refresh the alarm view |
4.3 Alarm View Customization
In the WinCC AlarmControl, ensure these columns are visible: Date, Time, Status, Tag (Comment), Message text, Acknowledgment. The "Tag (Comment)" field is automatically populated with the affected slot's text from DB193, which provides operator-friendly text like:
Rack 0 / Slot 4 / DI16xDC24V: Channel 3 — wire break detected
5. System Diagnostics OCX and Library Blocks (Alternative Path)
Where RSE does not provide sufficient detail — for example, custom cyclic polling of SZL 0x0131 (module status) or SZL 0x0192 (rack/station failure) — engineers use the System Diagnostics package:
| Component | Description | Catalog / Part No. |
|---|---|---|
| "S7CPUDiag.ocx" | WinCC ActiveX control that visualizes the entire station topology with live status | Distributed with S7CPUDiag package (free download) |
| "S7DS_xx.exe" | STEP 7 V5.x library containing FBs for partial and full diagnostics reads | STEP 7 add-on, installable as HSP |
| FB 126, FB 127, FB 128 | Background FBs from the library for read operations on SSL lists | Provided by the library |
The S7CPUDiag OCX is configured on a WinCC picture, pointed at the connection, and it automatically discovers the rack layout. Each module is drawn as an icon; the icon changes color (green/yellow/red) based on the live state. Clicking the icon opens a details window with the full diagnostic text, channel information, and last error code.
SFB 52 (RDREC) over older SFC 51 (RDSYSST) on Profinet; SFB 52 is record-based and supports Profinet slot-level diagnostics up to record index 0x8000..0xFFFF.6. Available System Status Lists (SSL) and Their Use
RSE internally calls SFC 51 (or SFC 13 for DP). For advanced use, the following partial lists are most relevant:
| SSL ID | Name | Use |
|---|---|---|
| W#16#0x0131 | Module status of all modules | Bit 0/1/2/3 = module OK / error / maintenance required / maintenance demanded |
| W#16#0x0192 | Status of distributed stations (DP master) | Per-DP-slave fault bit |
| W#16#0x0092 | Status of central racks | Per-rack availability |
| 0x00A0 | Diagnostic buffer of the CPU (last 10 entries) | Read with SFC 59 (RD_REC) on diagnostic ID 0xA0 |
| 0x00B1 / 0x00B2 / 0x00B3 | Module diagnostic records (channel level) | Read with SFC 59 from the affected slot's address |
7. STEP 7 Diagnostic OBs — When They Fire and Why They Matter
| OB | Triggered by | Default without RSE | With RSE |
|---|---|---|---|
| OB 82 | Module diagnostic interrupt (channel fault, wire break, etc.) | CPU goes STOP if OB82 missing | RSE reads the diagnostic record and updates the slot text |
| OB 83 | Plug / pull event (module inserted or removed) | CPU goes STOP if OB83 missing | RSE updates the slot status to "not present" |
| OB 84 | CPU redundancy change (S7-400H) | CPU goes STOP if OB84 missing | RSE logs the master/reserve transition |
| OB 85 | OB not found (you call a nonexistent OB, or I/O access error) | CPU goes STOP if OB85 missing | RSE logs the error and the CPU continues |
| OB 86 | Rack failure (central or distributed) | CPU goes STOP if OB86 missing | RSE marks the entire rack as faulted |
| OB 87 | Communication error (timeout on S7 connection) | CPU goes STOP if OB87 missing | RSE logs the connection loss |
| OB 121 | Programming error (illegal instruction, DB access violation) | CPU goes STOP if OB121 missing | RSE records the error code and address |
| OB 122 | I/O access error (read a failed module) | CPU goes STOP if OB122 missing | RSE records the I/O address and slot |
You can verify which diagnostic OBs are loaded with the CPU Properties → Diagnostics/Clock tab in STEP 7, or in the online "CPU → Module Information → OB List".
8. TIA Portal Alternative for S7-1200 / S7-1500 / S7-300/400 with TIA
When the same problem is solved on TIA Portal (V13+), the equivalent of RSE is the integrated System Diagnostics option. It is selected on the CPU's "Properties → System Diagnostics" tab and writes directly into the WinCC (TIA) alarm subsystem. Differences from legacy RSE:
- No separate FB 192 — the CPU firmware provides the diagnostic data natively.
- WinCC (TIA) consumes the alarms through the standard "System Diagnostics" view control — no OCX needed.
- Profinet diagnostics are first-class and reach channel level automatically.
- No manual AS-OS DB wiring required — WinCC reads the alarms via the integrated connection.
For mixed installations (an S7-400 still on STEP 7 V5.x communicating with a TIA-portal S7-1500 in the same WinCC), the legacy RSE path remains the only option for the V5.x portion. The two alarm streams can coexist in a single WinCC alarm view by configuring separate message classes and tag prefixes.
9. Field-Proven Commissioning Procedure
- Compile and download the STEP 7 program with RSE generated. Confirm in the SIMATIC Manager dialog "Download to Target System" that OB82, OB83, OB85, OB86, OB87, OB121, OB122 are all loaded (not the default empty version). For S7-300 they are optional; for S7-400 at least OB82, OB86, OB121, OB122 should be present even if RSE is not used.
- Force a fault in a controlled way to verify the path: open the HW Config, place a "Module"/"Submodule" in fault state using the online menu "Online → Module Information → Operating Mode" or pull an ET 200S DO module's connector briefly.
- Watch the CPU diagnostic buffer (Online → CPU → Diagnostic Buffer). You should see two entries: the raw event (with OB number and diagnostic ID) and a second one from RSE indicating the alarm was generated.
- On the HMI, the corresponding message appears in the Alarm Control within the configured scan cycle (default 1 s, configurable via
UpdateCyclein the alarm logging settings). - ACK flow: press the operator ACK button. WinCC writes an acknowledgment bit to the same DB 192, and RSE's SFB 192 ACK path clears the slot bit once the fault is also gone.
10. Troubleshooting Matrix
| Symptom | Probable Cause | Diagnostic Step | Resolution |
|---|---|---|---|
| No alarms appear in WinCC | WinCC project not integrated with STEP 7 | Check: Simatic Manager → Options → WinCC → Projectintegrator
|
Re-integrate WinCC; regenerate the connection |
| Alarms appear but text is empty | DB 193 not generated (custom text file corrupted) | Re-run Report System Error wizard, "Regenerate" | Regenerate and re-download |
| Wire-break on DO module not flagged | Module is not configured for "Diagnostics enabled" | HW Config → Module properties → Diagnostics tab | Enable channel-level diagnostics on the offending slot |
| WinCC connection "Disconnected" after PLC restart | Default startup is delaying S7 connection establishment | Check WinCC startup list; PLC must have finished OB100 first | Add 5 s delay to WinCC startup tasks |
| Alarms appear but cannot be acknowledged | "Send acknowledgment" disabled in RSE wizard | Edit RSE configuration, enable ACK | Regenerate, re-download |
| CPU goes STOP on module pull | OB 83 missing or empty | CPU properties → Diagnostics | Insert OB 83 (RSE inserts it automatically if you have "Degraded operation" enabled) |
| Rack-failure alarm is logged as "Unknown module" | Module not present in HW catalog (HSP missing) | Re-install the HSP for the affected module family | Install the correct HSP; re-run the wizard |
| Channel-level details missing on Profinet | SFC 51 used instead of SFB 52 (RDREC) | Inspect the generated FB 192 source | Manually replace SFC 51 calls with SFB 52 for Profinet slots, recompile |
| Alarms from ET 200S show wrong slot | Head module is on slot 0 only; FBs are 1..15 | Verify the slot mapping in DB 192 | Adjust user text comments per the IM 151-1 manual |
11. Verification Checklist
After commissioning, the following must all be true:
- OB 82, OB 83, OB 85, OB 86, OB 87, OB 121, OB 122 are present in the CPU online view.
- DB 192 contains at least one bit per module of the configured station.
- DB 193 is at least the size of the largest expected diagnostic text buffer; the wizard's default of 256 bytes per slot is usually enough.
- WinCC Alarm Control shows the configured message class with no error overlays.
- Operator can ACK the alarm and the state transitions to "ACK gone" once the fault clears.
- CPU diagnostic buffer does not show any "OB not loaded" entries.
12. Migration to TIA — Field Note
If the plant is moving to TIA Portal, you can preserve the existing diagnostics structure: STEP 7 V5.x projects can be migrated with the STEP 7 V5.x → TIA Portal migration tool, which carries RSE-generated blocks and alarm text. After migration, run a "Convert → Standardize" on the migrated TIA project to switch the now-old RSE into the TIA-native System Diagnostics. The message texts in DB 193 are copied to the TIA project as text lists — review and trim duplicates. Always back up the original V5.x project before migration, because DB 193 is partially regenerated and custom text additions may need re-application.
BE as the only instruction) so the CPU stays in RUN during transient faults.Frequently Asked Questions
What STEP 7 version is required to run Report System Error?
Report System Error is available in STEP 7 V5.2 and later; the recommended baseline is V5.5 SP4 (or later SP) for full S7-300/400 compatibility, ET 200S extended diagnostics, and TIA Portal migration safety.
Why does my WinCC show the message text with a "@" symbol in the slot field?
The @ token is a placeholder inserted during the first RSE generation. After the wizard runs once, edit the user text section (right-click the message class → "Properties → User Text") and replace the placeholder with a real identifier. Subsequent regenerations do not overwrite the user text.
Can I use Report System Error with WinCC Flexible on a Comfort Panel?
Yes. WinCC Flexible 2008 SP2 (and later) supports the same STEP 7 integrated project mechanism. The HSE function block and connection setup are identical; the only difference is the panel's limited alarm buffer (typically 1000 messages).
How many alarms can a single S7-400 CPU buffer before older ones roll over?
The CPU diagnostic buffer holds 100 events by default, with the most recent 100 retained in non-volatile storage. WinCC's alarm archive is independent and depends on disk space; the default cycle is one segment per day. Configure AlarmLogPath in the WinCC Alarm Logging settings to set retention.
What is the difference between SFC 51 (RDSYSST) and SFB 52 (RDREC) for diagnostics?
SFC 51 reads full System Status Lists (SSL) — coarse, all modules at once. SFB 52 reads a single diagnostic record from a specific slot — fine-grained, channel-level, required for Profinet. RSE uses SFC 51 for the central rack and SFB 52 for distributed I/O on Profinet.
Is the S7CPUDiag OCX still supported for new projects?
Yes, it remains available for legacy installations. For greenfield S7-1200/1500 projects, Siemens recommends the TIA Portal "System Diagnostics" view control, which supersedes the OCX approach.
My ET 200S shows a slot alarm but no channel detail — why?
Channel-level diagnostics on ET 200S must be enabled per channel group (4-channel grouping on the 4/8 DO modules, 1-channel on newer ones). Open HW Config → Module Properties → Diagnostics and check the "Wire-break", "Short-circuit", and "Load voltage missing" boxes for the desired channels. Without these, the module reports a slot-level fault only.