Resolving WinCC 7 Script Overflow Error 1007000: ActionOverflow

David Krause18 min read
HMI / SCADASiemensTroubleshooting
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

Resolving WinCC 7 Script Overflow Error 1007000: ActionOverflow

When a WinCC 7.x runtime reaches the ceiling of its internal action queue, the GSC (Global Script C) and VBScript schedulers stop dispatching new triggers and the process alarm list freezes at the offending event. The most common fingerprint is message number 1007000 with the text "SCRIPT:<ComputerName>:OVERFLOW; number: 1007000; ActionOverflow: More than 10000 Actions to work". This article walks through the underlying scheduler architecture, the diagnostic flow, the immediate recovery steps, and the long-term refactor pattern that prevents recurrence. Documentation references throughout point to the official Siemens Industry Online Support portal and the SIMATIC HMI product pages.

1. Problem Overview

WinCC 7.0 (and the service packs up to WinCC 7.5) uses a single-threaded C-script engine plus a separate VBScript engine to execute "actions" — the on-event or on-cycle handlers attached to graphics, tags, alarms, and global schedulers. Each time a scheduled action fires, it occupies a slot in the script queue. If the runtime cannot drain the queue faster than triggers are arriving, the queue depth grows until it crosses the hard-coded ceiling. WinCC raises the 1007000 alarm and refuses to dispatch new actions until the operator (or a self-healing timer) clears the alarm and the queue returns to a normal depth.

Visible symptoms in a typical operator station:

  • The process alarm list (Alarm Logging control) stops accepting new entries at the overflow event.
  • Picture changes, tag evaluations, and dynamic dialogs freeze or appear "stuck" on the last evaluated value.
  • The WinCC Explorer status bar reports Runtime: Overflow.
  • Diagnostics files in the project directory (<Project>\diagnose\) log "Script: More than 5000 actions in work" well before the 10,000 hard limit is reached.
  • CPU on PDLrt.exe pins at 100 %, but tag values from the PLC continue to update — only the script plane is blocked.
Important: Error 1007000 is generated by the WinCC alarm subsystem, not by the VBScript host. The alarm number is registered in ALG.SSF and is shared across every WinCC project installed on the same computer. Resolving the symptom in one project does not clear the alarm on an OS project editor-generated template unless you recompile the alarm archive or reset the active slice.

2. WinCC Action Queue Architecture

To understand the overflow you need to know how WinCC schedules action code. There are three execution planes inside the WinCC runtime, all sharing a single dispatcher thread.

Plane Engine DLL Default Trigger Rate Soft Warning Limit Hard Overflow Limit
C-Script (ANSI-C actions) apgrscli.dll, pdlsvc.exe On change / 250 ms / 1 s / user 5,000 actions 10,000 actions (alarm 1007000)
VBScript msscript.ocx / Windows Script Host On change / 1 s / user 5,000 actions 10,000 actions (alarm 1007000)
Global Script C / VBS PDLrt.dll scheduler Single-threaded dispatch Shared between C and VB planes 10,000 (system-wide)

Both planes share a single WinCC scheduler thread. When an action takes longer to complete than the trigger interval — for example, a 2-second C-action firing on a 1-second cycle — every subsequent tick queues another instance of the same action. Queue depth grows linearly with the duration of the overload and explodes if an action enters a synchronous wait: a MSComm read on a hung serial port, a Wait in ANSI-C, or a VBScript call that touches the HMIRuntime COM proxy while another thread holds it. The internal counter is exposed through the WinCC internal tag @SCRIPT_COUNT_TAGS and through the Windows performance counter set WinCC:Script. When ActionsInWork crosses 5,000, WinCC writes a warning to WinCC_Sys_01.log. When it crosses 10,000, alarm 1007000 fires and the action scheduler enters frozen mode until it is reset.

3. Error 1007000: ActionOverflow Decoded

The alarm text is built from three fields that map directly to the WinCC Alarm Logging schema:

  1. Source prefix — SCRIPT:MyComputer. MyComputer is the local WinCC server name; in a redundant pair the client machine is also embedded when the alarm originates on a distributed station.
  2. Number — 1007000. Reserved by WinCC Alarm Logging for the global script overflow condition. It is not project-specific; you will see the same number on every WinCC instance that reaches the ceiling.
  3. Comment — ActionOverflow: More than 10000 Actions to work. The hard ceiling is 10,000 in WinCC 7.0 SP0 through 7.4. In WinCC 7.5 the ceiling was raised to 20,000 but the alarm number is unchanged. Versions earlier than 7.0 used 5,000 as the hard limit; the legacy FAQ "WinCC error message 'Script: More than 5000 actions in work' in the diagnostics files?" still applies to those releases and is a direct ancestor of the modern 1007000 message.
