Deploying the SIMATIC PCS 7 System Diagnostics Library - Integrating HCP_DIAG, DP_DIAG, and PN_DIAG Blocks

Deploying the SIMATIC PCS 7 System Diagnostics Library - Integrating HCP_DIAG, DP_DIAG, and PN_DIAG Blocks

In SIMATIC PCS 7 (v7.1 and subsequent releases), detailed hardware asset monitoring without deploying a complete PCS 7 Maintenance Station is implemented using the System Diagnostics Library (SysDiagLib). The library provides specialized function blocks: HCP_DIAG (FB 432) for redundant S7-400H racks, DP_DIAG (FB 434) for PROFIBUS DP master systems and slaves, and PN_DIAG (FB 435) for PROFINET IO controllers and field devices. By placing these blocks in cyclic CFC charts and linking their instance data blocks to pre-engineered GraCS picture templates (@system diagnostic.pdl) via the Dynamic Wizard, engineers achieve high-resolution hardware diagnostic faceplates and front-panel LED visualization.

Table of Contents

Overview of the SIMATIC PCS 7 System Diagnostics Library

While modern SIMATIC PCS 7 installations leverage the fully integrated PCS 7 Maintenance Station (MS) to generate hierarchical plant asset screens automatically, many standalone architectures or budget-conscious plants deploy the System Diagnostics Library (SysDiagLib):
- Core Purpose: Provides pre-engineered CFC blocks and WinCC faceplates that interrogate controller system status lists (SZL) via system function SFC 51 (RDSYSST) and process interrupt organization blocks (OB82, OB83, OB86).
- High Visual Granularity: The library includes photorealistic WinCC graphics replicating the physical front fascia of S7-400 CPUs, CP communications processors, and ET 200 interface modules, complete with dynamic LED animations (RUN, STOP, REDF, INTF, EXTF, BUSF).
- Lightweight Footprint: Unlike the full Maintenance Station, which requires dedicated MS Single Station or Client/Server PO runtime licenses, the System Diagnostics Library operates within standard WinCC OS runtime tags.

Core Diagnostic Function Blocks - HCP_DIAG, DP_DIAG, and PN_DIAG

