Implementing System Diagnostics for Fault-Tolerant S7-400H Controllers in SIMATIC PCS 7 - HCPUDIAG and WinCC Integration

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

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:

  1. Instantiation and Call Cycle:
    - Place FB 432 in a CFC chart dedicated to system health (e.g. SysDiag).
    - Assign the block to cyclic interrupt organization block OB32 (1000 ms) or OB35 (100 ms). Because hardware diagnostics query system status lists, a 1-second execution cycle (OB32) minimizes controller communication overhead.
    - Assign input RACK_NO or let the block self-discover rack addressing via the hardware catalog configuration.

  2. 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.

  3. OS Compilation Attribute:
    - Ensure the block attribute S7_m_c := 'true' is active on all necessary diagnostic status outputs.
    - When Compile OS executes, WinCC creates the corresponding @HCPUDIAG structure 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:

  1. Importing Diagnostic Faceplates:
    - Copy the diagnostic picture files (@pg_HCPUDIAG.pdl, @fp_HCPUDIAG.pdl, and overview screen @system diagnostic.pdl or @SysDiag.pdl) from the System Diagnostics Library installation directory into the WinCC project directory GraCS.
    - Open WinCC Graphics Designer on the Engineering Station.

  2. 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 the FB 432 CFC instance.

  3. 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, REDF flashes and SOLO_MODE illuminates 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:

Architectural FeatureSystem Diagnostics Library (FB 432 / FB 433)PCS 7 Maintenance Station (MS Standard / PDM)Primary ScopeRedundant S7-400H CPU rack & optical sync statusPlant-wide asset management (AS, OS, Fieldbuses, I/O, Drives, PDM)Licensing RequirementBundled library or low-cost add-on packageDedicated MS Single Station / Client / Server PO runtime licensesEngineering EffortManual placement of CFC blocks and GraCS PDL linking100% automated via Plant Hierarchy and 'Create Diagnostics Screens'Supported Hardware ScopeS7-400H CPUs, CP modules, primary bus nodesTransmitters, valve positioners, remote I/O racks, network switchesHMI Screen HierarchyEmbedded in operator process graphic PDLsDedicated Maintenance Area Overview and hierarchical diagnostic treeOS Compilation BehaviorGenerates standard WinCC structure tags and alarmsAutomatically compiles MS picture tree and diagnostic server tagsMaintenance WorkflowsVisual LED state monitoring and operator alarmsMaintenance state transitions (In Progress, Cleared), audit trail, EDD

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

Related Articles

Related Tags

  • PCS7_V7_1
  • S7_400H
  • System_Diagnostics
  • HCPUDIAG
  • WinCC_Graphics
  • Maintenance_Station
  • Redundancy
6 respuestas