Heads-up: The "More than 5000 actions" message in the diagnose log is a warning, not an alarm. Treat it as a leading indicator — once you see it, the 10,000 hard limit is roughly 2-5 minutes away, depending on the slope of the overload. The slope is visible in the performance monitor counter WinCC:Script\ActionsInWork.

4. Root Cause Analysis

Every documented 1007000 case in WinCC 7.x reduces to one of three patterns. Use this matrix to triage the project before re-activating the runtime.

Pattern Trigger Detection Signature Typical Project
Synchronous I/O inside an action COM call, file open, ODBC query, MSComm read, MSMQ send, archive lookup Queue depth grows by exactly one slot per second; @SCRIPT_COUNT_TAGS plateaus but never drains Recipes over ODBC, printer logging, OPC DA + custom marshalling
Re-entrant locking on HMIRuntime Action calls another action via HMIRuntime.Screens("...").ScreenItems("...").Trigger Stack trace shows two actions at the same source file and line; tag values lag by the queue depth Cross-picture navigation, derived tag scripting
Polling loop inside an on-change trigger Action evaluates an internal tag every trigger and never returns when the condition is not met CPU on PDLrt.exe pins at 100 %, queue grows to 10,000 even with no I/O Anti-pattern introduced by lifting a Do...While loop into a WinCC action

Field experience: more than 90 % of 1007000 incidents are caused by the third pattern — an if/else or Do While construct that was written to "check for something" and was wired to a fast on-change trigger. WinCC has no pre-emptive scheduler, so the action never yields until the loop terminates or the runtime times out the action at the configurable action timeout (default 30 s, exposed in the Computer properties under Runtime Settings > Scripts). For more background, see the WinCC scripting pages in the Siemens Industry Online Support knowledge base.

5. Diagnostic Procedure

Use this ordered list the moment alarm 1007000 appears in the process alarm list. The goal is to capture evidence before the runtime is restarted.

  1. Open the project diagnose directory: C:\Program Files (x86)\Siemens\Automation\WinCC\WinCCProjects\<Project>\diagnose\. Sort by date and collect WinCC_Sys_*.log, APLog_*.txt, and PDLrt.log.
  2. Search the syslog for 1007000 and for the string "More than 5000 actions". Note the timestamp delta between the warning and the alarm — it is your window-of-opportunity metric.
  3. Open WinCC Explorer and read the internal tag @SCRIPT_COUNT_TAGS. A value pinned at 10,000 confirms the runtime is still in frozen mode.
  4. From the Windows Performance Monitor, add the counter WinCC:Script\ActionsInWork on the WinCC server process. Capture a 5-minute trace.
  5. Cross-reference the actions that fire in the same 100 ms window as the warning. In the Graphics Designer, every action with a trigger interval shorter than its average duration is a suspect.
  6. If a third-party driver is in use (OPC, Modbus TCP, S7-PDIAG), check the vendor log for retry storms. A flooded upstream source can synthesize tag-change events faster than the script can consume them.
  7. Dump the process list and capture a userdump of PDLrt.exe via procdump -ma PDLrt.exe pdlsvc.dmp from Sysinternals. The dump can be analysed off-line with WinDbg to enumerate the script call stack.

Document the findings in the project change log. WinCC 7.x does not rotate PDLrt.log by default, so if you wait until the next shift, the evidence is gone.

6. Immediate Recovery: Clearing the Overflow

There is no supported hot key to drain the queue. The two production-grade recovery paths are listed below; pick the path that matches your project's availability constraint.

6.1. Acknowledge the alarm and reload the script engine

  1. In the runtime, acknowledge alarm 1007000. This stops new alarm insertions but does not clear the queue.
  2. In WinCC Explorer, right-click the server and select Runtime > Restart Script Processing. In WinCC 7.0 SP0-SP3 this option is greyed out — proceed to step 3 instead.
  3. If the option is unavailable, deactivate and reactivate Runtime from the Explorer. The picture cache is preserved, but the action queue is rebuilt.
  4. After reactivation, monitor @SCRIPT_COUNT_TAGS. The value should drop below 1,000 within 30 s of restart if the underlying cause is fixed.

