Overview
WinCC WebUX is the browser-based runtime delivered with WinCC V7.x and with WinCC Runtime Professional (TIA Portal). It is conceptually different from a WinCC client: the WebUX client is a stateless HTML5/JavaScript front end that talks to the WebUX server, where all picture rendering, tag processing, and script execution take place. This architectural split is the root cause of one of the most common configuration failures reported by integrators: a VBScript or ANSI-C function that runs correctly on a WinCC client or on the server's own WebUX preview, but does nothing when the same picture is opened from a remote browser.
WinCC V7.3 ships with WebUX, but the WebUX of V7.3 supports a strictly limited subset of dynamization. Scripts are not part of that subset. From WinCC V7.4 SP1 onward, WebUX gains VBScript support on a clearly defined set of events; from WinCC V8.0 / TIA Portal V15.1 and later (Runtime Professional), both VBScript and ANSI-C are available subject to the restrictions documented in the WinCC WebUX / RT Professional manual set. Any attempt to bind a script to a property change on an I/O field in V7.3 will silently fail; the tag is still updated, but the event handler never fires in the browser session.
This reference documents the version-by-version capability matrix, the server-side execution model that applies once scripts are enabled, the supported event list, the diagnostic function IsHmiRtWebUx(), and the migration path projects must follow when they want browser-based HMI behavior that depends on event-driven scripting.
Version Compatibility Matrix
| WinCC Version | WebUX Component | VBScript in WebUX | ANSI-C in WebUX | Notes |
|---|---|---|---|---|
| V7.3 | WebUX client (HTML5) | Not supported | Not supported | Use tag-based dynamization only. |
| V7.4 | WebUX client (HTML5) | Not supported | Not supported | Still limited to tags and standard dynamization. |
| V7.4 SP1 | WebUX client (HTML5) | Supported (selected events) | Not supported | First version with VBScript in WebUX. |
| V7.5 / V7.5 SP1 | WebUX client (HTML5) | Supported (extended event set) | Not supported | C-script runtime API not available. |
| TIA Portal V15.1 + RT Professional | WinCC RT Professional WebUX | Supported | Supported with restrictions | Server-side execution model. |
| TIA Portal V17 / V18 / V20 | WinCC RT Professional WebUX | Supported | Supported with restrictions | IsHmiRtWebUx() available. |
Why Scripts Fail in WinCC V7.3 WebUX
The WebUX front end in V7.3 was engineered around three principles:
- Zero installation on the client. The browser is the only runtime dependency.
- All picture logic evaluated on the server, never on the client.
- A static, deterministic dynamization model based on tag names and direct property mapping.
Property-change events (such as Output Value → Change on an I/O Field) require an interpreter to be embedded in the runtime. The V7.3 WebUX stack did not bundle the VBScript or ANSI-C interpreter for the client side, and the server-side picture engine in V7.3 only re-evaluated tags - it did not dispatch a script callback on tag-value changes triggered from a WebUX client. The result is that the property change is committed to the tag database, but no event subscription fires.
Symptoms to look for during commissioning:
- The tag value updates correctly in the WinCC Tag Management and in the WinCC client.
- The VBScript function never executes when the change is performed in the WebUX session.
- No entry appears in the WinCC diagnostic files (
WinCC_Sys_<date>.log,WinCC_RT_<date>.log) because the script dispatcher is never invoked. - The same picture, opened from the WinCC client or from the WebUX preview on the server itself, executes the script normally - this is the diagnostic that confirms the binding is correct and the limitation is version-specific.
WebUX V7.4+ VBScript Architecture
From V7.4 SP1, scripts that are configured in the picture become available in the WebUX context, but the execution model is fundamentally different from a WinCC client:
- Scripts always run on the WebUX server. The browser is a thin client that subscribes to changes.
- When a user changes a value in a WebUX browser, the input is sent to the WebUX server, the server updates the tag, the server fires the bound event, and the server-side script executes. The browser receives the resulting picture diff and re-renders.
- This means scripts that rely on local client resources (file system on the client, local printer dialogs, OCX controls, ActiveX) cannot be reused unchanged. They must be reviewed for server-side compatibility.
- Scripts that rely on long-running blocking calls degrade WebUX performance. Aim for sub-100 ms execution; anything longer should be moved to a triggered background task or a WinCC global script scheduled in the server's task system.
The WebUX server does not load balance scripts across multiple sessions the way a clustered WinCC server does for tag management. In a redundant WebUX pair, the preferred server handles the script execution; on failover, the script subscription is re-established against the new preferred server without operator intervention.
Supported Event Surface for VBScript in WebUX
The event surface in WebUX is intentionally narrower than on a WinCC client. The following bindings are supported in WinCC V7.4 SP1 and later, and correspond to events that the WebUX server can observe:
| Object | Event | WebUX V7.4 SP1 | WebUX V7.5 / RT Professional |
|---|---|---|---|
| I/O Field | Output Value → Change | Yes (VBScript) | Yes |
| I/O Field | Input Value → Change | Yes (VBScript) | Yes |
| Button | Click | Yes (VBScript) | Yes |
| Slider / Bar | Value change | Yes (VBScript) | Yes |
| Picture Window | Open / Close | Limited | Yes |
| Screen / Faceplate | Open / Close | Limited | Yes |
| Custom OCX / ActiveX | Event | Not supported | Not supported |
Configuring an I/O Field Output Value Change Script for WebUX
The original configuration referenced in the field report is the canonical example. The following procedure upgrades it for V7.4 SP1 and later.
- Open Graphics Designer and load the picture that contains the I/O Field.
- Select the I/O Field and open Properties → Events.
- Navigate to Property Topics → Output/Input → Output Value → Change.
- Right-click the action icon, choose VBS Action, and assign a procedure from the project script library (do not paste anonymous code into the property).
- Reference tags by their symbolic name (for example
HMIRuntime.Tags("MyTag")) so the picture remains portable between the WinCC client and WebUX. - Compile the project with Rebuild All in the WinCC Explorer; the WebUX server only sees scripts that were part of a clean build.
- Start WebUX on the server and test the same action from a remote browser session.
Sample procedure bound to Output Value → Change:
Sub OnOutputValueChange(ByVal Item)
Dim sValue
sValue = Item.OutputValue
HMIRuntime.Trace "WebUX I/O field change: " & sValue & vbCrLf
' Example: set a derived tag
HMIRuntime.Tags("DerivedTag").Write sValue
' Example: gate logic by runtime context
If IsHmiRtWebUx() = True Then
' Branch executed only when the picture is rendered in WebUX
HMIRuntime.Tags("Log_WebUX_Touch").Write 1
End If
End Sub
Using the IsHmiRtWebUx() Runtime Check
ANSI-C scripts in WebUX include the helper IsHmiRtWebUx(), a function of type BOOL. It returns TRUE while the picture is being rendered in the WebUX environment and FALSE on a WinCC client. Use it to branch logic that must behave differently depending on whether the user is on a browser or a client:
BOOL bIsWebUx = IsHmiRtWebUx();
if (bIsWebUx)
{
// Server-side only path; e.g. queue a message to the central log
LogWebUxEvent("User changed setpoint");
}
else
{
// Native client path; e.g. update local faceplate
UpdateFaceplate();
}
Reference: Siemens Support entry 109481796 – Special features of WinCC/WebUX configuration. The same entry ships the attached PDF WebUX Controls Scripting (109481796_WebUX_Controls_Skripting_en.pdf), which lists the control events that propagate to the server.
Supported VBScript and ANSI-C Functions in WebUX
The Runtime Professional / WebUX documentation enumerates the supported API surface. Functions are classified as supported, supported with restrictions, or not supported. The headline rules are:
| API Group | Example | Status in WebUX |
|---|---|---|
| Tag read/write | HMIRuntime.Tags("X").Read / .Write | Supported |
| Tag trigger / direct connection | Direct connection with script trigger | Supported with restrictions |
| Picture / screen navigation | HMIRuntime.BaseScreenName | Supported |
| Logging (alarm / tag) | Alarm logging functions | Supported with restrictions |
| File system | FileSystemObject | Server-side only; not in browser |
| Local printer dialog | CommonDialog | Not supported |
| OCX / ActiveX | Custom control events | Not supported |
| Animation cycles | Local frame loop | Server-side; client receives rendered frames |
For the authoritative list see Functions supported in WebUX (RT Professional) – WinCC V20 documentation and Supported dynamization functions in WebUX (RT Professional) – WinCC V20 documentation.
Migration Path: V7.3 Project → V7.4 SP1 or Later
Projects that were designed against V7.3 and now need browser-based event scripts should follow this sequence:
- Verify the WinCC license. WebUX VBScript support requires the WebUX option license on top of the WinCC base license, plus the script engine license bundle added in V7.4 SP1.
- Open the project in the V7.4 SP1 (or newer) WinCC Explorer. Project migration triggers a one-way upgrade; keep a backup of the V7.3 source.
- Audit every script that targets an event. Move anonymous VBS code into named procedures in the project script library. Anonymous in-line actions are not portable.
- Replace client-specific calls (local paths, local printers, COM/OLE automation) with server-side equivalents. Document every replacement in the project release notes.
- Add the
IsHmiRtWebUx()branch to scripts whose behavior must differ between WebUX and WinCC client. - Rebuild the project. Confirm that Scripts\Test in WinCC Explorer passes without errors.
- Activate the runtime, then connect to WebUX from at least two different browsers (Chrome, Edge, Firefox) to verify the script fires in each.
Troubleshooting Matrix
| Symptom | Likely Cause | Diagnostic Step | Resolution |
|---|---|---|---|
| Script runs in WinCC client, ignored in WebUX browser | WinCC version is V7.3 / V7.4 (no SP) | Check WinCC Explorer → Help → About | Upgrade to V7.4 SP1 minimum |
| Script never fires, no log entry | Event not in WebUX supported set | Cross-check event in WebUX Controls Scripting PDF | Move logic to a supported event or to a global script trigger |
| Tag updates but no side effect | Anonymous in-line action used | Open the property; check for @ prefix in code | Move code into a named procedure in the project script library |
| Script fires once, then stops | Project was not rebuilt after script edit | WinCC Explorer → Scripts → Rebuild All | Rebuild and re-activate runtime |
| WebUX login prompt blocks automated test | No auto-login mechanism | Test from a fresh browser session | Implement the WebUX auto-login pattern documented on the Siemens forum repository webux-auto-login |
| Slow response on tag change | Script blocks > 100 ms on server | Time the script via HMIRuntime.Trace
|
Move heavy logic to a scheduled global script |
| C script does not compile under WebUX | Function outside the supported API | Compare against the supported functions reference | Replace with a VBScript equivalent where available |
Verification Procedure
- Activate the runtime in WinCC Explorer. Wait for the status icon to turn green.
- Open a Chrome or Edge browser on a remote workstation. Navigate to
https://<webux-server>/WebUX/(the exact URL pattern is defined by the WebUX configuration; default ishttp://<server>/WinCC/WebUX/for HTTP or the HTTPS equivalent after certificate configuration). - Log in with a WinCC operator account. The WebUX login screen is mandatory and uses WinCC user administration.
- Open the picture that contains the I/O Field. Change the value.
- Confirm via
HMIRuntime.Traceoutput in the WinCC diagnostic files that the script was invoked on the server. - Confirm via tag inspection in WinCC Tag Management that the side-effect tag (for example
DerivedTagin the sample above) was written. - Open a second browser session as a second user. Confirm that script invocations from both sessions remain isolated - the WebUX server must not cross-pollute sessions.
- Force a redundant failover (if a redundant WebUX pair is in use) and re-verify the script fires after failover.
Performance and Capacity Notes
Each WebUX script execution is a server-side job. Sizing rules of thumb for a single WebUX server with VBScript and ANSI-C enabled:
- Up to 50 concurrent WebUX clients on a hardware class that already supports 50 WinCC clients.
- Script dispatch latency budget: 100 ms p95; 250 ms p99. Anything outside this budget indicates a script that should be re-factored.
- Global script cycles (1 s, 5 s, 10 s) configured on the server continue to run; their effect is visible in the browser, but they do not consume browser CPU.
FAQ
Does WinCC V7.3 support any scripting in WebUX?
No. WinCC V7.3 (and V7.4 without SP) WebUX supports only tag-based dynamization. VBScript on supported events is introduced in V7.4 SP1. If you need script-driven logic in a browser, upgrade the project to V7.4 SP1 or later.
Where does the VBScript run when triggered from a WebUX browser?
The script always runs on the WebUX server, never on the client browser. The browser submits the operator action, the server updates the tag, the server fires the bound event, and the server-side VBScript executes. The browser receives the resulting picture change.
How can I detect inside a C script whether the picture is rendered in WebUX?
Call the helper IsHmiRtWebUx() (BOOL). It returns TRUE in WebUX and FALSE on a WinCC client. The function is part of the supported API documented in Siemens Support entry 109481796.
Why does my I/O Field event script work in the WinCC client but not in WebUX?
For V7.3 and V7.4 (no SP) the WebUX stack does not include the VBScript dispatcher for property-change events. The tag updates, but the script is never invoked. Move the project to V7.4 SP1 or later, rebuild, and re-test from a remote browser session.
Can I use C scripts in WebUX?
Yes, but only with restrictions and only on Runtime Professional / WebUX versions that include the C scripting engine (TIA Portal V15.1 onward for RT Professional, and equivalent WinCC V7.5 SP1 onward configurations). Pure WebUX in V7.4 SP1 supports VBScript only. C scripts must be written defensively using IsHmiRtWebUx() to gate functionality that is not available in the browser context.