Creating Multiple Slide-In Screen Instances in TIA Portal HMI

David Krause15 min read
SiemensTIA PortalTutorial / How-to
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

Overview of the TIA Portal Slide-In Screen Function

The slide-in screen object is a runtime screen window in SIMATIC WinCC (TIA Portal) that animates onto the active screen from a configurable edge (top, bottom, left, or right). It is part of the Comfort Panel, Unified Comfort Panel, and WinCC Runtime Advanced / Professional screen object library, and it is intended for transient operator inputs that should not fully cover the process screen the way a modal popup does.

Out of the box, TIA Portal HMI engineering permits only a single configured slide-in screen object per HMI device. Operators that need a "swipe-in" effect for alarms, a recipe quick-editor, a maintenance dialog, and an operator login all at the same time must implement a workaround. The technique described in this article uses WinCC screen layers, per-object visibility animations, and PLC- or script-driven tag control to expose multiple logical slide-in instances from one physical slide-in object.

Compatibility note: The slide-in screen object has been available since TIA Portal V14 for Comfort Panels. The visibility animation, layer concept, and tag interface used in this article are supported in TIA Portal V15.1, V16, V17, V18, and V19, and they apply to Unified Comfort Panels, Classic Comfort Panels, and the PC-based WinCC Runtime Advanced / Professional targets. Always cross-check the screen object catalog for your specific TIA Portal service pack, because the screen object set changes between major releases.

Screen Object Types: Popup vs. Slide-in vs. Screen Window

Before engineering a multi-instance solution, distinguish the three transient screen object types available in WinCC. Choosing the wrong one is the most common reason the workaround below appears more complex than it is.

Object Behavior Typical Use Limitations
Popup Modal, centered, blocks underlying screen inputs, has its own title bar. Confirmation dialogs, numeric / alpha keypads, alarms with acknowledge. Only one popup can be the "active" popup at a time; cannot be configured to slide in.
Slide-in screen Non-modal, animates from a configured edge, partially overlays the parent screen. Quick-edit panels, top-bar alarms, expandable operator menus. Only a single slide-in object is supported per HMI device configuration; layer / visibility technique required for multiple logical instances.
Screen window Fixed region on the parent screen that displays another screen by number. Permanent header, footer, side-panel content driven by a tag. No animation; position is static; tag is a screen number rather than a Boolean visibility.

Prerequisites

  1. TIA Portal V15.1 or later (V17+ recommended for the most current screen object catalog).
  2. An HMI device from the supported list:
    • SIMATIC Comfort Panels (TP700..TP2200, KP700..KP1500, KTP400..KTP1200)
    • SIMATIC Unified Comfort Panels (MTP700..MTP2200)
    • WinCC Runtime Advanced on a PC (SIMATIC HMI Panel PC or standard IPC)
    • WinCC Runtime Professional on a PC
  3. A configured PLC connection (S7-1200/1500 preferred) or a local HMI tag if no PLC is in the loop.
  4. The user must understand the difference between engineering layers (design-time stacking) and runtime visibility (animation triggered by tag state).
  5. Optional but recommended: SIMATIC WinCC Engineering V19 - Programming and Operating Manual for the screen object reference.

Architecture of the Multi-Instance Slide-In

The single slide-in screen object has a fixed active state: when it is shown, the configured screen inside it is displayed. To emulate multiple instances, you embed several distinct screen layouts into a single master slide-in and toggle which layout is visible at runtime. Visibility is driven by a discrete tag (one bit per instance) and the engineering-time layer property keeps overlapping objects from interfering with the editor.

HMI Runtime Parent Screen (e.g. Overview) Instance A visible (Layout A contents) Instance B hidden Instance C hidden Instance A visible Master Slide-in Screen Tag: bShowA HMI Bool Tag: bShowB HMI Bool Tag: bShowC HMI Bool

The diagram shows the runtime view: a single slide-in container that occupies one fixed region on the parent screen, with three visibility-animated layouts stacked at the engineering layer level. Whichever tag is active at runtime determines which instance the operator sees.

Step-by-Step Implementation