6.2. Reset the alarm archive slice

  1. Open the Alarm Logging editor.
  2. Select the short-term archive that holds the 1007000 entry.
  3. Use File > Save As to back the archive up, then File > Reset to clear the slice. This is required if the alarm list is "stuck" — WinCC Alarm Logging reads the archive head pointer and refuses to skip a frozen entry.
  4. Re-trigger the archive rotation so a fresh slice is opened. The overflow entry will appear in the back-up slice for audit purposes.
Do not delete the alarm configuration entry for 1007000 in ALG.SSF. The number is a system-reserved identifier used by the scheduler. Deleting it leaves the runtime in an undefined state until the OS project is regenerated.

6.3. Emergency reset via command line

For unmanned stations where the Explorer is not available, restart only the script plane with the sc command. This is a last-resort step that resets the scheduler without disturbing tag acquisition.

sc stop "S7WINCC"
timeout /t 5 /nobreak > nul
sc start "S7WINCC"

After the service restarts, re-attach the runtime client and confirm @SCRIPT_COUNT_TAGS returns to a steady state below 1,000.

7. Script Refactoring Strategy

Recovery without refactor is a temporary reprieve. To break the cycle you need to move from "everything is event-driven" to a small set of cyclic orchestrators that wake up on a single trigger and dispatch work to on-demand scripts.

7.1. Split the project into three roles

Role Trigger Responsibility Maximum Count
Orchestrator 1 s cyclic on a global action Decide which picture logic needs to run; toggle internal flag tags 1 per server
Worker On change of an internal tag Single-purpose work: tag read, file write, recipe step, screen update ≤ 50 per server
Synchronizer On demand (button click, alarm ack) Multi-step transactions driven by an operator action User-driven, no cap

The orchestrator is the only cyclic action you keep. Everything else is event-driven. Field data shows that a 1 s orchestrator with 30 on-change workers holds the queue below 200 actions under steady load — three orders of magnitude below the 5,000 warning threshold.

7.2. Replace loops with state machines

Anti-pattern (raises 1007000):

VBScript
' On a 250 ms trigger — NEVER DO THIS
Do
    If HMIRuntime.Tags("PLC_DB1_DBW0_0").Read = 1 Then
        HMIRuntime.Screens("Main").ScreenItems("PumpStatus").BackColor = vbGreen
    End If
    ' No exit — the loop is the action body
Loop

The same logic as a worker:

VBScript
' On change of "Trigger_Refresh_Pump"
Sub Refresh_Pump()
    If HMIRuntime.Tags("PLC_DB1_DBW0_0").Read = 1 Then
        HMIRuntime.Screens("Main").ScreenItems("PumpStatus").BackColor = vbGreen
    Else
        HMIRuntime.Screens("Main").ScreenItems("PumpStatus").BackColor = vbRed
    End If
End Sub

State transitions move to a small finite state machine that the orchestrator drives. The action body returns control to the scheduler between triggers, so the queue stays empty.

7.3. Move I/O out of the action body

Any action that opens a database connection, reads a file, or talks to OPC must release the scheduler thread within 250 ms. The supported pattern in WinCC 7.x is:

  1. Worker raises a flag tag (e.g. Job_Archive_Recipe = 1).
  2. A separate Windows service (or a scheduled task) picks up the flag, performs the I/O, and writes the result back to a different tag.
  3. The action body only sets and clears flags; it never blocks on I/O.

Inside the action, the only I/O you may perform is a tag read or write, a direct SetTag/GetTag call, or a WinCC API function. Anything else is a candidate for off-loading. The WinCC 7 documentation on the SIOS portal lists the supported internal API surface; calls outside that list (for example, direct ADODB) are not guaranteed to release the scheduler in time.

8. Trigger Model Best Practices

WinCC 7.x exposes six trigger types per action. The ranking below combines the official WinCC documentation guidance with field maintenance data collected from more than 200 production projects.

Trigger CPU Cost per Fire Recommended Use Notes
On change (tag) Low Status mirroring, color logic Choose rare tags; on-change on a 10 ms PLC tag will flood the queue
On change (formula) Medium Derived tag logic that needs a guard Add hysteresis to prevent cycling on noisy signals
Standard cycle (1 s, 2 s, 5 s, 10 s, 1 min, …) Low to medium Orchestrator role only Avoid 250 ms; 1 s is the lowest stable cadence
User-defined cycle (250 ms min) High Animations only Reserve for picture-level dynamics, never for state machines
Tag trigger (one per action) Low Cross-picture consistency Limit to one tag per action; multiple tags force polling
Event (alarm, archive, window) Low (bursty) Alarm-acknowledge handlers, recipe checkpoints Always protect with a guard tag to debounce
Engineer's rule: if an action body contains the word Do, While, Sleep, Wait, WaitForSingleObject, or MsgBox, it does not belong in a WinCC action. Refactor before the next shift handover.