The library organizes hardware monitoring across three primary subsystem types:

  1. HCP_DIAG (FB 432) - Fault-Tolerant CPU Diagnostics:
    - Queries redundant S7-400H status lists (SZL W#16#0071 and W#16#0232).
    - Evaluates primary master vs standby status, optical synchronization submodule health, memory battery status, and rack power supply failure.
    - Assign to cyclic interrupt OB32 (1000 ms).

  2. DP_DIAG (FB 434) - PROFIBUS DP Master and Slave Diagnostics:
    - Monitors the health of PROFIBUS DP lines connected to internal CPU DP ports or external CP 443-5 Extended processors.
    - Evaluates slave station presence (SZL W#16#0091), bus communication errors, module pull/plug events (OB83), and channel-specific diagnostic alarms (OB82).
    - Generates station-level bitmasks indicating which slave address on the DP line has faulted.

  3. PN_DIAG (FB 435) - PROFINET IO Controller and Device Diagnostics:
    - Monitors PROFINET IO subnets connected to integrated PN ports (e.g. CPU 410-5H or CPU 416-3 PN) or CP 443-1.
    - Tracks IO device reachability, PROFINET System Redundancy (S2) ring status, Media Redundancy Protocol (MRP) topology errors, and port-level link status.

WinCC Graphics Integration and Dynamic Wizard Linking

To connect library blocks to WinCC operator pictures:

  1. Importing Graphic Templates:
    - Copy the library picture templates from the installation directory into the OS project's GraCS directory:

    • @system diagnostic.pdl (Overview container screen)
    • @pg_HCP_DIAG.pdl / @fp_HCP_DIAG.pdl (CPU faceplate and popup)
    • @pg_DP_DIAG.pdl / @fp_DP_DIAG.pdl (PROFIBUS DP overview and station faceplates)
    • @pg_PN_DIAG.pdl / @fp_PN_DIAG.pdl (PROFINET IO overview faceplates)
  2. Linking with Dynamic Wizard:
    - Open Graphics Designer and open @system diagnostic.pdl.
    - Select the target diagnostic graphic object (e.g. the CPU rack representation).
    - In the Dynamic Wizard window, open the Standard Dynamics tab and double-click Connect Block Icon to Instance DB.
    - In the prompt, browse the WinCC Tag Management database and select the structure tag generated by the OS compilation for the corresponding HCP_DIAG or DP_DIAG block instance.
    - The wizard binds the internal DWORD status tags (Status1, Status2) to the dynamic bitmasks of the graphic LEDs.

  3. Navigation Integration:
    - Add a navigation button on the WinCC Area Overview picture with an OpenPicture C-script pointing to @system diagnostic.pdl.

SysDiagLib vs Native PCS 7 Maintenance Station Comparison Table

The following table compares the System Diagnostics Library with the native PCS 7 Maintenance Station:

Engineering ParameterSystem Diagnostics Library (SysDiagLib)PCS 7 Maintenance Station (MS Standard)Underlying Function BlocksHCP_DIAG (FB 432), DP_DIAG (FB 434), PN_DIAG (FB 435)Native PCS 7 Driver Library (MOD_ and OR_M_ blocks)Licensing RequirementsStandard WinCC RT Tags (Low cost / Free tool)Dedicated MS Runtime PO & MS Engineering LicensesHierarchy GenerationManual placement in CFC charts and GraCS screensFully automated generation via Plant HierarchyAsset DepthCentral racks, DP slaves, and PN devicesAS, OS, Switches, Field Devices via EDD / PDMDiagnostic VisualizationPhotorealistic hardware front-panel LED mimicsStandardized VDI/VDE 2650 NAMUR NE 107 iconsMaintenance WorkflowsAlarm display and visual statusFull asset state tracking, passivating, and work order logging

Verification

To confirm that the System Diagnostics Library blocks are properly operating:
1. Open the CFC chart containing HCP_DIAG, DP_DIAG, and PN_DIAG in test mode. Verify that block outputs reflect healthy states (e.g., BUS_FLT = FALSE, REDUNDANT = TRUE).
2. Open WinCC Runtime and navigate to @system diagnostic.pdl.
3. Confirm that the photorealistic CPU and interface module graphics render with solid green RUN LEDs and dark fault LEDs.
4. Simulate a fault on a test rack:
- Disconnect a PROFIBUS DP connector from an ET 200M slave.
- Observe that DP_DIAG detects the station failure immediately.
- Verify that the WinCC graphic updates: the affected slave icon turns red and the CPU BUSF LED begins flashing.
5. Reconnect the cable and verify that the graphic returns to normal operating status.

Limitations and Operational Precautions

When deploying the System Diagnostics Library in PCS 7:
1. CPU Memory Footprint: In systems with large numbers of fieldbus devices, instantiating DP_DIAG and PN_DIAG blocks for dozens of subnets consumes significant S7-400 work memory and communication buffers.
2. Execution Cycle Optimization: Restrict all diagnostic query blocks to slow execution cycles (OB32 1000 ms or OB31 2000 ms). Calling SFC 51 asynchronously in fast OBs will saturate the controller communication stack.
3. NAMUR NE 107 Non-Compliance: SysDiagLib displays raw hardware states (LEDs, bus faults). Unlike the PCS 7 Maintenance Station, it does not categorize alarms according to NAMUR NE 107 status signals (Failure, Function Check, Out of Specification, Maintenance Required).

Engineer FAQ

Where can I obtain the System Diagnostics Library installation files?

The System Diagnostics Library was released as an application tool via Siemens Industry Online Support (SIOS) under entry ID 22727527 or provided by Siemens technical support. It is not bundled by default on standard PCS 7 DVDs.

Can HCP_DIAG and DP_DIAG coexist with standard PCS 7 APL channel drivers?

Yes. SysDiagLib operates independently in user CFC charts. Standard APL channel drivers (such as FbAnIn or FbDiIn) continue monitoring process I/O in parallel without interference.

How does PN_DIAG detect a severed PROFINET ring?

PN_DIAG queries the Media Redundancy Protocol (MRP) status list in the PROFINET IO controller. When a ring break occurs, the redundancy manager reports open ring status, which PN_DIAG translates into an operator alarm.

Does the System Diagnostics Library support S7-410-5H controllers?

While originally designed for S7-400H (v7.1), the blocks can be compiled into CPU 410-5H projects. However, CPU 410-5H architectures strongly favor the native PCS 7 Maintenance Station for comprehensive system diagnostics.

Technical References

Related Articles

Related Tags

  • PCS7_V7_1
  • System_Diagnostics
  • SysDiagLib
  • HCP_DIAG
  • DP_DIAG
  • PN_DIAG
  • WinCC_Graphics
  • Maintenance_Station
6 respuestas