Troubleshooting WinCC OPC Timeout Errors 1007006 and 1007008
WinCC Runtime environments connected to upper-level systems through OPC DA frequently exhibit progressive slowdown, unresponsive mouse input, and full system freezes when variable requests accumulate without being answered. The WinCC diagnostic log captures this exact signature through two paired event IDs: error code 1007006 (variable timeout) followed minutes later by error code 1007008 (EndAct timeout). When this pair repeats across multiple days in the same project, the workstation will eventually stop processing input and require a hard reboot. This article decodes the diagnostic file format, maps the error IDs to their WinCC runtime behavior, isolates the OPC and script execution root causes, and walks through field-proven remediation procedures.
Problem Description
On a WinCC station (project LIETTAMO) the operator reported the following reproducible failure mode:
- Runtime screens begin responding slowly to mouse clicks and keyboard input.
- Mouse cursor movement becomes jerky; pop-up windows take several seconds to appear.
- WinCC gradually becomes unresponsive and the OS itself starts freezing.
- The only recovery is a hard reboot of the WinCC station.
Inspection of the WinCC diagnostic directory revealed two repeating entries on every failure date:
255,11.03.2008,08:56:05:890,1007006,4,,LIETTAMO,SCRIPT,Variable KOE_1_VESI timeout
255,11.03.2008,08:57:05:968,1007008,4,,LIETTAMO,SCRIPT,EndAct Timeout
255,05.04.2008,11:47:42:359,1007006,4,,LIETTAMO,SCRIPT,Variable KOE_1_VESI timeout
255,05.04.2008,12:01:47:062,1007008,4,,LIETTAMO,SCRIPT,EndAct Timeout
The pattern is identical on both incident days, separated by approximately one minute between the variable timeout (1007006) and the script engine timeout (1007008). This is a classic OPC request back-pressure signature: WinCC issues a request for the external tag KOE_1_VESI, the OPC DA server fails to acknowledge it within the configured timeout, and the script execution context waiting on the read hangs until WinCC's internal action handler watchdog expires. Repeated occurrences exhaust the script thread pool and starve the Win32 message pump, which is why both the HMI and the underlying Windows desktop become unresponsive.
Understanding the WinCC Diagnostic File Format
Every WinCC station writes its runtime status into a comma-separated log file inside the project diagnose directory. Each line is an event record with the following positional fields:
| Field | Example Value | Meaning |
|---|---|---|
| 1 | 255 | State / severity class (255 = ERROR) |
| 2 | 11.03.2008 | Date (dd.mm.yyyy) |
| 3 | 08:56:05:890 | Time with milliseconds |
| 4 | 1007006 | Event / error code |
| 5 | 4 | Priority (0=system, 4=user/process) |
| 6 | (empty) | Reserved |
| 7 | LIETTAMO | WinCC project / computer name |
| 8 | SCRIPT | Source component (SCRIPT, GSC, OPC, DM, GRAPHICS, ALARM, etc.) |
| 9 | Variable KOE_1_VESI timeout | Human-readable message |
Filter the file by source component SCRIPT and look for repeated error IDs in the 1007xxx range. A non-empty source component on every entry confirms the failure originates inside the WinCC action/script handler rather than from a third-party OPC client or a graphics driver fault.
Error Code Reference
| Error ID | Component | Meaning | Typical Trigger |
|---|---|---|---|
| 1007006 | SCRIPT | Variable read request timed out | OPC tag not returned within configured action timeout (default 10 s) |
| 1007008 | SCRIPT |
EndAct timeout — the C-action / VBScript action wrapper did not complete within its watchdog window |
Action is blocked waiting on a synchronous variable read; runtime watchdog kills the action |
| 1007005 | SCRIPT | Tag not found / wrong data type in script | Spelling or namespace mismatch on HMIRuntime.Tags access |
| 80040154 | COM (HRESULT) |
REGDB_E_CLASSNOTREG — WinCC OPC Server class not registered with the Windows COM subsystem |
WinCC Server install corrupted, missing regsvr32 entries, or DCOM rights missing |
The hexadecimal form 0x80040154 is Microsoft's standard REGDB_E_CLASSNOTREG HRESULT. It surfaces when the OPC client (WinCC) tries to instantiate the WinCC OPC DA Automation Server (OPC.DA.Server) and the COM catalog has no CLSID entry. This often accompanies error 1007006 after a workstation rebuild or a Windows update that breaks DCOM.
Root Cause Analysis
The two failure scenarios below account for the majority of field incidents matching this signature. Diagnose which one applies before changing configuration.
Cause 1 — External OPC Server Not Responding
The tag KOE_1_VESI is mapped through an OPC DA channel from a third-party or higher-level SCADA. The WinCC action issues a synchronous read, the upper-level system does not return a value within the action timeout, and the action hangs. Subsequent actions queued on the same script thread accumulate until WinCC exhausts its dispatcher threads.
Symptoms:
- Variable timeouts correlate with network or controller outages on the upper-level system.
- Only specific tags (here
KOE_1_VESI) trigger 1007006 — other OPC tags update normally. - Errors disappear when the upper-level system is restarted.
Cause 2 — Script Holding a Synchronous Lock
A C-action or VBScript uses a blocking pattern such as:
' Anti-pattern: synchronous read inside a cyclic action
Sub OnTimeTrigger(ByVal Item)
Dim val
val = HMIRuntime.Tags("KOE_1_VESI").Read ' blocks if OPC is slow
HMIRuntime.Tags("KOE_1_VESI_DISPLAY").Write val
End Sub
If the OPC layer stalls, Read does not return. The action wrapper marks the script as still running, the watchdog emits 1007008, and the runaway action continues to consume a thread. Multiple such actions compound into the observed OS-level freeze.
Cause 3 — WinCC OPC Server Not Registered
When error 1007006 is accompanied by HRESULT 0x80040154, the root cause is a broken COM registration. This is independent of network health and must be fixed by re-registering the WinCC OPC components. Verify this branch first if the workstation has been recently patched, reimaged, or upgraded.
Step-by-Step Remediation
Step 1 — Confirm the Failing Tag in Isolation
Create a single-screen test picture that contains only one I/O field bound to KOE_1_VESI and one status field displaying the Quality Code returned by WinCC.
- Open WinCC Explorer and create a new picture
Diagnose_KOE_1_VESI.PDL. - Insert an I/O field with tag
KOE_1_VESI. - Insert a second output field configured as "Output" with the dynamic property
Quality Code. - Activate Runtime and observe whether the I/O field shows
---(bad quality) and the Quality Code shows0xC0(Bad - Comm Failure) or0x00(Good).
If Quality Code stays at 0xC0 while the upper-level system reports the tag as healthy, the OPC DA channel is the bottleneck — proceed to Step 2. If Quality Code is good but the action still hangs, the script is the bottleneck — proceed to Step 3.
Step 2 — Repair the OPC DA Channel
- Open
WinCC Explorer > Tag Management > OPC > OPC Groups. - Right-click the channel serving
KOE_1_VESIand select Properties. - Increase the Update interval for the affected group from the default 1 s to a value that matches the upper-level system's guaranteed response time (typically 2-5 s).
- Switch the group from "On Change" to "On Demand" if the tag is only read by scripts, not displayed on graphics. This prevents WinCC from polling when no consumer is active.
- On the OPC server side, verify that the tag
KOE_1_VESIis exposed with a valid Item ID, not stripped by a namespace prefix mismatch. - Run
OPC Scout(part of the SIMATIC NET / OPC Foundation test suite) and try to subscribe toKOE_1_VESIdirectly. If OPC Scout also fails, the fault is in the upper-level server.
Step 3 — Refactor Blocking Scripts
Replace every synchronous read inside a cyclic action with an asynchronous or buffered pattern:
' Recommended: event-driven trigger via tag change
Sub KOE_1_VESI_Change(ByVal Item)
Dim val
val = Item.Value ' cached snapshot, no network call
If Item.Quality = 0 Then
HMIRuntime.Tags("KOE_1_VESI_DISPLAY").Write val
Else
HMIRuntime.Tags("KOE_1_VESI_DISPLAY").Write 0
HMIRuntime.Trace "KOE_1_VESI bad quality: 0x" & Hex(Item.Quality) & vbCrLf
End If
End Sub
For actions that must poll, wrap the read in a bounded retry loop that never exceeds the watchdog window (default EndAct timeout is 10 s, configurable under Computer > Properties > Graphics Runtime > Actions):
Dim t0, waited
t0 = Timer
Do
If HMIRuntime.Tags("KOE_1_VESI").Quality = 0 Then
Exit Do
End If
waited = Timer - t0
If waited > 2 Then Exit Do ' never wait longer than 2 s inside action
Loop
Step 4 — Re-Register WinCC COM Components
If the diagnostic log shows HRESULT 0x80040154, the WinCC OPC Automation Server is unregistered.
- Close WinCC Runtime and stop the
CCAlgRtHmi,CCArchiveConn, andCCOPCServerservices. - Open an elevated command prompt.
- Re-register the OPC server binaries:
cd %ProgramFiles%\Siemens\Automation\WinCC\opc\binsrv regsvr32 /s OpcEnum.dll regsvr32 /s OPCDAAuto.dll regsvr32 /s SiemensOPCDAClient.dll - Restart the WinCC services and verify with
dcomcnfg.exethat theOPC DA ServerCLSID is present under Component Services > Computers > My Computer > DCOM Config. - Confirm DCOM launch and access permissions allow the WinCC user (typically
CCUseror the logged-on operator) to start the server.
Step 5 — Tune WinCC Dispatcher and Runtime Watchdogs
Open Computer > Properties > Runtime and adjust:
| Parameter | Default | Recommended | Effect |
|---|---|---|---|
Action timeout (EndAct) |
10 s | 5 s | Fail-fast on stuck scripts |
| Variable read timeout | 10 s | 3 s | Stops 1007006 storm |
| Graphics Runtime priority | Normal | High | Keeps UI responsive even when scripts stall |
| Maximum script actions | 1000 | 250 | Limits thread pool exhaustion |
Verification Procedure
After applying the steps above, prove the fix is durable before returning the station to production:
- Activate Runtime with the test picture from Step 1 open.
- Force the OPC DA server to stop responding (disconnect the network cable to the upper-level system).
- Confirm within the test picture that the Quality Code drops to
0xC0within 3 s and no new1007006line is appended to the diagnostic log for at least 10 minutes. - Restore network and confirm Quality Code returns to
0x00and the display value updates. - Repeat the fault injection three times in succession. If WinCC stays responsive through all three cycles, the dispatcher is no longer being saturated.
- Run the system for 72 hours under normal load. Compare the diagnostic log size and the count of
1007006/1007008lines to the baseline. A healthy station should produce zero such lines.
Performance Monitoring Recommendations
- Add an alarm logging message inside every script that catches a bad-quality read using
HMIRuntime.Trace. Tracing writes toWinCC_RT_<computername>.logunder<project>\diagnoseand gives you a per-tag history that the binary OPC channel log lacks. - Configure Windows Performance Monitor with the counters
\Process(CCAlgRtHmi)\% Processor Time,\Process(CCExplorer)\Thread Count, and\System\Context Switches/sec. A sustained thread count above 250 onCCAlgRtHmiindicates a leaking script thread. - Schedule a weekly task that rotates and zips the
diagnosedirectory. Rotated logs make it trivial to compare incident timestamps to operator shift reports.
Troubleshooting Matrix
| Symptom in Diagnose Log | Likely Root Cause | First Action |
|---|---|---|
| 1007006 only, single tag | OPC server slow for that tag | Increase group update interval, verify tag Item ID |
| 1007006 + 1007008 within 60 s | Script waiting on synchronous read | Refactor to event-driven trigger |
| 0x80040154 in OPC component log | WinCC OPC COM class unregistered | Re-register OPC server DLLs |
| 1007006 across all tags | OPC DA server process stopped | Restart WinCC OPC Server service |
| 1007006 + WinCC memory growth | Script loop allocating without releasing | Profile with WinCC apdiag tool |
| 1007006 coinciding with Windows update | DCOM permissions reset | Restore dcomcnfg launch & access policies |
FAQ
What does WinCC error 1007006 mean?
Error 1007006 is logged when a WinCC script's request for a tag value does not return within the configured action timeout (default 10 s). The companion source component is SCRIPT, and the human-readable message identifies the tag that failed (for example, Variable KOE_1_VESI timeout).
What does WinCC error 1007008 EndAct Timeout mean?
Error 1007008 fires when the C-action or VBScript wrapper around an action does not complete within the EndAct watchdog window. It almost always follows a 1007006 entry by a few seconds because the script was waiting on the OPC read that timed out. Reduce the EndAct timeout in the Computer's Runtime properties and refactor blocking reads.
How is HRESULT 0x80040154 related to WinCC OPC failures?
0x80040154 is the Microsoft COM error REGDB_E_CLASSNOTREG. It means WinCC tried to instantiate the WinCC OPC DA Automation Server but the class is missing from the COM catalog. Re-register the WinCC OPC server DLLs with regsvr32 and confirm DCOM launch/access permissions for the WinCC user account.
Can OPC timeouts really freeze the entire Windows desktop?
Yes. Each blocked script consumes one WinCC action-handler thread. WinCC reuses a bounded pool of these threads. When every thread is parked on a stalled OPC read, no further Win32 messages — including mouse moves, repaints, and key strokes — get serviced, which is why the OS appears to freeze until you reboot.
What is the default WinCC action timeout and where is it changed?
The default variable read timeout and EndAct timeout are both 10 s. Both are configured in WinCC Explorer under Computer > Properties > Runtime > Actions. For upper-level systems with guaranteed response times below 1 s, lowering the timeout to 3-5 s provides faster failure detection and prevents dispatcher starvation.