Overview
ActiveX (OCX) controls extend the runtime behavior of Siemens WinCC Flexible and the successor WinCC Comfort/Advanced (TIA Portal) HMI projects with custom COM-based objects such as calendars, file dialogs, charting OCXes, vendor-specific drivers, and third-party visualization widgets. When an ActiveX control is referenced in a screen, script, or alarm configuration but the underlying OCX file is not registered on the host that opens the project (engineering station) or the runtime target (Panel, RT PC, or WinCC Flexible Runtime), WinCC produces a hard failure during compile, transfer, or runtime startup. Typical symptoms include the runtime popup "The control is not installed", missing graphics, blank object frames, or the screen refusing to load entirely.
This reference covers the full OCX lifecycle for WinCC Flexible 2008 SP2/SP3/SP4/SP5 and the migration path into TIA Portal V13–V18 WinCC Comfort/Advanced, including registration on 32-bit and 64-bit engineering workstations, target deployment to SIMATIC Panels (e.g., KTP, TP, MP, Comfort), and the blocking semantics introduced when ActiveX calls are chained from VBScript. Each procedure uses the official Siemens support entry 37022154 as the authoritative registration procedure and cross-references Microsoft ActiveX policy guidance from Microsoft Office support where IE-based hosting applies.
Problem Identification
ActiveX-related failures in WinCC Flexible manifest in three distinct phases:
Engineering Phase (Configuration PC)
- Symbol not found in SmartRepository / Library: The OCX appears under Controls > ActiveX in the WinCC Flexible toolbox but cannot be inserted; tooltip shows "Class not registered".
- Compile error 130001 / 130002: Generated when an ActiveX wrapper references a missing typelib (TLB) or missing dispatch interface (IDispatch).
- Project opens but screens show red X / question mark: Indicates the ActiveX control was registered on the original programmer's PC but the OCX file or its registry entries are missing on the current workstation.
Transfer Phase
- ProSave transfer aborts at 87%: Caused by unsupported OCX in the runtime image; the panel's firmware rejects the ActiveX container.
- CompactFlash / USB transfer warning: "Component <OCXNAME> cannot be transferred" when the target firmware does not bundle the OCX runtime.
Runtime Phase (Panel or PC Runtime)
- Popup: "The control is not installed on this device." This is the canonical error produced when the OCX is present in the project but unregistered on the runtime host.
- Runtime freezes / script timeouts: A blocking COM call inside the ActiveX stalls the entire VBScript queue, blocking alarm logging and screen switching.
- Black screen after change: After a screen change to the ActiveX host screen, no further events fire until the device is rebooted.
Root Cause Analysis
ActiveX controls require two parallel artifacts to function on Windows-based hosts:
-
The OCX/DLL binary physically present in a directory on the file system (commonly
C:\Windows\System32on 32-bit Windows,C:\Windows\SysWOW64on 64-bit Windows for 32-bit OCXes). -
COM registry entries under
HKEY_CLASSES_ROOT\CLSID\{GUID}andHKEY_CLASSES_ROOT\TypeLib\{GUID}that map the ProgID to the binary path and the IDispatch interface.
When a project is copied from one engineering PC to another, or compiled on a station that never had the third-party control installed, the binary is missing and/or the registry hive has no record of the CLSID. The most frequent root causes observed in field deployments are:
| Root Cause | Symptom | Detection Method |
|---|---|---|
| OCX copied but not registered | Class not registered at compile | Inspect registry: regedit → HKCR\CLSID\{GUID}
|
| OCX registered only on 32-bit view of 64-bit OS | Works in WinCC Flexible (32-bit), fails in any 64-bit host app | Check both SysWOW64 and System32 paths |
| OCX present but blocked by IE ActiveX policy | Runtime shows blank frame on PC Runtime | IE → Internet Options → Security → Custom Level → ActiveX controls marked safe for scripting |
| WinCC Flexible version mismatch with OCX | Transfer rejected, firmware rejects OCX | Compare OS / firmware compatibility list in WinCC Flexible Readme |
| Script calls OCX synchronously | Entire runtime blocks when OCX hangs | Insert logging before/after OCX call in VBScript |
| Project migrated from another PC | Screens render with red X placeholder | Check Project > Used OCX inventory |
The Siemens support article 37022154 explicitly states that every OCX referenced by the project must be present on both the engineering station and on each runtime target, and that the registration must be performed with elevated rights using RegSvr32.
Prerequisites
Before registering an OCX in a WinCC Flexible environment, confirm the following:
-
Administrator privileges: Both interactive admin (engineering PC) and full admin on the runtime target. Standard users cannot write under
HKEY_CLASSES_ROOTor to%SystemRoot%\System32on modern Windows builds. -
WinCC Flexible installation media or installed runtime: Required to confirm which OCXes are bundled by Siemens (e.g.,
Microsoft Date and Time Picker,Microsoft Common Dialog Control) versus third-party OCXes supplied by the original project author. -
Original OCX installation package: For proprietary OCXes (vendor or custom), obtain the install media or the OCX plus its
.depdependency manifest from the project originator. -
Matching bitness: WinCC Flexible 2008 SP2–SP5 and WinCC Comfort/Advanced are 32-bit applications even on 64-bit Windows. Therefore the OCX must be 32-bit and must be registered to the 32-bit COM hive (
SysWOW64\regsvr32.exeon a 64-bit OS). -
PowerShell or CMD with administrator elevation: Used for executing
regsvr32and verifying registry entries. - ActiveX hosting rights (PC Runtime only): On Windows 7 and later, the host process must have permission to instantiate COM objects. Refer to Microsoft ActiveX settings guidance for the policy framework that may block instantiation.
%SystemRoot%\SysWOW64\regsvr32.exe for 32-bit OCXes, never the native %SystemRoot%\System32\regsvr32.exe.Step-by-Step: Register an ActiveX OCX on the Configuration PC
The procedure below follows Siemens support entry 37022154 verbatim, with field-proven additions for 64-bit hosts.
Step 1 – Locate the OCX file
- Determine the OCX filename and GUID from the WinCC Flexible project: Project → Used OCX lists every referenced control with its CLSID.
- Copy the OCX (e.g.,
MyVendorCtrl.ocx) intoC:\Windows\SysWOW64\on a 64-bit OS, orC:\Windows\System32\on a 32-bit OS.
Step 2 – Register with RegSvr32
- Open Start > Run, type
cmd, press Ctrl+Shift+Enter to launch an elevated command prompt. - On a 64-bit Windows host, navigate to the 32-bit registration binary:
cd /d %SystemRoot%\SysWOW64 - Register the OCX:
regsvr32 MyVendorCtrl.ocx - On success, Windows displays "DllRegisterServer in MyVendorCtrl.ocx succeeded." If the dialog reports "module failed to load", the OCX has unresolved dependencies (typically a runtime DLL such as
MSVCR120.dllorMFC42.dll). Install the redistributable and retry.
Step 3 – Verify the CLSID is present
- Open
regeditas administrator. - Navigate to
HKEY_CLASSES_ROOT\CLSID. - Search for the GUID listed in Used OCX. The default value must point to the OCX path, and an
InprocServer32subkey must exist with the same path.
Step 4 – Insert the ActiveX in the WinCC Flexible project
- In WinCC Flexible ES, open the screen, select Controls > ActiveX from the toolbox.
- The registered OCX now appears in the list under its ProgID. Drag it onto the screen.
- Configure the interface in the Properties window; the IDispatch methods exposed by the OCX become available in VBScript via the object's name.
Step 5 – Compile and test locally
- Compile the project with Project → Compiler → All.
- Launch WinCC Flexible Runtime locally to verify the control renders and responds to input.
Step-by-Step: Deploy the OCX to a SIMATIC Panel Target
Most SIMATIC Panels (KTP, TP177, MP277, Comfort Panels) ship with a fixed runtime image. Only a subset of OCXes are bundled in the firmware; refer to the panel's Readme for the supported list. For OCXes not bundled by Siemens, two deployment paths exist:
Path A – OCX Already Supported by Panel Firmware
- Insert the ActiveX into the project as described above.
- During transfer, ProSave bundles the necessary runtime support automatically.
- Transfer with Project → Transfer → Panel.
Path B – Custom OCX on PC-based Runtime (WinCC Flexible RT or WinCC RT Advanced)
- Copy the OCX to the runtime PC's
SysWOW64directory. - Register with elevated
regsvr32exactly as in the configuration procedure. - If the runtime runs as a service, restart the WinCC Flexible Runtime service so the COM catalog is re-read.
- On Windows 7 / Server 2008 R2 and later, ensure the Desktop Experience feature is installed; the COM subsystem requires it.
Path C – Comfort Panel OCX Plug-in (TIA Portal)
Starting with TIA Portal V14 and WinCC Comfort/Advanced V14 SP1, Siemens supports signed OCX plug-ins for Comfort Panels via the Add-In mechanism. The OCX must be signed with a Siemens-issued certificate and packaged with Simatic_OCX_Tool.exe. Deploy the resulting .zip via the panel's Service → Add-Ins menu.
Script Blocking Considerations with ActiveX
When a VBScript in WinCC Flexible calls a method on an ActiveX control, the call is synchronous: the script engine blocks until the COM method returns. If the OCX implements a long-running operation (network I/O, blocking dialog, hardware polling), the entire WinCC Flexible Runtime script host is blocked. Consequences include:
- Alarm logging delays: The alarm subsystem shares the script dispatcher; an OCX that hangs for >5 seconds delays alarm acknowledgment across all screens.
-
Screen change freeze:
ActivateScreencalls queued behind the blocked OCX do not fire. - Watchdog reset: Most panels reboot after 60 seconds of script-thread starvation.
Mitigation patterns:
' Pattern 1: Defensive timeout using a Timer control
Dim startTick
startTick = Now
Do While ocxCtrl.Busy = True
If DateDiff("s", startTick, Now) > 3 Then
SmartTags("OCX_Timeout") = True
Exit Do
End If
Loop
' Pattern 2: Asynchronous dispatch via separate scheduled task
SmartTags("OCX_Request") = True ' consumed by a scheduled VB script running every 500 ms
CommonDialog.ShowOpen) from an OCX wrapper on a Panel Runtime. The dialog blocks the entire HMI process and cannot be dismissed by touch. Use the WinCC Flexible built-in file browser instead.Project Migration: Moving a WinCC Flexible Project Between PCs
Migrating a project that contains ActiveX references is the most common trigger for "The control is not installed" errors. Follow this disciplined procedure:
- Inventory the original project: Project → Used OCX. Export the list to CSV.
-
Export the OCX binaries from the original PC's
SysWOW64or the vendor install directory. - Document dependencies: Use Dependency Walker to capture the OCX's required DLLs (MSVC runtime, MFC, ATL).
-
Install the OCX on the new configuration PC using the vendor's installer if available; otherwise use the manual
regsvr32procedure. - Re-link CLSIDs: Some ActiveX controls store absolute CLSID references in the HMI tag database. Open the project, re-insert each control once, and re-bind the VBScript references.
- Compile with Project → Compiler → All (with full rebuild). A partial compile may reuse stale cached wrappers.
ActiveX Security Settings and Group Policy
On PC-based runtimes (WinCC Flexible Runtime, WinCC RT Advanced), the OCX host is the same WebBrowser control used by Internet Explorer. ActiveX security policy therefore applies. Configure the following to allow COM instantiation from the runtime process:
| Policy | Location | Recommended Value for HMI PC |
|---|---|---|
| Initialize and script ActiveX controls not marked as safe | IE → Internet Options → Security → Custom Level | Enable (or Prompt, with unattended runtime set to Enable via registry) |
| Run ActiveX controls and plug-ins | Same as above | Enable |
| Script ActiveX controls marked safe for scripting | Same as above | Enable |
| ActiveX per-site policy | IE Maintenance → Security → Security Zones | Add runtime as Trusted Site if hosted via web navigator |
| Office file ActiveX gating | Backstage view → Enable Content | Only relevant when WinCC exports logs as Office documents |
For runtime hosts that publish HMI screens via WinCC WebNavigator, Microsoft documents the ActiveX gating workflow at Enable or disable ActiveX settings in Office files. The same KB article applies to the WebNavigator client OCX plug-in.
Troubleshooting Matrix
| Error / Symptom | Probable Cause | Diagnostic | Remediation |
|---|---|---|---|
| "The control is not installed on this device." at runtime | OCX not registered on target | ProSave → Device → Check OCX list | Run regsvr32 on target with elevation |
| Red X on screen after migration | Project references CLSID not on new PC | Used OCX list vs registry | Register missing OCX, re-insert in screen |
| Transfer aborts at 87% | Panel firmware rejects unsupported OCX | Compare panel firmware version vs OCX support list | Update panel firmware or remove OCX |
| Runtime freezes for 30–60 s | Blocking COM call inside VBScript | Add logging around OCX invocation | Refactor to asynchronous pattern, add timeout |
| OCX works in ES but not in Runtime | Runtime lacks matching dependency DLL | Dependency Walker on runtime host | Install matching VC++ redistributable |
| Compile error 130002 | Typelib mismatch after OCX upgrade | Inspect Used OCX GUID changes | Re-insert OCX, re-bind all script references |
| Dialog "Allow blocked content" on every start | OCX not marked safe for scripting | IE security log | Sign OCX or set IE zone policy to Trusted |
| Class not registered (64-bit host) | OCX registered only in 32-bit hive | Check both SysWOW64 and System32 regsvr32 | Always use %SystemRoot%\SysWOW64\regsvr32.exe
|
Verification Procedure
- Configuration-side verification: Compile the project with full rebuild; confirm zero warnings referencing ActiveX. Open Runtime Simulator (Start → Programs → Siemens → WinCC Flexible → Runtime Simulator) and exercise the OCX.
-
Registry verification:
reg query HKCR\CLSID\{GUID} /sfrom an elevated CMD must return the OCX path and InprocServer32 subkey. -
Target-side verification: On the panel, navigate to Service → Information → OCX (where supported) and confirm the CLSID appears. On a PC Runtime, launch
dcomcnfgand inspect the COM catalog. - Functional verification: Drive the OCX from a VBScript bound to a button event; confirm the call returns within <1 s and the screen remains responsive.
- Regression verification: Force a screen change to the OCX host screen, then immediately back, 50 times; confirm no orphan timers or stuck script threads.
Parameter Reference Table
| Parameter / Tool | Value / Path | Notes |
|---|---|---|
regsvr32 path (32-bit OCX, 64-bit OS) |
%SystemRoot%\SysWOW64\regsvr32.exe |
Mandatory: WinCC Flexible is 32-bit |
regsvr32 path (32-bit OCX, 32-bit OS) |
%SystemRoot%\System32\regsvr32.exe |
Single registry hive |
| Common OCX default location | C:\Windows\SysWOW64\ |
For all 32-bit OCXes on 64-bit Windows |
| OCX typelib registry hive | HKCR\TypeLib\{GUID} |
Must exist for VBScript to enumerate methods |
| CLSID registry hive | HKCR\CLSID\{GUID} |
Main COM class registration |
| WinCC Flexible ES version | 2008 SP2 / SP3 / SP4 / SP5 | SP5 final release; migration to TIA Portal recommended for new projects |
| WinCC Comfort/Advanced (TIA Portal) | V13–V18 | OCX plug-in support from V14 SP1 |
| Siemens KB article | 37022154 | Authoritative registration procedure |
| Microsoft ActiveX reference | Microsoft Office support | Host-level ActiveX gating |
Best Practices and Field Notes
-
Document every OCX at project creation time: filename, GUID, version, vendor, bitness, and dependency list. Store in a project
VENDOR.mdnext to the.hmisource. - Avoid blocking calls: Treat every OCX method call as a candidate for timeout. Default to <3 s watchdogs.
- Prefer built-in controls: WinCC Flexible and TIA Portal Comfort/Advanced ship with native trend, alarm, recipe, and scheduler controls. Replace OCXes with these where possible to eliminate the COM dependency entirely.
- Use 32-bit OCXes only: WinCC Flexible is 32-bit; never attempt to register a 64-bit OCX.
- Test on the actual panel: Simulators hide firmware-level OCX constraints. Always validate on the target hardware before sign-off.
- Schedule OCX refresh: When a vendor releases a new OCX version, retest all screens; a minor GUID or interface change can break legacy projects silently.
How do I register an ActiveX OCX for WinCC Flexible on a 64-bit Windows engineering PC?
Open an elevated command prompt, navigate to %SystemRoot%\SysWOW64, and run regsvr32 YourOCX.ocx. WinCC Flexible is a 32-bit application, so the OCX must be registered in the 32-bit COM hive. Using the native System32\regsvr32.exe on a 64-bit OS will register to the 64-bit hive and WinCC will report "Class not registered". Confirm with Siemens support entry 37022154.
Why does WinCC Flexible show "The control is not installed" even though the OCX is on the panel?
The error means the OCX binary is missing or unregistered on the host that is opening or running the project. If the OCX is present in the project directory but unregistered, run regsvr32 with administrator rights. If the OCX is referenced from a project migrated from another PC, the original programmer's machine had the OCX registered but the file was not copied to the new workstation. Always copy both the OCX binary and any dependency DLLs (VC++ runtime, MFC, ATL) to the new PC before registering.
Can an ActiveX call from VBScript block the entire WinCC Flexible Runtime?
Yes. WinCC Flexible's VBScript dispatcher is single-threaded; a COM method that does not return within the script timeout (default approximately 60 seconds on most panels) will freeze alarm logging, screen changes, and tag updates, and may trigger a watchdog reboot. Always wrap OCX calls in a defensive loop with a <3 s timeout, or dispatch them via a scheduled script that polls a request tag every 500 ms.
Which SIMATIC Panels support custom OCX plug-ins?
Comfort Panels (TP700, TP900, TP1200, TP1500, TP1900, TP2200) running TIA Portal V14 SP1 or later support signed OCX plug-ins distributed as .zip add-ins via Service → Add-Ins. KTP, TP177, MP277, and older Panels do not support custom OCX plug-ins; only the OCXes bundled in the firmware are available. Verify against the specific panel's firmware Readme before assuming OCX support.
How do I enable ActiveX content blocked by Microsoft Office or Internet Explorer policy on a PC Runtime?
Open Internet Explorer → Internet Options → Security → Custom Level and enable Initialize and script ActiveX controls not marked as safe, Run ActiveX controls and plug-ins, and Script ActiveX controls marked safe for scripting. Add the runtime host to the Trusted Sites zone if the OCX is hosted via a WebNavigator URL. For OCX-bearing Office exports, follow the Enable Content workflow documented in Microsoft's ActiveX settings KB article. Always scope these policy changes to the HMI runtime account, never domain-wide.