Retaining Custom Block Icon Changes in PCS7 WinCC OS Compile

David Krause11 min read
HMI / SCADASiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Statement

When a SIMATIC PCS 7 engineer modifies properties on automatically generated block icons in a WinCC picture (label text, position, color, SAFE_ID1, SAFE_ID2, custom prefix/suffix fields, hidden diagnostics, or any non-default attribute), the next execution of Create/Update Block Icons during OS compilation resets those properties back to default values. The block icon regenerates from the CFC (Continuous Function Chart) block schema and overwrites the manually tuned HMI element.

This is one of the most common day-2 complaints on PCS 7 sites that follow the @PCS7typicals picture template pattern but need localized visual deviations from a single block instance (for example, renaming a faceplate caption for an operator-facing label, setting a yellow background for an alarm-class override, or wiring SAFE_ID1 for the S7 F-Systems safety block acknowledgement).

The symptom is not a fault code or a WinCC runtime error. It is silent overwrite. Engineers see it only after a routine OS Compile & Download, typically during a plant change management window, when all of the cosmetic or safety property edits vanish.

Root Cause Analysis

The WinCC OS Compile in PCS 7 runs the compiler wizard Create/Update Block Icons against every WinCC picture contained in the OS area referenced by the S7 program. The compiler regenerates block icon instances by reading:

  1. The CFC block type definition (chart-in-chart instance or shared block library).
  2. The block-icon SymbolLibrary entry shipped in the PCS 7 master data library (@PCS7typicals namespace).
  3. The picture's existing block icon instance DB pointer slot referenced through BlockIconType + BlockIconInstance.

If a picture-level option Create/Update Block Icons is set (the default for the first compile), every block icon on that picture is regenerated as a fresh instance from the library source. The PCS 7 OS Compiler does not compare the runtime picture to the source template — it overwrites properties deterministically. Initialization properties such as SAFE_ID1, SAFE_ID2, Label, Tooltip, BackColor, ProcessTagName, custom Dynamic C-action VB-scripts, and any picture-object Property not serialized in the CFC block type are reset to library defaults.

Engineering impact: Properties added via the dynamic wizard Connect faceplate to process tag prior to PCS 7 V6 are reset on the next compile because the wizard-generated bindings were stored under user-defined Dynamic links, not under the block-icon schema. From PCS 7 V6 SP1 onward, the wizard is not shipped with the standard Dynamic Wizard set in WinCC Explorer; this is by design to force explicit per-instance wiring post-compile.

Architectural Constraints

The PCS 7 design assumes one block icon picture + one CFC chart-in-chart block instance pair. The compiler does not natively support partial preservation of a single block icon inside an otherwise auto-generated picture. There are three compiler states for any given picture:

Picture-level option Behavior What survives
Create (default) Regenerates every block icon in the picture, even pre-existing ones. Nothing — all properties reset to library defaults.
Update Adds new block icons for new CFC instances; refreshes existing ones. Nothing — identical to Create for the icons already present.
None (do not modify) Compiler leaves the picture entirely untouched. All custom changes — but no new icons added either.

The user's requirement — "I want one picture, dozens of auto-generated icons, and one icon with a single custom property preserved" — is therefore not directly supported in the picture-level toggle. The workaround patterns below bridge that gap.

Solution Method A — Per-Block TYPE Override (Recommended)

This is the cleanest field-proven method and is supported from PCS 7 V8.0 onward (also works on V6 SPx / V7 with manual procedure steps).

Procedure

  1. Open the WinCC picture in the Graphics Designer that contains the block icon you need to protect.
  2. Select the block icon instance you want to deviate.
  3. Open the Object Properties dialog (right-click → Properties, or press Enter on a selected object).
  4. Navigate to Properties → Miscellaneous → Block icon TYPE.
  5. Change the TYPE field from the library-default value (for example 1 for a CTRL_PID block) to a free user value (for example 100). Each TYPE number is treated by the OS Compiler as a custom instance variant.
  6. Save the picture.

Once the TYPE field is set to a non-default value, the OS Compiler's Create/Update Block Icons pass no longer overwrites the instance; it skips it because the icon's TYPE is not in its matching set. The CFC block instance link remains valid (the process tag connection survives), but the picture object keeps every property you set.

Why this works: The OS Compiler matches icon candidates by the picture object's BlockIconType attribute. If the attribute is non-standard, the icon is treated as user-modified and is excluded from regeneration. Only new CFC instances without a matching picture icon are added in subsequent compiles.

