Configuring Dynamic Faceplate and Block Icon Colors from CFC in SIMATIC PCS 7
In SIMATIC PCS 7 WinCC, changing font or background colors directly on a process screen is futile because running OS Compilation ('Create/update block icons') overwrites local picture modifications with the master template from @PCS7Typicals.pdl. To control block icon and faceplate colors dynamically from CFC, engineers must either utilize native Advanced Process Library (APL) status words and central color palettes, or customize the master block icon template inside @PCS7Typicals.pdl by binding the element's ForeColor or BackColor property to a CFC status tag using a Dynamic Dialog.
Table of Contents
- Architecture of Automated Icon Management and the Typicals Hierarchy
- Why Direct Graphic Modifications Revert After OS Compilation
- Controlling Visual States Dynamically from CFC Logic
- APL Central Color Palettes vs Custom Dynamic Dialog Property Binding
- Comparison Table: Color Customization Methodologies in PCS 7
- Step-by-Step Procedure to Implement Dynamic Colors via @PCS7Typicals.pdl
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Architecture of Automated Icon Management and the Typicals Hierarchy
In SIMATIC PCS 7, Human-Machine Interface (HMI) visualization maintains a strict architectural hierarchy between offline engineering logic and runtime graphics:
* The Master Template Picture (@PCS7Typicals.pdl):
Located in the WinCC project's GraCS directory, this file serves as the single source of truth for all standardized block icons (e.g., @MotL/1, @VlvL/1, @MonAnL/1).
* The OS Compilation Engine:
When an engineer compiles the OS with the option Create/update block icons selected, the compiler parses all CFC charts for blocks marked with { S7_m_c := 'true' }.
* Automated Synchronization:
For every matching block, the wizard locates the corresponding icon in @PCS7Typicals.pdl, copies it onto the target process picture (.pdl), and binds internal properties (#tag, #type) to the S7 instance.
* The Engineering Consequence: Any manual aesthetic change—such as modifying font color, resizing boxes, or changing border styles directly in a process graphic—is treated as obsolete by the compiler and overwritten during the next compilation.
Why Direct Graphic Modifications Revert After OS Compilation
Engineers frequently encounter this frustration:
1. An engineer opens a plant graphic in WinCC Graphic Designer and manually changes an analog readout font color from green to red.
2. The graphic functions in runtime temporarily.
3. Later, another engineer makes a minor CFC change and executes Compile OS.
4. The OS compiler sweeps across all pictures, deletes the modified block icon, and reinstantiates a fresh copy from @PCS7Typicals.pdl, resetting the font color back to standard green.
* Design Rule: To make permanent visual modifications that survive full OS compilations, changes must be engineered directly inside @PCS7Typicals.pdl (or a custom typicals file such as @PCS7Typicals_Custom.pdl).
Controlling Visual States Dynamically from CFC Logic
When plant specifications require changing colors dynamically based on operational conditions (for example, displaying an analog weight in green during normal operation, but turning the font red when an out-of-tolerance batch threshold is reached in CFC):
- The S7 Controller Layer (CFC):
The custom or technological block must expose an output variable indicating the visual state. This can be: - A single boolean status bit (e.g.,
Weight_OOR : BOOLwith{ S7_m_c := 'true' }). - A structured status Double Word (e.g.,
Status1 : DWORDwhere Bit 5 represents out-of-tolerance). - An integer color index (e.g.,
ColorIndex : INTwhere 1 = Green, 2 = Red, 3 = Yellow). - The WinCC Dynamic Dialog Layer:
Inside the block icon template, the text field's Font Color (ForeColor) property is animated using a Dynamic Dialog evaluating the relative tag (e.g.,.Status1or.Weight_OOR).
APL Central Color Palettes vs Custom Dynamic Dialog Property Binding
SIMATIC PCS 7 provides two proven mechanisms to manage dynamic coloring:
- Method 1: The APL Central Color Palette:
Advanced Process Library blocks utilize standardized color schemes defined in WinCC Project Properties > Central Color Design. Standard colors (e.g., Green for Run, Gray for Stop, Red for Alarm, Yellow for Warning) are centralized. Adjusting a color index in the central palette globally updates all standard faceplates without touching individual graphics. - Method 2: Custom Dynamic Dialogs in
@PCS7Typicals.pdl:
For custom technological blocks (e.g., scales, reactors, furnaces) requiring non-standard behavioral colors, engineers configure custom objects in@PCS7Typicals.pdl. Using the leading dot syntax (.MyTag), the icon evaluates controller logic dynamically while retaining 100% compatibility with the OS compilation wizard.
Comparison Table: Color Customization Methodologies in PCS 7
The following table compares the different methodologies for implementing visual color changes in PCS 7:
@PCS7Typicals.pdl@Template.pdl)Step-by-Step Procedure to Implement Dynamic Colors via @PCS7Typicals.pdl
Follow this verified engineering workflow to implement permanent, PLC-driven dynamic colors:
- Expose the Status Variable in CFC:
* In the CFC technological block, declare an output:
Out_Of_Tol : BOOL; { S7_m_c := 'true' }
* Compile the CFC chart to register the tag in WinCC. - Open Master Typicals Picture:
* In WinCC Graphic Designer, open@PCS7Typicals.pdl(or duplicate as@PCS7Typicals_Custom.pdl).
* Locate the target block icon object (e.g.,@WEIGHT/1). - Configure Dynamic Dialog on Text Object:
* Select the text field or I/O field displaying the value.
* In the Object Properties window, navigate to Font > Font Color (ForeColor).
* Right-click the light bulb icon and select Dynamic Dialog.
* Set Data Type toBoolean.
* In the Tag expression, enter:.Out_Of_Tol(the leading period is mandatory).
* In the result table:- If
TRUE (1): Set Color to Red (16#0000FF). - If
FALSE (0): Set Color to Green (16#00FF00). - Click OK and save
@PCS7Typicals.pdl.
- If
- Execute OS Compilation:
* In SIMATIC Manager, right-click the OS project > Compile.
* Select the target AS and OS stations.
* Ensure Create/update block icons is checked.
* Run the compilation to completion.
Verification
Verify that dynamic color transitions operate reliably:
1. In CFC Test Mode, force Out_Of_Tol = FALSE; verify in WinCC Runtime that the weight measurement displays in green font.
2. Force Out_Of_Tol = TRUE in the controller; verify that the text font instantly transitions to bold red on the operator screen.
3. Perform a complete multi-project OS compilation (Compile OS > Entire project); verify that after compilation finishes, the red/green dynamic color logic remains completely intact in Graphic Designer.
4. Check the WinCC diagnostic console (apidiag.exe) to confirm that zero unresolved tag prefix errors exist.
Limitations and Operational Precautions
- Mandatory Leading Dot: In the Dynamic Dialog within
@PCS7Typicals.pdl, the tag name must always begin with a period (e.g.,.Out_Of_Tol). Omitting the period prevents the OS compiler from prepending the parent block tag path, resulting in broken tags in runtime. - Typicals File Precedence: If multiple typicals files exist (
@PCS7Typicals.pdl,@PCS7Typicals1.pdl), the compiler parses them in alphabetical order. Ensure conflicting duplicate block types do not exist across multiple template files. - Ergonomic Standards: Adhere to industrial standards (ISA-101 and NAMUR NE 107). Avoid arbitrary color usage; reserving red strictly for alarms and process hazards ensures operator focus is not diluted during emergency events.
- Commercial Accuracy: Custom block icon engineering is supported natively by standard PCS 7 engineering software (
6ES7658-2CX58-0YB5). Validate license allocations with an authorized Siemens distributor quotation.
Engineer FAQ
Can I change the color of standard APL faceplate popups without modifying scripts?
Standard APL faceplate header and status colors are driven by the WinCC Central Color Palette. Modifying the central color definition updates faceplates globally without editing individual @PG_*.pdl screens.
What happens if I use @Template.pdl instead of @PCS7Typicals.pdl?
Block icons copied from @Template.pdl are not automatically managed by the OS compiler. They will not be overwritten during OS compilation, but they must be manually placed and manually wired to tags for every single instance.
Can an analog value change color based on warning and alarm limits automatically?
Yes. Standard APL analog blocks (MonAnL, PIDConL) automatically pass alarm limit states (PV_AH_Act, PV_WH_Act) to the icon, which changes background and font colors automatically based on APL styling rules.
Why does WinCC show a yellow exclamation mark on the block icon in runtime?
A yellow exclamation mark indicates that the block icon cannot establish a valid communication link with the PLC tag, typically caused by a typo in the tag name or an incomplete OS compilation.
Technical References
- SIMATIC Process Control System PCS 7 Advanced Process Library (APL) Manual
- SIMATIC Process Control System PCS 7 Operator Station Configuration Guide
- ISA-101.01: Human Machine Interfaces for Process Automation Systems
Related Articles
- Creating Multi-Bit Dynamic Status Logic for Custom Block Icons in PCS 7 Graphic Designer
- Troubleshooting Missing Block Icons in WinCC Graphic Designer After OS Compilation
- Restoring Missing Menus and View Toolbars in PCS 7 APL Faceplates in WinCC Runtime
Related Tags
- WinCC Graphic Designer
- Block Icons
- @PCS7Typicals.pdl
- Dynamic Dialog
- CFC Parameters
- Faceplate Colors