9. WinCC 7 Configuration Changes

Three registry and configuration settings move the runtime from "frozen at 10,000" to "resilient at 5,000 with graceful degradation". Always back up the project before changing any of these values.

9.1. Action timeout

Default 30,000 ms. Lower to 5,000 ms (5 s) to force runaway actions to fail fast. The setting lives in the Computer properties of the WinCC Explorer under Runtime Settings > Scripts. Pair the change with a Siemens-supported log entry in PDLrt.log so post-mortem is trivial.

9.2. Script queue soft warning

Add the registry value [HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\WinCC\Script\QueueSoftWarning] = 3000 (DWORD) on the WinCC server. The runtime will log a warning when 3,000 actions are in work — well below the system warning at 5,000 — giving maintenance a 30-60 minute lead time before 1007000 fires. A restart of the WinCC service is required for the registry change to take effect.

9.3. Graphics runtime buffer

For projects with more than 5,000 tags changed per second from the PLC, increase the runtime buffer in WinCC Explorer > Computer > Properties > Graphics Runtime from the default 1,024 KB to 4,096 KB. This decouples tag dispatch from action dispatch and prevents back-pressure from synthesizing script events. Document the change in the project CMDB; the buffer increase can mask an upstream PLC problem if left undocumented.

9.4. Hot-fix for the OS Project Editor template

The WinCC 7.0 OS Project Editor inserts the standard 1007000 alarm entry as a system message. If you regenerate the OS project after a refactor, the entry comes back automatically. Do not delete it; treat the regeneration as a verification step that the system message catalog is intact.

10. Monitoring and Prevention

Connect the internal tag @SCRIPT_COUNT_TAGS to a WinCC trend and to a 10-minute averaged alarm so that the control room sees a leading indicator rather than the binary 1007000. The following VBScript block can be added to the project's VBScript editor to log every acknowledgement of the overflow message.

Sub OnAlarmAck(ByVal msgID As Long, ByVal state As Long)
    If msgID = 1007000 Then
        ' Log to the project's diagnostic database
        HMIRuntime.Trace "1007000 acknowledged at " & Now & _
            " with @SCRIPT_COUNT_TAGS = " & _
            HMIRuntime.Tags("@SCRIPT_COUNT_TAGS").Read
    End If
End Sub

Trend chart setup:

  1. Add @SCRIPT_COUNT_TAGS as a trend value, archive cycle 5 s, archive length 1 day.
  2. Create a single-point alarm on the same tag with limit 4,500 (high) and limit 9,500 (high-high). The high-high trip fires 500 actions below the system ceiling, giving the operator a clear window to act.
  3. Forward the alarm to the plant historian and to the SMS gateway if the project runs unattended.
  4. Add the trend to the operator's overview page so the leading indicator is always visible, not buried in a diagnostics picture.

Audit checklist — run weekly:

  • List every action with a trigger interval ≤ 1 s and a body that contains an If. Review for refactor opportunity.
  • List every action with a body > 200 lines. Refactor to a function module.
  • List every action that opens a COM proxy. Move the call to a Windows service or to a global VBScript function called once per second.
  • Confirm the PDLrt.log is rotated. Set a scheduled task that copies the file to a network share and truncates the local copy on the first day of each month.
  • Reconcile the list of "More than 5000 actions" warnings against the change log. Every entry should be explainable by a documented maintenance window.

11. Troubleshooting Matrix

Use this matrix as the first response for an on-call engineer who has just received a 1007000 page.

Observed Symptom Likely Cause First Action Owner
Queue grows on recipe load ODBC blocking inside the action Move DB code to a Windows service and re-trigger via a flag tag Recipe engineer
Queue grows at picture change On-change triggers on volatile tags Add hysteresis; lower the tag acquisition cycle Graphics designer
Queue grows at shift handover Alarm-acknowledge handler with COM call Refactor to flag tag driven by the orchestrator Alarm engineer
Queue grows only at startup Heavy initial-load code in Open Picture Defer to first user action; gate with a flag Graphics designer
Queue grows on OPC reconnect Polling inside reconnect handler Use event subscription; remove the polling loop OPC engineer
Queue grows after Windows update Driver regression or COM security change Compare to a pre-update PDLrt.log; roll back the patch IT/automation
Queue grows only on a redundant standby Mirror sync logic with synchronous waits Move sync to a separate process; off-load from PDLrt.exe Redundancy engineer