Verification

  1. Run OS Compile — Complete with Overwrite on the OS server.
  2. Activate the WinCC Runtime and open the picture.
  3. Confirm the protected icon retains the modified property (label, color, safe ID, etc.).
  4. Confirm any newly added CFC blocks still appear (the compile is still adding to the picture).

Solution Method B — Picture Attribute "Do Not Modify"

If the entire WinCC picture must be locked (e.g., a fully hand-tuned overview panel with no auto-generation), use the picture-level attribute in the technical hierarchy of PCS 7 ES.

  1. In SIMATIC Manager / PCS 7 Engineering Station, expand S7 Program → OS → Pictures in the component view.
  2. Right-click the target picture and choose Object Properties.
  3. On the Block Icons tab, clear the checkbox Create/update block icons.
  4. Click OK and save the project.

This sets the picture-level flag that the OS Compiler reads during the block icon regeneration pass. The compiler will skip the picture entirely. Use this when you need absolute protection of an entire picture and you accept that new CFC blocks will not auto-generate icons there.

Attribute Default Effect when cleared
Create/update block icons Checked Compiler skips the picture on OS Compile.
Create/update connections Checked Stops regeneration of dynamic connections.
Generate picture tree Checked Excludes picture from WinCC picture tree navigation.

Solution Method C — Disabling the Wizard Globally for the Compile Pass

For PCS 7 V6 / V7 systems where the dynamic wizard Connect faceplate to process tag was historically used, the same end result is achieved by:

  1. First compile the OS to generate all block icons.
  2. Apply your manual property edits in the Graphics Designer.
  3. For every subsequent OS Compile, open the OS Compile dialog and uncheck Create/update block icons before clicking Compile.
  4. Manually re-apply only the icons for newly added CFC blocks.

This is operationally tedious for plants with frequent CFC changes but it is the only fully supported path on legacy V6 systems where TYPE override behavior differs across service packs.

Solution Method D — Post-Compile Editing with Process Tag Reconnection

If the engineer already lost properties and must restore the icon to its previous tuned state without a fresh OS Compile, follow this recovery procedure.

  1. Open Graphics Designer with the picture open.
  2. Delete the regenerated (default-property) block icon.
  3. From the @PCS7typicals library, drag the master block icon onto the canvas at the saved X/Y position.
  4. Wire the icon to the CFC instance again via Libraries → PCS 7 → Dynamic Wizard → Connect faceplate to process tag (V5.x) or via the manual Dynamic dialog (V6+) where the C-script SetTagMultiStateWait handles the link.
  5. Re-apply custom properties.
  6. Set TYPE to a non-default value (Method A) so future compiles preserve them.

Property Protection Matrix

Property name Default behavior Protection method
SAFE_ID1 / SAFE_ID2 Reset to empty string Type override (Method A)
Label / Tooltip text Reset to block instance name Type override (Method A)
BackColor / ForeColor Reset to system color Type override (Method A)
X / Y position on canvas Reset to library layout Type override (Method A)
Custom Dynamic C-action Replaced with default VB Type override (Method A) or picture lock (Method B)
Process tag (pointer to CFC) Preserved (not in compile delta) Always preserved by default
User-defined attributes Reset to default Type override (Method A)

Pictorial Workflow

Edit CFC block in PCS 7 ES OS Compile (Create/Update Block Icons) Block icons regenerated, custom properties OVERWRITTEN (silent) Set TYPE = custom value on icon Re-run OS Compile TYPE-mismatched icon PRESERVED, new icons added Result of Method A (TYPE override): One protected icon stays in the picture despite full OS Compile. All other (TYPE-default) icons refresh normally.

Version-Specific Notes

PCS 7 version Method A viability Wizard availability Recommended approach
V5.x Not exposed in UI Connect faceplate to process tag shipped Use the wizard after every compile
V6.0 / V6.1 SPx Type field exists; behavior is inconsistent across SPs Wizard removed Combine Method A + Method C
V7.0 / V7.1 Stable, all SPs Wizard not shipped Method A is canonical
V8.0 / V8.1 / V8.2 Stable, fully tested Wizard not shipped Method A, with V8.2 hotfix 02+
V9.0 / V9.1 Stable Not applicable (modern API) Method A; consider Migrating to TIA Portal workflow

Always confirm the exact behavior on the actual installed Service Pack. The TYPE field semantics changed between V6.0 and V7.0; the pattern remains valid but specific values that act as "non-default" differ. A safe choice across all versions is any integer value that is not in the library's internal TYPE table (a value such as 9001 for a CTRL_PID icon is conventionally unused).

Troubleshooting Matrix

