Overview
WinCC Flexible (Siemens part number 6AV6..., last released as WinCC Flexible 2008 SP5) is the engineering suite used to configure SIMATIC Panels from the OP 73 / TP 177 / OP 177 / MP 177 / MP 277 / MP 377 / Comfort Panel families. One of the most frequently reported configuration problems in WinCC Flexible is that objects placed on the Template (Vorlage) — the equivalent of a global overlay — are always drawn behind objects of the active process picture. This breaks the "pop-up in front of everything" behavior that engineers expect from a shared screen-wide overlay such as a motor faceplate, a login dialog, or an alarm banner.
This technical reference documents why the layering limitation exists, what is and is not possible inside WinCC Flexible, and the four production-proven workarounds (visibility animation, per-screen faceplate, last-drawn ordering, and global permanent window). It also compares the WinCC Flexible behavior with WinCC (Classic) and TIA Portal WinCC, where true picture-in-picture is supported, and gives a migration checklist for panels that have to move forward.
How WinCC Flexible Renders Screens and Templates
At runtime, the panel's screen stack consists of two cooperating visual planes:
- Process screen (Bild) — the active picture opened by area pointer, job mailbox, or screen selection tag. The process screen owns its own object list and is the only place where screen-local variables, screen-local scripts, and tab orders are evaluated.
- Template (Vorlage) — a static, non-switchable overlay that is replicated on top of every process screen. The template typically contains the system keys (F1–F8 / K1–K16), date/time field, alarm indicator, user view, project name, and any global graphics such as a company logo.
The renderer composites these two planes in a fixed z-order: template below, process screen above. This z-order is hard-coded in the WinCC Flexible runtime and is not influenced by the layer number that an object is assigned to in the editor. As a result, any object — graphic, text field, I/O field, button, rectangle — placed on the template is occluded by any opaque object on the active process screen, regardless of the layer number chosen in the object's properties.
Layer Numbering System (0–31)
WinCC Flexible exposes 32 layer levels (0 through 31) inside every picture. Layers are an intra-screen z-ordering mechanism only:
| Layer | Conventional Use | Notes |
|---|---|---|
| 0 | Default working layer | All new objects land here unless explicitly moved. |
| 1–9 | Static graphics, backgrounds, frames | Background bitmap typically on layer 0 or 1. |
| 10–19 | Process graphics, instruments, sliders | Standard faceplate content. |
| 20–28 | Buttons, I/O fields, animated elements | Interactive layer. |
| 29 | Reserved for trend/ alarm controls (often) | Controls internally reserve the highest free layer. |
| 30 | Pop-ups, dialog overlays | Commonly used for modal-style windows within a single screen. |
| 31 | Last drawn / foreground | Topmost layer for foreground content; user cannot create layer 32. |
The crucial point: layer numbers do not cross the template/process-screen boundary. An object on the template assigned to layer 31 is still rendered behind any object on the active process screen, even if the process-screen object is on layer 0. The cross-boundary z-order is fixed, not numerically driven.
Why Template Objects Always Stay Behind Process-Screen Objects
The template is treated as a "background chrome" plane. When the panel's runtime composites a frame it executes the following paint order:
- Clear the back buffer.
- Bit-blt the cached template plane (template objects, all layers, sorted ascending by layer number).
- Bit-blt the active process screen plane (process objects, all layers, sorted ascending by layer number).
- Bit-blt any active permanent window (see workaround 4).
- Bit-blt the cursor and touch feedback layer.
Step 2 always precedes step 3, so any opaque region of the process screen overwrites the template. Translucent or "hole" effects on the process screen are not supported by WinCC Flexible's renderer, which is why a transparent pop-up on the template cannot "show through" the process screen even when its visibility animation is set to 100 %.
Siemens explicitly documents this limitation in their WinCC Flexible FAQ entry ID 24256007 — "How do you create a faceplate-type popup in WinCC flexible?", which is the canonical reference for the workarounds below.
Workaround 1 — Visibility Animation with a Global Boolean Tag
The most common production workaround is to keep the pop-up visible at all times on the template, but use the Animations > Visibility property to drive its appearance from a single shared tag. A VBScript or direct tag connection toggles the tag to show or hide the object.
Step-by-step:
- Open the Template editor (Project > Template).
- Place the pop-up graphic (motor faceplate, login dialog, etc.) and any associated text fields, buttons, and I/O fields. Bind their Animations > Visibility to a single BOOL tag such as
ShowMotorPopup_M1. - On the process screen, add a button or a value-change event that sets the tag. The simplest event is the press event of a button:
' Press event of a button on a process screen
SmartTags("ShowMotorPopup_M1") = True
- On the pop-up itself, add a "Close" button whose Click event clears the tag:
' Click event of the Close button on the pop-up
SmartTags("ShowMotorPopup_M1") = False
Behavior: Because the template is always "behind," the pop-up only becomes visible when the user navigates to a process screen that does not cover its region. The moment the user switches screens, the pop-up reappears in its template-defined coordinates. This makes workaround 1 best suited for static-position overlays such as a global alarm summary, a company watermark, or a permanent status panel.
Workaround 2 — Faceplate Instance on Every Process Screen
A faceplate (Bildbaustein) is a reusable picture type whose instance is dropped on a process screen like an object. Unlike a template object, a faceplate instance is part of the process screen's z-stack, so it sits in front of any other process-screen objects and in front of the template.
Step-by-step:
- In Project > Faceplates, create a new faceplate type called
MotorPopup. - Inside the faceplate, add the pop-up graphics, I/O fields, and a Close button. Connect Animations > Visibility to a faceplate-internal tag, or expose a property (Eigenschaft) on the faceplate container that toggles the internal visibility.
- On each process screen, insert an instance of the faceplate from the library. Position it identically on every screen (use Project > Cross-reference > Layer to align).
- Drive the visibility tag from a process-screen button or from a global BOOL tag, identical to workaround 1.
Behavior: The pop-up now sits on the topmost z-plane of the process screen and is fully drawn in front of the template. The trade-off is that you must add a faceplate instance to every screen that needs the pop-up, and any future change to the faceplate geometry requires regenerating the instances (right-click > Update Instances).
For a more detailed walkthrough of the property and tag interface, see the Siemens WinCC Flexible manual chapter "Creating Faceplates" available on the SIMATIC HMI WinCC Flexible manual download page.
Workaround 3 — Last-Drawn / Cut-and-Paste Trick
Within a single screen, WinCC Flexible uses a last-drawn-wins tie-breaker when two objects are on the same layer. By cutting the foreground object and pasting it back, you push it to the bottom of the object list, which makes it the last item drawn, hence on top of every other object on that layer.
Procedure:
- Select the pop-up object on the template (or on the process screen if you are using workaround 2).
- Press
Ctrl+Xto cut. - Press
Ctrl+Vto paste at the same coordinates. - Repeat for every object in the pop-up group (text fields, I/O fields, buttons). Cut and paste them in the same order so the parent-child relationship in the object list is preserved.
This trick is most useful for in-screen pop-ups and is not a solution to the template-behind-process-screen problem by itself. However, combined with workaround 2, it ensures that the faceplate instance is the last thing rendered in its layer, eliminating z-fighting between sibling controls.
Workaround 4 — Permanent Window (Globales Bild)
WinCC Flexible supports a single permanent window that floats above both the template and the active process screen. It is the only built-in object that is rendered in front of the process screen, which is why alarm windows, the trend control, and the recipe view naturally "pop in front" without any user configuration.
Engineers often use a permanent window as a true global pop-up layer:
- Create a new screen called
GlobalPopup.pdl. - Open Project > HMI Device > Screens > Properties and assign it as the Permanent Window (typically 0 to 200 pixels tall, docked to the top or bottom of the display).
- Inside
GlobalPopup.pdl, place your shared pop-up graphics and toggle their visibility with a global BOOL tag as in workaround 1. - To make the permanent window appear or disappear, use the system function
SetVisibilityon a tag change event:
' On tag change of ShowGlobalPopup
If SmartTags("ShowGlobalPopup") Then
SmartTags("PermanentWindowVisible") = True
Else
SmartTags("PermanentWindowVisible") = False
End If
Behavior: The permanent window is the only WinCC Flexible construct that draws in front of the active process screen. The limitation is that only one permanent window is allowed per panel and it must be a single screen height, not a free-floating rectangle. For most "info banner" use cases it is sufficient; for a free-floating modal dialog you still need workaround 2 (faceplate on every screen).
WinCC Flexible vs WinCC (Classic) vs TIA Portal WinCC
| Feature | WinCC Flexible 2008 SP5 | WinCC (Classic) 7.x | TIA Portal WinCC (Comfort/Advanced) | WinCC Unified |
|---|---|---|---|---|
| Template behind process screen | Yes (fixed) | Configurable | Configurable | Configurable (Faceplate Container) |
| Picture-in-Picture | No | Yes (Bildfenster) | Yes (Bildfenster) | Yes (Screen Windows) |
| Number of Permanent Windows | 1 | Multiple | Multiple | Multiple |
| Free resize at runtime via script | No | Yes (C / VBS) | Yes (VBS / C) | Yes (JavaScript / C) |
| Faceplate as a true floating window | No (instance only) | Yes | Yes | Yes |
| Layer count per screen | 32 | 32 | 32 | Configurable (default 32) |
| Last supported panel families | OP 73 – MP 377 | PC runtime only | Comfort Panels, IPC, WinCC RT | Unified Comfort Panels, IPC |
For new projects the recommendation is to skip WinCC Flexible entirely and start in TIA Portal V17 or later with WinCC Comfort/Advanced on a Comfort Panel (e.g., TP700, TP1200) or with WinCC Unified on a Unified Comfort Panel (e.g., MTP700, MTP1200). Both products support true picture-in-picture and free script-driven window positioning, removing the need for any of the four workarounds above.
Migration Path to TIA Portal
When a panel must move from WinCC Flexible to TIA Portal:
- Install TIA Portal and the WinCC Comfort/Advanced option.
- Open the original
*.hmiproject in TIA Portal's "Migrate project" wizard. The wizard translates the screens, tags, alarms, recipes, and faceplates 1:1 into a TIA Portal project. Templates are translated as "Global Screen" and the new runtime composes them on a configurable layer above the process screen. - After migration, change the layer order in the new project if needed: open HMI Device > Screens > Properties > Layer and re-order the global screen to layer 31. This is the equivalent of workaround 4 in the new runtime.
- Validate that the original VBScripts compile in TIA Portal. The WinCC Flexible VBS object model is a subset of TIA Portal's; most scripts port without change, but
SmartTagsaccess syntax may need to be re-qualified in the project namespace.
For panels older than the OP 277 / MP 377 generation the migration target is sometimes a hardware replacement rather than a software port. Refer to the Siemens SIMATIC HMI Panel Migration Guide for the cross-reference matrix.
Verification and Best Practices
To verify any of the four workarounds, perform the following field checks on the live panel:
- From the start screen, press the button that toggles the visibility tag. The pop-up should appear within one PLC scan cycle (≤100 ms typical).
- Switch to a process screen that contains an opaque object in the pop-up's coordinates. The pop-up must remain visible (workaround 1) or it must be visible because the faceplate instance is part of that screen (workaround 2).
- Switch to a process screen that does not contain the pop-up region. The pop-up should still appear (workaround 1) or be absent (workaround 2, by design).
- Power-cycle the panel and confirm that the initial state of the visibility tag is
FALSEto avoid a startup overlay that hides the start screen. - From ProTool/WinCC Flexible ES, run Compile > Consistency Check to ensure no broken tag references after the change.
Best practices summary:
- Use workaround 1 (Visibility Animation) for static, full-screen-width overlays like a global alarm banner or company logo.
- Use workaround 2 (Faceplate) for pop-ups that must appear in front of any process-screen content such as a motor faceplate or login dialog.
- Use workaround 3 (Last-drawn) only as a tie-breaker within a single layer on a single screen.
- Use workaround 4 (Permanent Window) only when no other option fits, because you only get one permanent window per panel.
Troubleshooting Matrix
| Symptom | Likely Cause | Resolution |
|---|---|---|
| Pop-up is invisible on some process screens. | Template plane is occluded by an opaque process-screen object. | Switch to workaround 2 (faceplate instance) or move the process-screen object out of the pop-up region. |
| Pop-up flickers when an alarm arrives. | Alarm control and the pop-up share the same visibility tag and re-trigger the animation. | Use a separate tag for the alarm control; combine in the runtime via a third derived tag. |
| Cut-and-paste trick no longer works after a recompile. | The object list is regenerated by the compiler; the last-drawn order is reset. | Place the pop-up on layer 31 in addition to the cut-paste trick to make the order explicit. |
| Permanent window covers the system keys. | Height of the permanent window is too large. | Reduce the height to ≤200 px, dock to top, and place system keys in the lower 80 % of the template. |
| VBScript visibility tag does not toggle. | Tag is local to the screen and the script is on the template, or vice-versa. | Declare the tag as a global connection (not a local element). |
| Pop-up visible only at project start, not after navigation. | Initial value of the tag is TRUE and the start screen's button was never pressed. | Set the tag's initial value to FALSE in the HMI tags table. |
Frequently Asked Questions
Does WinCC Flexible support picture-in-picture like WinCC Classic?
No. Picture-in-picture (Bildfenster) is only available in WinCC (Classic) 7.x and in TIA Portal WinCC Comfort/Advanced. WinCC Flexible exposes the single permanent window as its only floating overlay, and all template objects are forced behind the active process screen by the runtime's z-order.
Why does a higher layer number on a template object not bring it to the front?
Layer numbers operate only inside one picture plane. The WinCC Flexible runtime composites the template plane first and the process-screen plane second, regardless of the layer number assigned to objects inside each plane. To draw in front of the process screen you must place the object on the process screen itself (for example as a faceplate instance) or use the permanent window.
How many permanent windows can a panel have?
Exactly one. The permanent window is configured in the HMI device's screen properties and applies to the entire project. For projects that need more than one global overlay, the recommended approach is to migrate to TIA Portal WinCC, where multiple permanent windows and floating faceplate containers are supported.
Can I drive a template object's visibility from a VBScript on the process screen?
Yes, as long as the BOOL tag that drives the Animations > Visibility property is declared as a global connection in the HMI tags table. The script on the process screen can then write to SmartTags("ShowPopup") = True/False and the template object will animate accordingly. Local tags are not visible across the template/process-screen boundary.
What is the official Siemens reference for this layering limitation?
The canonical document is Siemens FAQ ID 24256007 — How do you create a faceplate-type popup in WinCC flexible? The same support entry recommends the faceplate instance approach (workaround 2) and the permanent window (workaround 4) as the supported methods.