Creating Custom PCS 7 Block Icons in @PCS7Typicals - Parameter Dot Notation and Dynamic Property Linkage

Creating Custom PCS 7 Block Icons in @PCS7Typicals - Parameter Dot Notation and Dynamic Property Linkage

To connect dynamic input/output parameters as attributes in a custom PCS 7 block icon inside @PCS7Typicals.pdl (or @PCS7TypicalsAPLV8.pdl), use the leading dot parameter notation (.ParameterName). When configuring customized object (User Object) properties in WinCC Graphics Designer, link internal graphic attributes (such as color dynamics, text, or visibility) to external properties named exactly with a leading dot followed by the block's I/O symbol (e.g., .Start_manual, .Motor_running, or .Status1). When the AS-OS Compiler executes 'Create/update block icons', it matches the block's type attribute (e.g., @MyCustomBlock/1), instantiates the icon in the target picture, and dynamically prefixes the full CFC plant hierarchy tag path to all dot-prefixed properties.

Table of Contents

The Automated Block Icon Generation Pipeline in SIMATIC PCS 7

In SIMATIC PCS 7, operator interaction with field equipment is driven by standardized block icons displayed on plant mimic diagrams. Rather than manually drawing graphic objects, linking tag names, and attaching mouse-click scripts for hundreds of motors, valves, and transmitters, PCS 7 utilizes an automated generation engine called 'Create/update block icons'.

The engine operates as follows:

  1. AS Engineering: Technological blocks are placed in CFC charts within the Plant Hierarchy and marked for Operator Control and Monitoring (S7_m_c := 'true').

  2. Template Library: During OS compilation or when triggering block icon generation from SIMATIC Manager, the compiler scans template files located in the OS project's GraCS directory—specifically @PCS7Typicals.pdl (classic library) or @PCS7TypicalsAPLV8.pdl / @PCS7TypicalsAPLV9.pdl (Advanced Process Library).

  3. Icon Instantiation: For every OCM-enabled block instance with the 'Create block icon' option ticked, the compiler copies the matching block icon into the process picture associated with that plant hierarchy folder, automatically binding process tags.

Understanding Dot Notation (.ParameterName) and Dynamic Tag Prefixing

When creating a custom block icon for a user-defined function block (e.g., Mot_Test or SpecialValve), engineers often wonder how the block icon knows how to connect to specific inputs and outputs without hardcoding tag paths.

The mechanism relies strictly on dot notation (.ParameterName):

  • In @PCS7Typicals.pdl, the block icon is a Customized Object (User Object).
  • When exposing internal object properties to the outside of the User Object, any property intended to bind to a block I/O parameter must be assigned an external property name starting with a dot followed by the exact block parameter name, such as .Start_manual, .Motor_running, .PV_Out, or .Status1.

  • When the compiler creates the block icon in a process picture (e.g., in PlantArea/Unit01/MotorChart), it writes the full CFC tag path (PlantArea/Unit01/MotorChart/Mot_Test) into the icon's tag or tagname attribute.

  • Simultaneously, the compiler resolves all dot-prefixed properties by appending the dot-name to the full tag path: PlantArea/Unit01/MotorChart/Mot_Test.Start_manual and PlantArea/Unit01/MotorChart/Mot_Test.Motor_running. If the property does not start with a dot, the compiler leaves it untouched as a static icon property.

Step-by-Step Procedure: Creating a Customized Object in @PCS7Typicals

To build and parameterize a custom block icon, follow this workflow in WinCC Graphics Designer:

  1. Open Template File:
    - On the Engineering Station, open the OS project's Graphics Designer.
    - Open @PCS7Typicals.pdl (or @PCS7TypicalsAPLV8.pdl). Always save a backup copy before editing!

  2. Draw Base Graphic Elements:
    - Draw the visual elements representing your equipment (e.g., rectangle for body, circle for status LED, text box for status text).
    - Select all the elements, right-click, and select Customized Object > Create...

  3. Configure User Object Properties Dialog:
    - In the Configuration Dialog, click the Properties tab.
    - Create a property group named General or Links.
    - Map the internal graphic attributes to external properties:

    • Drag the rectangle's Background Color to the right-hand panel and rename the external property to .QOPEND or .Status1.
    • Drag the text box's Text property and rename it to .QMAN_AUT.
    • Add standard PCS 7 mandatory attributes: type, tag, tagname, servernam, and ToolTipText.
  4. Configure Events and Faceplate Call:
    - Under the Events tab, select Mouse > Mouse Click.
    - Attach the standard PCS 7 C-action PCS7_OpenGroupDisplay_V6(...) or APL faceplate open script APL_OpenFaceplate(...).

Essential Block Icon System Attributes (type, servername, tag, tagname)

Every PCS 7 block icon requires a set of mandatory system attributes to function within the runtime architecture:

  • type: Identifies the block type and icon variant, formatted as @<BlockName>/<Variant> (e.g., @Mot_Test/1 or @VALVE/2). The system matches this string against the CFC block type and instance variant number.

  • tag / tagname: Stores the absolute CFC block path (e.g., Area1/Unit1/Pump01). Populated automatically by the compiler during generation.

  • servernam: Specifies the faceplate server DLL or faceplate runtime module called when the operator clicks the icon (e.g., PCS7 CustomBlock Control or standard APL server identifier).

  • CollectValue: For classic blocks, aggregates group alarms and acknowledgment states into the overview area.

