Implementing System Diagnostics for Fault-Tolerant S7-400H Controllers in SIMATIC PCS 7 - HCPUDIAG and WinCC Integration
In SIMATIC PCS 7 v7.1 and subsequent releases, monitoring redundant S7-400H hardware states (CPU run/stop, redundancy sync, rack master/reserve, optical sync module health, and battery faults) on WinCC operator stations is achieved either through the native PCS 7 Maintenance Station (MS) architecture or via the specialized System Diagnostics Library (blocks FB 432 HCPUDIAG and FB 433). To visualize CPU LED statuses and redundancy transitions without a full Maintenance Station license, engineers instantiate FB 432 in a cyclic interrupt CFC (typically OB32), compile the OS to generate corresponding WinCC structure tags, and connect the @system diagnostic or custom PDL faceplates using the Dynamic Wizard.
Table of Contents
- Hardware Diagnostics Architecture in S7-400H and PCS 7
- FB 432 HCPUDIAG Functionality and Parameter Mapping
- WinCC Graphics Integration and Dynamic Wizard Linking
- System Diagnostics Library vs Maintenance Station Architecture Table
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Hardware Diagnostics Architecture in S7-400H and PCS 7
In SIMATIC PCS 7 fault-tolerant automation systems (S7-400H), controller availability depends on the continuous operational status of two redundant central processing units (e.g. CPU 414-5H, CPU 416-5H, or CPU 417-5H) interconnected via duplex fiber-optic synchronization submodules. System diagnostics must evaluate:
- Redundancy State: Master CPU vs. Standby/Reserve CPU mode, synchronization progress, and single-mode fallback.
- Hardware Fault Indications: Rack failure, power supply module monitoring, internal memory errors, and backup battery depletion (BATT1F, BATT2F).
- Interface and Sync Submodule Integrity: Optical link errors, bit-error rate degradation, and sync link disconnection (IF1, IF2).
While standard PCS 7 engineering generates asset diagnostic screens automatically when deploying the PCS 7 Maintenance Station (MS), standalone OS installations or legacy architectures (such as PCS 7 v7.1) frequently utilize the dedicated System Diagnostics Library (SysDiagLib). Within this library, function block FB 432 (HCPUDIAG) periodically queries system status lists (SZL / SSL) via system function SFC 51 (RDSYSST) to decode the internal operating state of redundant S7-400H racks and output individual digital status bits for human-machine interface (HMI) visualization.
FB 432 HCPUDIAG Functionality and Parameter Mapping
The FB 432 (HCPUDIAG) block evaluates the redundant pair and provides detailed outputs corresponding to both Rack 0 (Master/Standby) and Rack 1:
-
Instantiation and Call Cycle:
- PlaceFB 432in a CFC chart dedicated to system health (e.g.SysDiag).
- Assign the block to cyclic interrupt organization blockOB32(1000 ms) orOB35(100 ms). Because hardware diagnostics query system status lists, a 1-second execution cycle (OB32) minimizes controller communication overhead.
- Assign inputRACK_NOor let the block self-discover rack addressing via the hardware catalog configuration. -
Core Output Signals:
-CPU0_RUN/CPU1_RUN: Controller execution state for Rack 0 and Rack 1.
-CPU0_STOP/CPU1_STOP: Controller halt state.
-REDUNDANT: High when both sub-CPUs operate in redundant coupled mode.
-SOLO_MODE: High when redundancy is broken and the automation system operates on a single CPU.
-SYNC_ERR: Optical synchronization module failure or link loss.
-BATT_FLT: Backup battery failure on power supply modules.
-EXT_FLT: External peripheral fault or bus interruption. -
OS Compilation Attribute:
- Ensure the block attributeS7_m_c := 'true'is active on all necessary diagnostic status outputs.
- When Compile OS executes, WinCC creates the corresponding@HCPUDIAGstructure tags containing the bitmask for front-panel LED visualization.
WinCC Graphics Integration and Dynamic Wizard Linking
To display hardware diagnostics in WinCC Graphics Designer without developing custom C-scripts:
-
Importing Diagnostic Faceplates:
- Copy the diagnostic picture files (@pg_HCPUDIAG.pdl,@fp_HCPUDIAG.pdl, and overview screen@system diagnostic.pdlor@SysDiag.pdl) from the System Diagnostics Library installation directory into the WinCC project directoryGraCS.
- Open WinCC Graphics Designer on the Engineering Station. -
Placing Diagnostic Icons:
- Open@system diagnostic.pdl. The pre-engineered template provides graphic objects representing S7-400H CPU faceplates, complete with LED bitmaps (RUN, STOP, REDF, MSTR, RACKF, IF1, IF2, BATTF).
- Select the CPU diagnostic graphic object.
- Open the Dynamic Wizard palette, navigate to the Standard Dynamics or PCS 7 Diagnostic Wizards tab, and double-click Connect Block Icon to Instance DB (or Connect Picture Window to Tag).
- In the wizard dialog, browse the WinCC Tag Management database and select the structure tag generated by the OS compilation for theFB 432CFC instance. -
Linking Status Words to Graphic LEDs:
- The Dynamic Wizard binds the status DWORD outputs of the block (Status1,Status2) to the dynamic bitmasks of the graphic LEDs.
- In WinCC Runtime, when an optical sync cable is unplugged,REDFflashes andSOLO_MODEilluminates instantly on the OS screen.
System Diagnostics Library vs Maintenance Station Architecture Table
The following table compares direct system diagnostics via FB 432 against the native PCS 7 Maintenance Station:
Verification
To verify that S7-400H hardware diagnostics function correctly in WinCC:
1. Open the CFC chart containing FB 432 (HCPUDIAG) in test mode and observe output REDUNDANT = TRUE and SOLO_MODE = FALSE.
2. Open WinCC Runtime on the OS client or OS Single Station and navigate to @system diagnostic.pdl. Confirm that both CPU 0 and CPU 1 mimic the physical front-panel LEDs (both RUN LEDs solid green).
3. Perform a controlled hardware redundancy test: safely disconnect one fiber-optic synchronization cable from submodule IF1 on Rack 1.
4. Verify that:
- The OS alarm banner immediately logs an alarm: AS Redundancy Lost - Single Mode Active.
- The graphic representation on @system diagnostic.pdl updates: the REDF LED lights up red, SOLO_MODE activates, and the disconnected sync submodule displays a broken link icon.
5. Reconnect the fiber-optic cable and confirm that redundant coupling recovers automatically and diagnostic screens return to normal operating status.
Limitations and Operational Precautions
When deploying custom system diagnostics blocks in SIMATIC PCS 7:
1. CPU Communication Overhead: Do not call FB 432 in fast cyclic interrupt OBs (e.g. OB35 100 ms or OB34 200 ms). Reading system status lists via SFC 51 executes asynchronously and consumes AS communication resources. Restrict diagnostics to OB32 (1000 ms) or slower.
2. Library Compatibility: Ensure the System Diagnostics Library version matches the installed PCS 7 service pack. Applying older library blocks (e.g. from PCS 7 v6.1) to PCS 7 v7.1 or v8.0 can trigger OS compiler structure discrepancies.
3. Dual Maintenance Station Conflict: If a PCS 7 Maintenance Station is subsequently generated for the project, do not duplicate diagnostic alarms between the MS system and custom HCPUDIAG CFC instances, as this creates duplicate alarm entries and saturates the WinCC Alarm Logging database.
Engineer FAQ
Can FB 432 HCPUDIAG be used with standard non-redundant S7-400 CPUs?
No. FB 432 is specifically engineered to parse redundant system status lists (SZL x071 and x074) unique to S7-400H controllers. For standard simplex CPUs (e.g. CPU 414-3 or CPU 416-3), use the standard CPU diagnostic block FB 433 (CPUDIAG) or the standard APL diagnostic drivers.
Why are diagnostic LEDs in WinCC gray or inactive even after OS compilation?
This occurs if the Dynamic Wizard failed to establish the TagPrefix or if the @pg_HCPUDIAG.pdl picture files were not copied into the OS project's GraCS folder. Ensure picture files are located in <Project_Dir>\wincproj\<OS_Name>\GraCS and verify that the structure tag prefix matches the CFC chart and block instance name exactly.
Does FB 432 monitor distributed ET 200M remote I/O rack failures?
FB 432 focuses strictly on central rack S7-400H CPU and power supply states. Distributed I/O modules, PROFINET ET 200SP nodes, and PROFIBUS DP slaves are monitored by standard PCS 7 channel drivers (e.g., MOD_CP, MOD_HA, OR_M_16) and reported via OB86/OB82 diagnostic blocks.
Is a separate Siemens license required to use the System Diagnostics Library?
The System Diagnostics Library was historically distributed as an application tool via Siemens Industry Online Support (SIOS) or bundled with specific industry packages. However, standard PCS 7 Maintenance Station deployment requires runtime and engineering PO licensing. Always consult Siemens CA 01 catalog guidelines.
Technical References
- SIMATIC PCS 7 Fault-Tolerant Process Control Systems (V7.1 / V8.2) - System Manual
- SIMATIC S7-400H Fault-Tolerant Systems System Manual - Siemens Industry Online Support
- SIMATIC PCS 7 Maintenance Station Engineering and Operating Manual
- SIMATIC System Diagnostics Library SysDiagLib User Documentation
Related Articles
- Configuring Fault-Tolerant Named Connections Between PCS 7 WinCC and External S7-400H Controllers Across Separate Projects
- Evaluating PROFINET System Redundancy (S2) and Power Supply Architectures for ET 200M in SIMATIC PCS 7
- Decoupling Uninstalled PROFIBUS Slaves in SIMATIC PCS 7 Using SFC 12 D_ACT_DP
Related Tags
- PCS7_V7_1
- S7_400H
- System_Diagnostics
- HCPUDIAG
- WinCC_Graphics
- Maintenance_Station
- Redundancy