Customizing APL Block Icons Without Breaking Automatic Wizard Interconnections in PCS 7

Customizing APL Block Icons Without Breaking Automatic Wizard Interconnections in PCS 7

When customizing SIMATIC PCS 7 Advanced Process Library (APL) block icons—such as modifying an OpDi01 icon to dynamically display alternating text strings (.Out#Value#String_0 vs .Out#Value#String_1)—implementing the logic via VBS or C scripts causes the automated 'Create/Update Block Icons' wizard to fail because the wizard does not parse or substitute relative tag prefixes inside script string literals. To preserve automatic wizard interconnection during OS compilation, customize the block icon using the Customized Object Configuration Dialog (Konfigurationsdialog des Anwenderobjektes). By exposing the internal output fields' TextDisplay properties directly as user object interface attributes, the compilation wizard automatically maps the full technological tag paths without scripting.

Table of Contents

The APL Block Icon Generation Engine and Tag Substitution Mechanism

In SIMATIC PCS 7, block icons represent controller function blocks graphically on WinCC process overview screens. During OS compilation, the Create/Update Block Icons wizard parses all CFC charts for blocks with the attribute Create block icon enabled, searches the template pictures (@PCS7TypicalsAPLV*.pdl), and instantiates the corresponding block icon into the assigned process picture.

The core mechanism of this automation is Tag Substitution. In the template block icon, object properties are configured with relative tag prefixes beginning with a dot (e.g., .Out#Value#String_0, .SetOp@String_1). During generation, the wizard substitutes this dot prefix with the complete technological hierarchy path (Plant/Unit/Chart/BlockName.Out#Value#String_0), binding the graphical control directly to the controller tag.

Why VBS and C Scripts Break Automatic Wizard Interconnections

When engineers attempt to dynamize block icons by embedding custom VBS or C scripts (such as querying HMIRuntime.Tags(".Out#value#String_0").Read() within a script function):

  1. Parser Blindness: The Siemens block icon compiler analyzes only static Customized Object attribute links and Dynamic Dialog entries. It explicitly ignores character string literals enclosed within script source code.

  2. Dynamic Wizard vs Compiler Generation: If an engineer manually applies the WinCC Dynamic Wizard to an icon, the wizard replaces strings locally; however, the moment a full OS compile or 'Create/Update Block Icons' runs, the compiler regenerates the icon from the template, wiping manual script modifications and restoring unresolved relative tags.

  3. The Customized Object Interface Solution: By bringing the internal text properties to the external interface of the Customized Object (Anwenderobjekt), the properties are treated as native WinCC attributes. The compiler substitutes the tag path cleanly, completely eliminating the need for custom scripts.

Customization Strategy Comparison Matrix

The following table compares approaches for creating custom dynamic APL block icons:

Customization ApproachCompilation Wizard SupportDynamic Tag Prefix SubstitutionScripting OverheadUpdate LongevityVBS / C Action ScriptFails (Strings ignored)Bypassed; tags left unresolvedHigh (Requires C/VBS runtime)Fails on OS compileCustomized Object Interface Link100% Fully SupportedAutomated during compileZero (Native WinCC links)Preserved across compilesDynamic DialogSupported for basic tagsAutomated for single tagsMinimal (No scripting)Preserved across compilesManual Picture PlacementUnsupported by compilerRequires manual Dynamic WizardModerateErased if auto-update checked

Step-by-Step Procedure to Configure Customized Object Properties

To customize an OpDi01 block icon to dynamically display String_0 and String_1 without scripts:

  1. Open Template Picture in Graphics Designer:
    - In WinCC Explorer, open @PCS7TypicalsAPLV8.pdl (or create a project-specific @Template.pdl).
    - Locate the target block icon: @OpDi01/1.
    - Duplicate the icon and rename its type attribute to @OpDi01/11 (creating variant index 11).

  2. Open Customized Object Configuration Dialog:
    - Right-click the duplicated block icon and select Customized Object -> Configuration... (Konfigurationsdialog des Anwenderobjektes).
    - In the left pane, expand the internal objects composing the block icon (e.g., text fields Value1 and Value2).

  3. Expose Text Attributes to External Interface:
    - In the center pane, locate or create an attribute group named Links.
    - Drag the Text or TextDisplay property of Value1 to the Links group; name the exposed attribute TextDisplay0.
    - Drag the Text property of Value2 to the Links group; name the exposed attribute TextDisplay1.
    - In the attribute links configuration:

    • Bind TextDisplay0 to relative tag: .Out#Value#string_0.
    • Bind TextDisplay1 to relative tag: .Out#Value#string_1.
    • Click OK to close the configuration dialog.
  4. Configure CFC Block Instance and Generate:
    - In CFC, open the Object Properties of the OpDi01 block.
    - In the field Create block icon, change the variant index from 1 to 11.
    - In SIMATIC Manager Plant View, run Plant Hierarchy -> Create/Update Block Icons.
    - The compiler instantiates variant 11 with fully resolved tag paths (Chart/OpDi.Out#Value#string_0).

Verification

Verify automated tag substitution:
1. Open the generated process graphic in WinCC Graphics Designer.
2. Select the instantiated block icon and open Object Properties -> Links.
3. Confirm that attributes TextDisplay0 and TextDisplay1 are bound to fully qualified tag paths with green link icons.
4. Start WinCC Runtime.
5. In the CFC chart, modify the string parameters on Out#Value#string_0 and string_1.
6. Confirm that the block icon immediately displays the updated string text corresponding to active output states.

Limitations and Operational Precautions

  • Template Protection: Never modify Siemens system templates (@PCS7TypicalsAPLV*.pdl) directly; save custom icons in @PCS7Typicals_Project.pdl to prevent overwrites during PCS 7 updates.
  • Custom Variant Indexing: Always use variant numbers > 10 (e.g., 11, 12, 21) to prevent conflicts with standard Siemens default icons.
  • Customized Object Grouping: Never ungroup a Customized Object (Anwenderobjekt) in Graphics Designer; ungrouping permanently destroys all internal attribute links and interface mappings.

Engineer FAQ

Why did Siemens Technical Support advise against editing APL faceplate scripts?

Siemens APL faceplates use complex C/VBS scripts and OCX controls tightly integrated with PCS 7 OS compilation. Modifying scripts directly frequently breaks automatic tag substitution, increases CPU load, and voids free hotline support.

Can I display strings from a CFC block without using an Anwenderobjekt?

You could place a separate standalone WinCC I/O field over the icon, but this requires manual placement and cannot be automated by the 'Create/Update Block Icons' wizard.

What is the difference between variant 1 and variant 11 on a block icon?

The number represents the block icon variant. Variant 1 is the default Siemens icon. Assigning 11 in CFC tells the wizard to search for the template named @BlockName/11.

Where is the official Siemens documentation for creating custom block icons?

Detailed instructions and best practices are published in the 'PCS 7 APL Style Guide' under the section 'Creating and Customizing Block Icons'.

Technical References

Related Articles

Related Tags

  • APL Block Icons
  • Customized Object
  • Anwenderobjekt
  • OpDi01
  • Create Block Icons
6 respuestas