WinCC VBScript · Navigation · Faceplate Guide

WinCC VBScript Screen Navigation, Faceplates and Reusable Instances

Create consistent screen navigation and reusable motor, pump or valve detail views with validated equipment context and maintainable tag mapping.

Guide Overview

Supporting WinCC VBS GuideStudy time: 70 minutesDifficulty: Intermediate-Advanced

What You Will Design

  • Consistent picture, popup and faceplate navigation
  • Approved equipment-identifier and tag-prefix mapping
  • Reusable motor, pump or valve detail instances

WinCC VBScript screen navigation, faceplates and reusable instances

Learn how to open contextual detail views, pass approved equipment identity and reuse one screen design across several motors, pumps or valves.

Compatibility: Picture-window, popup and parameter-transfer APIs vary across WinCC Classic, Professional and TIA-based editions. WinCC Unified uses JavaScript. Verify navigation calls and object properties in the installed Siemens help.

1. Define the navigation architecture before scripting

Start with a screen map showing overview pictures, area displays, equipment details, modal dialogs and the path back to a known location. A script should implement this model rather than inventing navigation independently inside every button.

  • Use consistent Home, Back, Area and Close behavior.
  • Keep the current equipment identity visible in every detail view.
  • Avoid opening multiple uncontrolled copies of the same popup.

2. Choose between a full picture, picture window and popup

Display typeSuitable useDesign caution
Full pictureArea or process navigationPreserve orientation and return path
Picture windowEmbedded equipment detailManage instance context explicitly
Popup or dialogFocused diagnostics or parameter entryControl modality, position and duplicate instances
FaceplateStandardized equipment operationDefine a stable interface and version

3. Pass equipment context through an approved identifier

Instead of concatenating arbitrary operator input into tag names, map a known equipment identifier to an approved tag prefix.

Function ResolveMotorPrefix(ByVal equipmentId)
    Select Case CStr(equipmentId)
        Case "M101": ResolveMotorPrefix = "Plant1_M101"
        Case "M102": ResolveMotorPrefix = "Plant1_M102"
        Case "M103": ResolveMotorPrefix = "Plant1_M103"
        Case Else:   ResolveMotorPrefix = ""
    End Select
End Function

An allowlist prevents malformed names and makes the supported instances visible during review.

4. Prepare a reusable equipment context

Sub SelectEquipment(ByVal equipmentId)
    Dim prefix
    prefix = ResolveMotorPrefix(equipmentId)

    If prefix = "" Then
        HMIRuntime.Trace "Unknown equipment: " & CStr(equipmentId) & vbCrLf
        Exit Sub
    End If

    HMIRuntime.Tags("UI_SelectedEquipment").Write CStr(equipmentId)
    HMIRuntime.Tags("UI_SelectedPrefix").Write prefix
End Sub

Internal context tags are one possible pattern. Faceplate interfaces or picture-window properties may provide a cleaner supported mechanism in the installed release.

5. Bind the detail view consistently

The reusable view should read its approved context once, validate it and then bind captions, states and commands through a documented interface.

  • Display the equipment identifier and description prominently.
  • Use separate feedback and command tags.
  • Show unavailable or bad-quality states explicitly.
  • Reset stale context when the view closes.

6. Open the supported picture or popup

Use the documented WinCC function for the deployed edition. Keep the navigation request in one reusable function so version-specific calls are not duplicated throughout the project.

Sub OpenMotorDetail(ByVal equipmentId)
    Call SelectEquipment(equipmentId)

    'Call the supported picture-window or popup method here.
    HMIRuntime.Trace "Motor detail requested: " & _
        CStr(equipmentId) & vbCrLf
End Sub

7. Design multi-instance faceplate commands safely

A reusable faceplate should submit a request for the selected instance, not write directly to an arbitrary constructed tag.

  1. Resolve the selected instance against the approved equipment map.
  2. Verify the current view still represents that instance.
  3. Apply WinCC authorization and operator confirmation where required.
  4. Write the request to the documented interface.
  5. Display the PLC acknowledgment or rejection reason.

8. Prevent stale context and navigation faults

Failure modePrevention or diagnostic
Wrong motor details shownDisplay and trace the resolved identifier and prefix
Old popup context remainsInitialize context on open and clear it on close
Duplicate popupsCheck instance state before opening another
Object required errorConfirm active picture, window and exact object name
Navigation loop or dead endTest every entry, close and return path

9. Commission the reusable instance design

  • Test every approved equipment identifier.
  • Attempt an unknown identifier and confirm it is rejected.
  • Change screens rapidly and verify context does not cross between instances.
  • Test communication loss, user logout and PLC command rejection.
  • Document the faceplate interface, tag map and version.

10. Example: one motor faceplate for three conveyors

An overview contains motors M101, M102 and M103. Selecting a motor resolves its approved prefix, updates the internal context and opens the same motor-detail view. The faceplate displays feedback, mode and fault information for that instance while command requests still pass through PLC validation.

Frequently asked questions

Should tag names be built directly from operator input?

No. Resolve a selected equipment identifier through an approved map or supported faceplate interface.

Why use one reusable faceplate?

It provides consistent behavior and reduces duplicated screens, but it also requires disciplined context validation and version control.

Can the popup method be copied between all WinCC editions?

No. Navigation and popup APIs vary. Verify the exact method in the installed product documentation.

Get the WinCC VB Scripting syllabus

Request practical online, classroom or corporate training details.

Build reliable WinCC VBScript projects

Join practical online, classroom or corporate training.

Request Course Details
Verified learning pathway

Discuss WinCC VB Scripting Training

Explore practical WinCC VBS, SCADA, SQL reporting and industrial automation training options.

Content reviewed: 4 August 2026

☎ Call WhatsApp ✉ Email Enquire Now