Preventing OS Compile from Overwriting Custom Dynamic Dialogs on PCS 7 Block Icons

Preventing OS Compile from Overwriting Custom Dynamic Dialogs on PCS 7 Block Icons

To prevent the PCS 7 OS Compile ('Create/update block icons') function from overwriting custom Dynamic Dialogs and graphical modifications on WinCC block icons, create a custom block icon variant with a unique 'type' property in a user-defined template picture ('@PCS7Typicals_Custom.pdl') rather than editing instantiated icons directly in plant displays. In CFC, configure the technological block's object properties to point to your custom icon index using the 'type' attribute (e.g., 'type:=@MotL/2'). When OS Compile runs, it matches the block to your custom template rather than reverting to Siemens defaults.

Table of Contents

Executive Summary

A perennial challenge in SIMATIC PCS 7 human-machine interface (HMI) engineering occurs when engineers customize block icons directly within process pictures—such as adding dynamic color dialogs, custom visibility scripts, or specialized equipment statuses—only to find that running 'Compile OS' with block icon generation completely overwrites their modifications with standard library templates. This article explains the internal generation mechanics of WinCC @PCS7Typicals and @Template pictures, the hierarchy of template scanning, and how to safely implement custom Dynamic Dialogs that persist through automated OS compilation.

Architecture and Fundamental Mechanics

Block Icon Generation Mechanics and Scanning Hierarchy:

  • The 'Create/Update Block Icons' Mechanism:
  • When 'Create/update block icons' is executed during OS compilation or via Graphics Designer (Options -> Create/update block icons), WinCC scans the CFC chart hierarchy for all blocks with the attribute S7_m_c := 'true'.
  • For each block, it reads the block type (type), tag name (tag), and icon variant index (type:=@MotL/1, /2, etc.).
  • Template Picture Scanning Order:
  • WinCC searches for template icons in project pictures matching the naming convention @PCS7Typicals*.pdl in alphabetical order, followed by @template.pdl.
  • The project-specific template @PCS7Typicals_Custom.pdl takes precedence over standard library templates (e.g., @PCS7TypicalsAPLV9.pdl).
  • Why Direct Picture Modifications are Overwritten:
  • Instantiated block icons in process graphics contain a property called type.
  • During OS Compile, the generator deletes or updates any icon whose parameters do not match the master template in @PCS7Typicals, wiping out hand-crafted Dynamic Dialogs.

Step-by-Step Implementation Procedure

Step-by-Step Procedure to Preserve Custom Dynamic Dialogs:

  1. Create a Project-Specific Template Picture:
    - In WinCC Graphics Designer, open @PCS7TypicalsAPLV9.pdl (or your library's typical picture).
    - Save the picture under a custom name, such as @PCS7Typicals_Custom.pdl.
    - Delete unnecessary icons, leaving only the blocks you wish to customize.
  2. Modify the Custom Block Icon Template:
    - Select the target block icon (e.g., MotL variant 1).
    - In Object Properties, change the type property to a unique identifier, for example @MotL/99.
    - Configure your custom Dynamic Dialog on the required property (e.g., Background Color, flashing states, or auxiliary analog values).
    - Save and close @PCS7Typicals_Custom.pdl.
  3. Assign the Custom Icon Variant in CFC:
    - In SIMATIC Manager, open the CFC chart containing the technological block.
    - Open the block's object properties -> Block Icon.
    - In the 'type' field, enter your custom variant: /99 (or type:=@MotL/99).
  4. Configure OS Compile Parameters:
    - In SIMATIC Manager, right-click the OS -> Compile.
    - If you only want to compile tags and messages without touching existing graphics, uncheck 'Create/update block icons'.
    - If block icon update is checked, WinCC will now fetch your customized icon from @PCS7Typicals_Custom.pdl rather than the default library template.
  5. Protect Individual Icons from Updates (Alternative Method):
    - On any individual block icon already in a picture, set property CreateBlockIcon := 'no' (or UpdateBlockIcon := 0). This instructs the generator to skip this specific icon entirely during compilation.

Verification

To verify icon persistence:
1. In SIMATIC Manager, initiate an OS Compile with 'Create/update block icons' selected.
2. Open Graphics Designer and inspect the modified process graphic.
3. Verify that the custom Dynamic Dialog is still attached to the block icon and that all tag connections evaluate properly in WinCC Runtime.

Limitations and Operational Precautions

Operational precautions:
- Never modify the original @PCS7TypicalsAPLV*.pdl files directly; software updates or library upgrades will overwrite them. Always use custom @PCS7Typicals_*.pdl files.
- Dynamic Dialogs that reference non-existent tags will trigger runtime graphic performance warnings in the WinCC diagnostic log (WinCC_Sys_01.log).
- If migrating to a newer PCS 7 release, custom typical pictures must be upgraded using the PCS 7 OS Project Editor to ensure compatibility with updated faceplate scripts.

Engineer FAQ

Why does OS Compile delete my custom scripts on block icons?

Because OS Compile regenerates block icons by re-copying them from the @PCS7Typicals master template pictures unless configured otherwise.

How can I stop OS Compile from updating a single block icon?

Set the block icon's internal property CreateBlockIcon or Update to 0 / no in WinCC Graphics Designer.

What is the difference between @PCS7Typicals and @template?

@PCS7Typicals contains categorized technological block icons for APL; @template is a legacy file used in older PCS 7 releases.

Can I use C-scripts instead of Dynamic Dialogs on block icons?

Dynamic Dialogs are strongly recommended over C-scripts for block icons because Dynamic Dialogs evaluate through trigger events, whereas C-scripts consume thread pools and hurt picture loading performance.

Where does WinCC look for custom typicals pictures?

In the GraCS directory of the WinCC project, searching all pictures named @PCS7Typicals*.pdl in alphabetical order.

Technical References

Related Articles

Related Tags

  • Block Icons
  • OS Compile
  • Dynamic Dialog
  • @PCS7Typicals
  • Graphics Designer
14 respuestas