Symptom Likely cause Diagnostic step Fix
Properties reset after compile Block icon TYPE still at default library value Open object properties → Type field Set TYPE to a non-default integer (Method A)
Protected icon disappears after compile Picture-level "Create/update" still enabled AND TYPE locked coincidentally matched by an added CFC block Open OS Compile dialog — check per-picture setting Switch to Method B for that picture
Faceplate click does not open Process tag connection lost during icon regeneration Runtime → right-click icon → Properties → Dynamic tab → verify ProcessTag Re-wire process tag via Dynamic Wizard or C-script (Method D)
Compile reports "0 block icons generated" Picture-level attribute "Do not modify" accidentally set on all pictures ES → OS → Pictures → Properties → Block Icons Re-enable Create/update on production pictures
New CFC block has no icon Picture locked via Method B Verify picture compile attribute Manually drag block icon from library
WinCC runtime shows default icon at wrong position TYPE override applied, but new icons placed at library layout coord Inspect X/Y attributes Move icon on canvas after compile

Operational Checklist

  1. Before any OS Compile, snapshot the WinCC picture with custom edits (file copy of *.PDL from the WinCC project folder).
  2. Document each protected icon's Type value in the project's engineering log so operators and other engineers know it is intentional.
  3. Never delete a protected icon during an OS Compile — the compiler will recreate it as a default and TYPE override is lost.
  4. Verify the change in WinCC Runtime, not just in Graphics Designer; some dynamic attributes only render in runtime.
  5. For S7 F-Systems blocks (F-CPU, F-DI/DO), confirm that SAFE_ID1 / SAFE_ID2 attributes are still wired correctly after the compile; safety-related HMI displays have audit-trail implications.

Related WinCC Explorer Settings

The OS Compile dialog is reachable in SIMATIC Manager via OS → Compile → Complete (with Overwrite). The dialog includes per-OS settings that affect the icon regeneration pass:

  • Computer name mapping — controls which ES objects generate icons on which OS pair.
  • Time stamp handling — forces a full or incremental compile.
  • Block icon generation scope — controlled per picture object property or per Picture node in component view.

For larger plants, integrating the TYPE-override list into a project-specific engineering guideline (stored in the project documentation folder or in @PCS7typicals as a readme PDF) avoids the situation where a junior engineer unprotects an icon because they thought a non-default property meant a fault.

When to Escalate

If Method A fails on a specific icon type — for example, custom user block types (UserBlock family) developed in the customer library — escalate to Siemens Industry Online Support with a WinCC project export. The TYPE override semantics for custom block types depend on the library vendor's block-icon declaration in the SymbolLibrary; some user block libraries explicitly override the default TYPE comparison.

Safety warning: When the protected icon is part of an S7 F-Systems or F-CPU safety display path (SIL 1–3), any change to how the icon is regenerated must be reviewed by the plant's safety engineer. Modifying safety HMI properties silently can affect the operator's ability to acknowledge safety events and may have FMEDA implications.

FAQ

Why does Create/Update Block Icons overwrite my SAFE_ID1/SAFE_ID2 values?

The PCS 7 OS Compiler does not store user-initialized safety IDs in the CFC block type. They are picture-object attributes that get reset every time the block icon is regenerated from the library source. Set the icon's TYPE property to a non-default integer to mark it as user-modified and protect it from future overwrites.

Can I retain custom block icon changes on PCS 7 V6.0 specifically?

The Connect faceplate to process tag dynamic wizard is no longer shipped from PCS 7 V6.0 SP1 onward. On V6.0 use a combination of the TYPE override plus disabling Create/update block icons per compile pass, or migrate to a supported V8.x / V9.x release for stable icon preservation behavior.

What is the recommended TYPE value to assign?

Any positive integer outside the library's internal block-icon TYPE table. A value of 9001 or higher is conventionally unused and safe across CTRL_PID, MOT_SPEED, MOT_SLOW, VALVE_ANA, VALVE_DIG, COUNT, and similar standard block icon types. Document the chosen TYPE in the engineering log.

Will Method A break newly added CFC blocks in the same picture?

No. Only the icon whose TYPE was manually changed is treated as user-modified. New CFC blocks added to the chart and not yet represented on the picture still generate new icons at their library-default positions during the next Create/Update Block Icons pass.

How do I recover if I already ran a compile and lost the custom properties?

Restore from the pre-compile WinCC project backup (.PDL file copy), or use Method D: delete the regenerated icon, drag a fresh instance from @PCS7typicals, re-wire the process tag, re-apply properties, and set TYPE before the next compile to prevent recurrence.

Back to blog