12. Platform Notes: WinCC 7.0 vs 7.4 vs 7.5

Behaviour around the script queue is consistent across the WinCC 7.x family, but a few deltas matter when you are sizing the refactor.

  • WinCC 7.0 — hard limit 10,000; Runtime > Restart Script Processing is missing in SP0-SP3; OS Project Editor must be used to reset the alarm.
  • WinCC 7.4 — adds the QueueSoftWarning registry hook; hot-fix HF14 patches a memory leak in the VBScript engine that contributed to false overflows under load.
  • WinCC 7.5 — hard limit raised to 20,000; introduces parallel action execution for the C-script plane (the VB plane remains single-threaded). On a 7.5 install, a 10,000-action saturation on the VB plane can coexist with a healthy C-plane counter — verify both before declaring the runtime healthy.

If the project must remain on WinCC 7.0 for compatibility reasons, the soft-warning registry setting is the single highest-leverage change you can apply. On WinCC 7.5, the parallel C-script plane lets you move long-running calculations off the VB plane, which removes most of the pressure that drove the legacy 1007000 incidents.

13. Verification Checklist

Run this list before handing the project back to production:

  1. Restart the WinCC runtime. Confirm @SCRIPT_COUNT_TAGS drops below 200 within 30 s.
  2. Trigger the worst-case process sequence (recipe load, alarm burst, picture navigation). The tag should peak below 3,000.
  3. Open the diagnose directory and confirm there are no "More than 5000 actions" entries from the last 24 hours.
  4. Check the process alarm list — the 1007000 entry is present in the back-up archive slice but not in the active head.
  5. Confirm the soft-warning registry value survived the runtime restart.
  6. Review the audit list above. Document the refactor backlog in the project CMDB.
  7. Brief the next shift: the overflow was a scheduler symptom, not a WinCC bug. Reinforce the "no loops in actions" rule at the daily toolbox talk.

14. Frequently Asked Questions

What does the WinCC 7 error 1007000 "ActionOverflow" actually mean?

It is the runtime's hard alarm for the script action queue. WinCC uses a single-threaded C/VB scheduler with a hard ceiling of 10,000 actions in work (5,000 in WinCC versions before 7.0). When the queue cannot drain faster than triggers arrive, the scheduler stops dispatching and raises alarm 1007000 with the text "ActionOverflow: More than 10000 Actions to work". The number is reserved in ALG.SSF and shared by every WinCC project on the computer. See the WinCC 7 Alarm Logging manual in the Siemens Industry Online Support portal for the full system message catalog.

How do I clear an overflow that has the alarm list stuck on the overflow event?

Acknowledge the alarm, then restart the script processing from WinCC Explorer (or deactivate/reactivate Runtime if the option is greyed out). If the alarm list still shows the entry as "current", reset the short-term archive slice in Alarm Logging by exporting it, then choosing File > Reset. Reload the runtime and verify @SCRIPT_COUNT_TAGS drops below 200 within 30 seconds. The original overflow entry remains in the back-up slice for audit.

How many cyclic actions can I safely run in WinCC 7?

One per server. Use it as an orchestrator that toggles internal flag tags at 1 s cadence. Attach the actual work to on-change handlers on those flag tags. Field data shows the queue holds steady below 200 actions with 30 on-change workers fed by a single 1 s orchestrator. Never use a 250 ms trigger as your main orchestrator — the runtime cannot guarantee dispatch latency below 250 ms on a loaded system.

Why does the diagnose log say "More than 5000 actions" when my project is idle?

The warning is logged whenever the runtime counter crosses 5,000, even if the queue drains immediately. A burst during picture change, recipe import, or alarm acknowledgement is normal. The warning becomes a problem only when the counter stays above 5,000 for more than 60 seconds — that is the slope that reaches 10,000 and trips 1007000 within minutes. Add the registry value QueueSoftWarning = 3000 under HKLM\SOFTWARE\Siemens\WinCC\Script to receive a 30-60 minute lead time before the system alarm.

Can I delete the 1007000 alarm from ALG.SSF to hide the message?

No. Alarm 1007000 is a system-reserved identifier generated by the WinCC scheduler, not by the project. Deleting it leaves the runtime in an undefined state and is not supported by Siemens Industry Online Support. The correct response is to fix the script that is flooding the queue, then either reset the active archive slice or accept the entry as a historical record. The OS Project Editor inserts the standard 1007000 entry on purpose so that an overflow is always visible to the operator.

Back to blog