Step 1 - Add the master slide-in screen

  1. Open the HMI device in the TIA Portal project tree.
  2. Right-click Screens and add a new screen. Name it SlideIn_Master.
  3. Size the screen to match the slide-in panel dimensions (typical: 380 x 220 px for a 7" Comfort Panel).
  4. Insert the contents that you want to share across all instances (header bar, close button, slide direction). The close button writes 0 to all instance visibility tags via a single event.

Step 2 - Embed the slide-in screen object on the parent

  1. Open the screen that should host the slide-in (for example Screen_Overview).
  2. From the toolbox, expand Controls and drag a Slide-in screen object onto the workspace.
  3. Configure the slide-in properties in the Properties window:
    Property Recommended Value Notes
    Slide-in direction From right / from left Pick one for the entire project; consistency improves operator usability.
    Animation duration 300 ms Below 200 ms looks jittery on Unified Panels; above 600 ms feels sluggish.
    Process screen SlideIn_Master The master screen created in Step 1.
    Show tag Leave empty for now Engineered instance is sufficient for the multi-instance trick.

Step 3 - Create the instance layouts inside the master screen

  1. Open SlideIn_Master.
  2. Build the first instance, for example a recipe quick-edit panel, and place every object of that instance on Layer 1. Open the layer dialog via View > Layers in the WinCC editor menu.
  3. Switch to Layer 2 (click the layer dropdown or use the layer dialog) and build the second instance, for example an alarm filter.
  4. Switch to Layer 3 and build the third instance, for example a maintenance sign-in dialog.
Layer vs. visibility: Layers are an engineering-time concept in WinCC TIA. They help the developer author overlapping content without the editor fighting with object selection. They are not runtime objects. The runtime stacking order is determined by the order in which the objects are created in the screen; layers do not affect z-order at runtime.

Step 4 - Add the visibility tag structure

  1. Create HMI tags in the HMI tag table. One Bool tag per instance keeps the logic simple and auditable. For a larger system you can pack all instance flags into a single Word or DWord and compare against constants, but the discrete tag approach is the easiest to troubleshoot.
Tag name Data type PLC connection Initial value Length
HMI_bShowInstanceA Bool %DB5.DBX0.0 (example) 0 1 bit
HMI_bShowInstanceB Bool %DB5.DBX0.1 (example) 0 1 bit
HMI_bShowInstanceC Bool %DB5.DBX0.2 (example) 0 1 bit
HMI_bSlideInActive Bool Optional; can be derived from OR of A..C 0 1 bit

Step 5 - Animate visibility of each instance

  1. Select every object that belongs to Instance A in SlideIn_Master. Use Edit > Select All on Active Layer if you kept clean layer separation.
  2. In the Properties window, expand Animations > Visibility.
  3. Add a new visibility animation. The appearance model differs slightly between TIA Portal V15/V16 and V17+:
    TIA Version Visibility configuration path Condition
    V15 / V16 Properties > Animations > Display > Visibility Tag HMI_bShowInstanceA = 1
    V17 / V18 / V19 Properties > Animations > Appearance > Visibility Tag HMI_bShowInstanceA = 1
  4. Repeat for Instance B with tag HMI_bShowInstanceB and for Instance C with tag HMI_bShowInstanceC.
  5. Set the shared close button to write 0 to all three tags on the Press event.

Step 6 - Show the slide-in container from the trigger buttons

  1. On the parent screen, place three buttons: Recipes, Alarms, Maintenance.
  2. On the Press event of the Recipes button, configure two actions in this order:
    1. SetBit on HMI_bShowInstanceA = 1
    2. SetBit on HMI_bShowInstanceB = 0
    3. SetBit on HMI_bShowInstanceC = 0
    4. Activate the slide-in object: Edit Screen > Activate via the ActivateScreen system function on the slide-in object, or use the ShowSlideInScreen helper script described in Step 7.
  3. Repeat for the Alarms button, setting only B high; and for the Maintenance button, setting only C high.
Mutual exclusion: The trigger button is responsible for clearing the other two flags before setting its own. If two instance tags are high at the same time, both instance layouts draw on top of each other because the slide-in container is a single screen. The animation system in WinCC does not automatically resolve overlap within a slide-in.

Step 7 - Optional: VBScript to keep state machine clean

For Unified Comfort Panels and PC Runtime, you can centralize the show logic into a script and call it from each button. This avoids forgetting to clear the other flags in the future.

' WinCC VBScript attached to a button's Click event
Sub ShowInstance(ByVal inst)
    ' inst is one of "A", "B", "C"
    SmartTags("HMI_bShowInstanceA") = False
    SmartTags("HMI_bShowInstanceB") = False
    SmartTags("HMI_bShowInstanceC") = False

    Select Case inst
        Case "A"
            SmartTags("HMI_bShowInstanceA") = True
        Case "B"
            SmartTags("HMI_bShowInstanceB") = True
        Case "C"
            SmartTags("HMI_bShowInstanceC") = True
    End Select

    ' Show the slide-in object (process function on the screen object)
    ShowSlideInScreen "SlideIn_Master"
End Sub

Call ShowInstance "A" from the Recipes button, ShowInstance "B" from Alarms, ShowInstance "C" from Maintenance. The script is editable in the HMI under Scripts > VB Scripts; it is not available on Classic Comfort Panels that target firmware V14 or earlier.

Tag Configuration and PLC Integration

The visibility tags can live entirely on the HMI side if the slide-in is a pure local UI function. If a PLC must know which instance is open (for example to suspend a recipe write while the maintenance dialog is open), the HMI writes the active instance index to a PLC tag. A typical mapping is:

PLC tag (S7-1500 example) Direction HMI tag Purpose
%DB5.DBX0.0 HMI → PLC HMI_bShowInstanceA Instance A active
%DB5.DBX0.1 HMI → PLC HMI_bShowInstanceB Instance B active
%DB5.DBX0.2 HMI → PLC HMI_bShowInstanceC Instance C active
%DB5.DBB1 HMI → PLC HMI_byInstanceIndex 0=none, 1=A, 2=B, 3=C
%DB5.DBX2.0 PLC → HMI HMI_bForceClose PLC requests close (alarm, ESD)

On the PLC side, evaluate mutual exclusion in the OB1 cycle so the controller never reacts to more than one instance being open. The SCL example below can be placed in a function block for clean separation:

// SCL - FB_SlideInArbiter (S7-1500)
IF #bForceClose THEN
    #bShowA := FALSE;
    #bShowB := FALSE;
    #bShowC := FALSE;
    #byInstanceIndex := 0;
ELSE
    // Highest instance wins, prevents flicker if two bits arrive
    // in the same PLC cycle.
    IF #bShowA THEN
        #byInstanceIndex := 1;
    ELSIF #bShowB THEN
        #byInstanceIndex := 2;
    ELSIF #bShowC THEN
        #byInstanceIndex := 3;
    ELSE
        #byInstanceIndex := 0;
    END_IF;
END_IF;

Layer Management in Engineering vs. Runtime

WinCC TIA offers up to 32 layers per screen. By default, layers 0 through 15 are visible at design time, and 16 through 31 are reserved for runtime system screens. Keep the instance layouts on distinct low-numbered layers so they all stay editable in the same screen view. If an object refuses to be selected, the layer is probably hidden in the layer dialog; toggle the layer's eye icon in the upper toolbar of the editor.

At runtime, layer order does not determine which instance is shown. Only the visibility animation matters. A common confusion is to believe that placing Instance A on layer 1 and Instance B on layer 2 forces Instance A to draw on top; in fact the order of insertion into the screen defines the z-order, and you can rearrange it with Arrange > Bring to Front / Send to Back in the editor.

Animation Timing and Performance

Visibility animations are evaluated every WinCC cycle (default 100 ms). The slide-in container itself is animated by the runtime based on the configured duration. To prevent the slide-in from animating empty, the visibility animations should toggle in the same cycle as the slide-in is opened. Place all SetBit actions in a single configuration block, as shown in Step 6, and avoid setting the visibility tag from a delayed event such as a value-change of a job tag.

Parameter Comfort Panel Unified Comfort Panel PC Runtime Adv / Prof
Default cycle 100 ms 100 ms 100 ms (250 ms recommended for very large projects)
Minimum animation duration 200 ms 150 ms 100 ms
Maximum instances in one slide-in Practically ~6 ~10 20+ (limit is screen complexity)
Scripting support VB / C only on PC runtime; panels limited JavaScript + VB VB / C / C#

Verification Procedure

  1. Compile the HMI and download to the target panel or PC runtime.
  2. From the parent screen, press the Recipes button. The slide-in should animate in from the configured edge and only the recipe controls should be visible.
  3. Press the close button. The slide-in should animate out, and all three instance tags should read 0 in the HMI tag diagnostics view.
  4. Press the Alarms button. Only the alarm-filter content should be visible inside the slide-in region.
  5. Switch rapidly between the three buttons. Confirm that no flicker occurs and that overlapping content never appears. If you see overlap, the visibility animation is not yet bound to its tag or the cycle time is too long.
  6. In the PLC, monitor DB5.DBB1 and verify that it reads 1, 2, or 3 corresponding to the active instance, and 0 when closed.
  7. Force-close from the PLC by setting HMI_bForceClose high. The slide-in should disappear and the PLC value should drop to 0.
  8. Open the HMI diagnostics page (System > System Information > Performance) and verify that the screen complexity is below 80 percent of the device limit. Visibility-animated content still counts toward complexity even when hidden.

Troubleshooting Matrix

Symptom Likely Root Cause Resolution
Slide-in never appears when button is pressed. The slide-in object itself is not being activated; the ShowSlideInScreen function is missing. Add a Show configuration step on the trigger button after setting the visibility tag, or call the script helper in Step 7.
Slide-in appears but the inside is empty. Visibility animations are not configured, or the tag is not connected to the correct PLC address. Re-check the animation binding in the Properties window and confirm the HMI tag value in the diagnostics view.
Two instance layouts are visible at the same time. Mutual exclusion logic is missing on the trigger button or the PLC. Clear all three tags before setting the active one. Apply the arbiter FB on the PLC side as well.
Object cannot be selected in the editor. Layer is hidden in the layer dialog. Open View > Layers and enable the eye icon for the layer containing the object.
Animation looks stuttery on a Unified Panel. Animation duration is below 150 ms or the cycle time is 250 ms. Increase duration to 250-400 ms; reduce cycle time in the runtime settings to 100 ms.
PLC reports instance index 0 even though slide-in is visible. HMI tags are not configured as PLC read/write, or the connection direction is wrong. Open the HMI tag properties and verify the PLC tag is mapped with HMI → PLC direction and a valid acquisition cycle.
Trigger from a global keyboard shortcut does not work. The shortcut is bound to a function key, but the function-key event is on the parent screen, not on the slide-in. Bind the function key on the parent screen, and within the function-key configuration call the same script used by the trigger button.
Project transfer reports "screen complexity too high". All instance contents are loaded into the master screen even when invisible, and the total object count exceeds the device limit. Combine instances with shared graphics; reduce the number of polygons, IO fields, and animations per instance; or move less-used instances into a separate popup screen that is loaded on demand.

Field-Proven Caveats

  • Visibility animations and the slide-in container's Show state are independent. Forgetting the Show action is the single most common reason this workaround fails on first deploy.
  • Do not place a slide-in screen inside another slide-in screen. TIA Portal allows it at design time, but the runtime ignores the nested slide-in and only the outer one animates.
  • The technique does not work for screens that must remain visible while the operator navigates to a different parent screen. The slide-in belongs to one parent and is destroyed when the parent is left. If you need a true global overlay, use a global screen with a permanent screen window instead.
  • Visibility animation is not a substitute for hiding objects via authorization. If sensitive buttons are inside one of the instance layouts, configure the operator authorization separately on each button.
  • On a Unified Comfort Panel running firmware V17 or earlier, JavaScript is not available. Use the VBScript variant in Step 7. From firmware V18 onward, JavaScript is fully supported and is preferred for new projects.

FAQ

How do I create more than one slide-in screen on the same TIA Portal HMI?

Use a single slide-in screen object as a container, place each logical instance on a different editor layer inside that container, and toggle the visibility of each instance's contents with a dedicated HMI Bool tag. The trigger button must clear the other instance tags before setting its own to keep the contents mutually exclusive.

What is the difference between a WinCC layer and a visibility animation?

A layer is an engineering-time stacking helper that lets the developer author overlapping objects without the editor fighting object selection. A visibility animation is a runtime binding between a tag value and whether an object is drawn. Layers have no effect at runtime; only visibility animations do.

Which TIA Portal versions support the slide-in screen object?

The slide-in screen object has been available since TIA Portal V14 for Comfort Panels and is supported through the current TIA Portal V19 on Comfort Panels, Unified Comfort Panels, and PC-based WinCC Runtime Advanced / Professional. Check the screen object catalog for the specific service pack of your TIA Portal installation.

Can the PLC know which slide-in instance is currently open?

Yes. Configure the HMI visibility tags with HMI → PLC direction. A second tag carrying the active instance index (1=A, 2=B, 3=C) can be derived on the PLC side using a simple arbiter function block, as shown in the SCL snippet in this article.

Why does the slide-in container appear empty after a download?

The visibility animation is either not configured, the tag is not connected to the PLC, or the trigger button is missing the ShowSlideInScreen call. Open the master screen, confirm the animation binding for each instance, and verify in the HMI diagnostics view that the visibility tag actually toggles when the button is pressed.

Back to blog