Comparative Attribute Matrix: Standard vs Custom Block Icon Parameters

The following table compares standard PCS 7 block icon properties and their dynamic compilation linkage behaviors:

Icon Attribute NameParameter TypeSyntax / Format ExampleCompiler BehaviorRuntime FunctiontypeSystem Static@Mot_Test/1Scanned for matching CFC block type & variantEstablishes icon template identitytag / tagnameSystem DynamicArea/Unit/Mot01Written automatically during generationPrimary tag reference for scripts and faceplates.ParameterNameDynamic Link.Start_manualPrefixed with full tag path (Area/.../Mot01.Start_manual)Drives dynamic color, status, or text changesservernamSystem StaticPCS7 Mot_Test ControlPreserved statically from templateDirects OS to open corresponding faceplate PDLToolTipTextDynamic Link.Comment or staticResolved to block comment or custom stringDisplays operator tooltip on mouse hoverVersionSystem Static1.0Read by OS Project Editor during updatesManages template versioning and migration

Configuring Custom Block Icon Generation and Compilation

Once the block icon is configured in @PCS7Typicals.pdl, connect it to your CFC engineering workflow:

  1. In the Step 7 Symbol Table, ensure your custom function block (e.g., FB1500) has a unique symbolic name (e.g., Mot_Test).
  2. Open a CFC chart and insert an instance of Mot_Test.
  3. Double-click the block header to open Block Properties:
    - Ensure the checkbox 'OCM possible' is active.
    - Check 'Create block icon'.
    - In the Block icon field, enter the variant number (e.g., 1 for @Mot_Test/1, or 2 for @Mot_Test/2).
  4. In SIMATIC Manager, right-click the Plant Hierarchy folder (or target OS) and select Plant Hierarchy > Create/Update Block Icons.
  5. The system parses all CFC charts, opens the associated WinCC pictures, inserts the custom block icons, and connects all .ParameterName dynamic properties directly to the instance tags.

Verification

Verify the custom block icon implementation through the following steps:

  1. In SIMATIC Manager, execute Create/Update Block Icons for the hierarchy folder containing the test CFC chart.
  2. Open the generated process picture in WinCC Graphics Designer. Select the newly generated block icon.
  3. In the Properties window under Links, verify that all dot-prefixed properties (e.g., .Start_manual) now display full tag paths without leading dots (e.g., Area/Unit/TestChart/Mot_Test.Start_manual).
  4. Check that the icon's tag property is populated with the full block path.
  5. Activate WinCC Runtime. In S7-PLCSIM or online controller, toggle the block's outputs and confirm that the block icon changes color and status dynamically in response to process variables.
  6. Click the block icon and verify that the corresponding faceplate opens correctly.

Limitations and Operational Precautions

  • Case Sensitivity: Block parameter names in SCL/STL and in the User Object property names are case-insensitive in Step 7, but WinCC tag management treats them strictly. Always match the exact casing of the compiled block I/O pins.
  • Template Overwrite Protection: Running the OS Project Editor can overwrite @PCS7Typicals.pdl if configured to replace template files. Always create your custom icons in a designated project file (e.g., @PCS7TypicalsCustom.pdl) and configure the OS compiler to scan custom typical files.
  • Maximum 40 Block Icon Variants: PCS 7 allows up to variant number 40 per block type. Exceeding variant 40 causes the compiler to ignore the block icon.

Engineer FAQ

Why are my custom block icon's properties blank after running 'Create/update block icons'?

This occurs if the leading dot was omitted when configuring the User Object external properties in @PCS7Typicals.pdl. Without the leading dot (.Param), the compiler treats the property as static and will not prepend the CFC block tag path.

Can I use @PCS7TypicalsCustom.pdl instead of modifying @PCS7Typicals.pdl?

Yes. PCS 7 supports custom typical files named @PCS7Typicals_<CustomName>.pdl. When compiling block icons, the compiler searches custom typical files first before falling back to factory @PCS7Typicals.pdl, preventing customized icons from being overwritten by system updates.

How does the block icon know which picture to be placed into?

In SIMATIC Manager Plant Hierarchy, each hierarchy folder has an assigned process picture (*.pdl). Block icons are automatically generated in the picture assigned to the hierarchy folder where their parent CFC chart resides.

Can I connect APL Status DWORDs (e.g., .Status1) to my custom block icon?

Yes. In your custom function block, define an output of type DWORD named Status1. In the block icon User Object, expose .Status1 and link it to a dynamic dialog evaluating bitmasks to drive colors and symbols.

What is the difference between @PCS7Typicals.pdl and @template.pdl?

@PCS7Typicals.pdl contains block icons generated automatically by the AS-OS compiler via Plant Hierarchy. @template.pdl contains static graphic symbols, pipes, and decorative elements manually copied by engineers into process pictures.

Technical References

Related Articles

Related Tags

  • Block Icons
  • @PCS7Typicals
  • Customized Objects
  • Dot Notation
  • Plant Hierarchy
  • WinCC Graphics Designer
  • AS-OS Compiler
6 respuestas