Resolving SIMOTION D445 Task Overflow SHUTDOWN Triggered by Large OPC Profile / Cam Data
1. Problem Description
A SIMOTION D445 motion controller equipped with multiple SINAMICS drive axes stops with a hard SHUTDOWN when a third-party SCADA pushes a large profile or cam data set over an OPC connection (Ethernet). The runtime stops on the controller and the SIMOTION diagnostic buffer shows:
Tolerated time overflow in the taskSTOP by execution system, cause: Timeout
The error is reproducible but intermittent: it does not occur on every transmission. Sending a moderate-size cam (a few hundred points) is fine, but pushing a multi-kilobyte cam buffer over OPC UA/DA while the controller is also executing the IPO task repeatedly pushes the affected task past its watchdog. The integrator has applied the latest Hotfix pack (SP5 HF15) but the symptom persists.
2. Affected Hardware, Firmware, and Software
| Component | Order Number / Designation | Notes |
|---|---|---|
| SIMOTION D445-2 | 6AU1450-2AD00-0AA0 (or -0AB0) | Multi-axis motion controller, integrated SINAMICS drive control |
| SIMOTION firmware | V5.5 / V5.6 (with Service Packs SP1–SP5, HF15) | Bug base observed on V5.x line; older V4.5 also affected |
| SIMOTION SCOUT / SCOUT TIA | V5.5 SP1 / V5.6 HF15 minimum | Required for full diagnostic buffer readability |
| SINAMICS integrated | CX32-2 / S120 / S210 | Drive firmware V5.2 HF3 or later recommended |
| SCADA OPC interface | OPC DA 3.0 / OPC UA 1.04 | Bulk write operation on the controller side is the trigger |
The issue is not hardware-defective: the diagnostic buffer almost always pinpoints one of the cyclic tasks running past its TimeOut multiplier. The hardware watchdog (CPU level) and the SIMOTION task watchdogs (system level) are independent paths and both can force a SHUTDOWN.
3. How SIMOTION Tasks Are Scheduled
SIMOTION D controllers run an execution system composed of several fixed priority tasks. A task overflow in any of them can propagate to STOP/SHUTDOWN:
| Task | Priority | Typical cycle | Watchdog default | Recommended use |
|---|---|---|---|---|
| Servo-synchronous task | Highest (above IPO) | Position controller cycle (e.g., 1 ms) | 1× to 6× cycle | Fast closed-loop / setpoint distribution only |
| IPO-synchronous task (IPO / IPO2) | High | IPO cycle (e.g., 4 ms) | 1× to 6× IPO cycle | Cross-POU coordination, MC-command triggering |
| MotionTask (MT_x) | Medium | Free running, 2×–8× IPO | Configurable 50 ms – 32 s | Long-running data preparation, cam upload |
| BackgroundTask (BT) | Lowest | Idle time | Configurable | Non-real-time HMI/OPC housekeeping |
| TimerTask | Low | Configurable periodic | Configurable | Polled I/O, slow communication |
Two watchdogs protect each task: the configurable TimeOut and the system TaskTime (per-cycle time). If a single cycle exceeds TimeOut × Factor (default 3× to 5×), the SIMOTION execution system logs Tolerated time overflow in the task and, after the configured number of tolerated overflows, raises STOP by execution system. The hard SHUTDOWN is what the field sees.
4. Root Cause
The dominant root cause observed in D445 systems exchanging large cam/profile data over OPC is a wrong task assignment for the receive path. The OPC subscription / data pump logic is typically placed in the BackgroundTask while the consuming application code (cam activation, axis motion, profile interpretation) is placed in the IPO-synchronous task. Both tasks overlap when a bulk OPC write is processed, producing:
- The BackgroundTask absorbs tens of milliseconds parsing/decomposing the incoming cam (memory copy, normalization, checksum).
- The IPO-synchronous task consumes the cam and simultaneously computes IPO outputs, forcing both to run concurrently.
- The sum exceeds the IPO task's TimeOut factor →
Tolerated time overflow→ SHUTDOWN.
Secondary contributors commonly identified in the diagnostic buffer:
- Loop structures in the BackgroundTask (e.g.,
WHILEloops until empty buffer) that never yield. - OPC server sending bursts faster than the controller can drain (no flow control / acks).
- Cam sizes exceeding 16 KB per axis when multiple axes are updated simultaneously.
- Motion commands issued without
nextCommand := IMMEDIATELY, blocking the IPO task. - Heap fragmentation on the global data block after long uptimes.
5. Identifying the Offending Task
5.1 Reading the Diagnostic Buffer
Connect SCOUT to the D445 over Ethernet (Industrial Ethernet via TCP/UDP ports 102, 161, 34964). Navigate to:
Project → D445 → Diagnostics → Diagnostic Buffer
Open the entry STOP by execution system, cause: Timeout and switch to the Extended Info tab. The overflow task name is shown there as the active task ID at the moment of the stop (e.g., IPOSynchronousTask_1). Field experience shows the IPO-synchronous task is by far the most common offender in the profile-cam scenario.
5.2 Task Runtime Trace
Enable task runtime tracing without stopping the machine:
- In SCOUT, right-click the D445 node →
Target system → Commissioning → Task Trace. - Select
IPOSynchronousTask_1andBackgroundTasksimultaneously. - Capture for at least one minute at the same SCADA burst that triggers SHUTDOWN.
- Read the maximum cycle time per task (column
t_max). The IPO task will show t_max approaching or exceeding the TimeOut value.
5.3 CPU Utilization Bars
The CPU load panel of SCOUT (Target system → CPU utilization) shows IPO load percentages. Sustained values above 85% on the IPO bar during the bulk OPC write confirm CPU saturation on the IPO task.
6. Solution
The fixes below are ordered by least invasive to most invasive; apply them sequentially and verify at each step.
6.1 Solution A – Move Bulk Data Reception to a MotionTask
Create a dedicated MotionTask (e.g., MotionTask_2) to receive, validate, and stage cam data. The BackgroundTask should only hand off the raw buffer; the MotionTask does the parse, normalization, and copy into the cam runtime block.
Project tree:
-
Configuration → Task configuration → MotionTask_2→ set cycle time toIPO * 4(e.g., 16 ms on a 4 ms IPO). -
Watchdog→ TimeOut = 500 ms, ToleratedOverflows = 10.
ST pseudocode (BackgroundTask — minimal, non-blocking):
// BackgroundTask – only enqueue
IF bOpcDataReady THEN
bOpcDataReady := FALSE;
// copy raw buffer pointer into staging queue (no parsing here)
StagingQueue[writeIdx] := pOpcCamBuffer;
writeIdx := (writeIdx + 1) MOD 16;
END_IF;r>
ST pseudocode (MotionTask_2 — full processing):
// MotionTask_2 – all heavy work runs here
IF StagingQueue[readIdx] <> 0 THEN
pBuf := StagingQueue[readIdx];
StagingQueue[readIdx] := 0;
parseCamPoints(pBuf, iPointCount); // bulk math
validateChecksum(pBuf);
memcpy(gCamRuntime[iAxis], pBuf, iPointCount * 16);
// Trigger axis cam activation
_enableAxis := TRUE;
END_IF;r
6.2 Solution B – Increase IPO TimeOut and Tolerated Overflows
If the architecture must keep heavy work on the IPO task (legacy code, vendor constraint), widen the IPO watchdog temporarily:
| Parameter | Default | Recommended (cam scenarios) |
|---|---|---|
| IPOSynchronousTask_1.TimeOut | 50 ms (5× IPO of 4 ms, default factor 5) | 120–250 ms |
| IPOSynchronousTask_1.ToleratedOverflows | 5 | 10–20 |
| Factor (cycle multiplier) | 3 (xTimeOutFactor) | 5–6 (if TimeOut is left small) |
6.3 Solution C – Use nextCommand := IMMEDIATELY on Motion Commands
If the IPO task issues motion commands synchronously (e.g., _cam_enable(...) with the default command issuance mode), they block until accepted. Add immediate linking:
// Inside IPO – example axis cam activation
_ax1.axisType := VIRTUAL;
_ax1.setpointAxis := TRUE;
// Issue motion command with IMMEDIATELY linking
ret := _cam_enable(
axis := _ax1,
cam := gCamRuntime[_ax1],
masterSetpoint := 0,
slaveSetpoint := 0,
nextCommand := IMMEDIATELY
);r
Every _* motion command (e.g., _pos, _enable, _cam_enable, _stop) on the D445 exposes the nextCommand parameter. Using IMMEDIATELY releases the IPO scheduling slot at once.
6.4 Solution D – Remove Loop Constructs from BackgroundTask
Replace any WHILE / FOR loops inside the BackgroundTask with state machines. A loop that runs while the OPC buffer is being read can hold the BackgroundTask for hundreds of milliseconds while the IPO task starves. Pattern:
CASE eParseState OF
STATE_IDLE:
IF bOpcDataReady THEN
eParseState := STATE_PARSE;
iParseCursor := 0;
END_IF;
STATE_PARSE:
// process one chunk per call (max ~256 points per pass)
parseChunk(pOpcCamBuffer, iParseCursor);
IF iParseCursor >= iPointCount THEN
eParseState := STATE_VALIDATE;
END_IF;
STATE_VALIDATE:
validateChecksum(pOpcCamBuffer);
eParseState := STATE_PUBLISH;
STATE_PUBLISH:
memcpy(gCamRuntime[iAxis], pOpcCamBuffer, iPointCount * 16);
eParseState := STATE_IDLE;
bOpcDataReady := FALSE;
END_CASE;r
6.5 Solution E – Throttle the OPC Server
On the SCADA side, configure the OPC UA/DA write rate so that no more than 2–4 KB is written to the controller per IPO cycle. Add an explicit DataChangeFilter (OPC UA) or an item-level update rate (OPC DA) such that profile data is sent in incremental segments. Use the SIMOTION SIMOTION_variable_write interface or a CFC block that acks each chunk.
7. Firmware Bug Notice
On SIMOTION V5.4 and V5.5 (pre-SPE), a bug in the OPC-UA server extension module (CPSU) caused the BackgroundTask to lock for up to 800 ms when receiving certain binary structured types. The fix is bundled in:
| Fix | File / Package | Source |
|---|---|---|
| V5.4 SP1 Hotfix 7 | SIMOTION D4x5 V5.4 SP1 HF7 | Siemens Support entry 109766903 |
| V5.5 SP2 Hotfix 4 | SIMOTION D4x5 V5.5 SP2 HF4 | Siemens Support entry 109775118 |
| V5.6 (base) | SIMOTION D4x5 V5.6 | Includes the fix |
Even after applying the latest Hotfix, the architecture-level fix (Solution A) is still mandatory because the OPC bug only addresses the worst-case lock duration, not the architectural problem of moving heavy data in the IPO task.
8. Verification Procedure
- With Solutions A–D applied and the controller in OPERATE, replay the largest cam upload via the same OPC test tool used in production.
- Monitor the diagnostic buffer for 30 minutes. No
STOP by execution systementries should appear. - Confirm
IPOSynchronousTask_1t_max stays below the configured TimeOut (use SCOUT Task Trace). - Verify each axis cam activation via the SCOUT axis control panel: cam engages, axis follows, no jitter on the trace.
- Stress test: trigger 10 consecutive cam uploads in 30 seconds. The controller must remain in RUN.
- Repeat on the redundant D445 if your topology has two controllers running in parallel.
Online → Expert → Task trace) and confirm t_max < 80% of TimeOut for every task.9. Performance Comparison of Solutions
| Solution | Effort | Effect on IPO load | Effect on cam latency | Reversibility |
|---|---|---|---|---|
| A – Move bulk receive to MotionTask | Medium | −60% to −80% | Adds 1 MotionTask cycle | Fully reversible |
| B – Increase watchdog | Low | 0% | 0% | Fully reversible |
| C – nextCommand IMMEDIATELY | Low (code edit) | −10% to −20% | 0% | Fully reversible |
| D – Remove BT loops | Medium | −15% to −30% | 0% | Fully reversible |
| E – Throttle OPC server | Medium (SCADA) | −20% to −40% | Adds RTT to upload | SCADA-team dependent |
10. Best Practices Checklist
- Never execute I/O heavy, data-heavy, or memory-copy-heavy code inside the IPO or servo-synchronous tasks.
- Use dedicated MotionTasks for cam/profile loading. Place the MotionTask cycle at 4×–8× IPO.
- Keep the BackgroundTask for non-real-time housekeeping only — log rotation, OPC housekeeping, alarm dispatch.
- Always use
nextCommand := IMMEDIATELYon every motion command in the IPO path. - Configure
ToleratedOverflows≥ 5 on every task to absorb one-time bursts. - Set the SIMOTION
_executeSystemStopreaction so that a single task overflow does NOT escalate to SHUTDOWN immediately; instead, log and degrade. - Verify cam point counts and RAM headroom before deployment. A 16 KB cam with 1024 points uses 16 KB × 2 (double buffer) per axis.
- Keep at least one free MotionTask slot for emergency data loading.
- Document the TimeOut and Factor values for each task inside the project documentation so that future integrators do not reset them to default.
- Plan remote diagnostics: enable the SIMOTION web server and OPC-UA diagnostic namespace so engineers off-site can pull the diagnostic buffer without a SCOUT direct connection.
11. Quick Parameter Reference
| Parameter | Path in SCOUT | Valid range | Default |
|---|---|---|---|
| TimeOut | Task configuration → Time settings → TimeOut | 1 ms – 32 s | 5× cycle |
| Factor (xTimeOutFactor) | Task configuration → Time settings → Factor | 1 – 10 | 3 |
| ToleratedOverflows | Task configuration → Time settings → ToleratedOverflows | 0 – 65535 | 5 |
| StopReaction | Task configuration → Stop reaction | NO_STOP / STOP_WITH_RAMP / SHUTDOWN | STOP_WITH_RAMP |
| MotionTask cycle | Task configuration → Cycle time | 2×–32× IPO | 2× IPO |
12. References
- SIMOTION D4x5 firmware update V5.4 SP1 HF7
- SIMOTION D4x5 firmware update V5.5 SP2 HF4
- SIMOTION D4x5 Product Manual (Function Manual)
- SIMOTION SCOUT TIA Programming and Operating Manual
- SIMOTION Motion Control – Programming Reference (MCC, _cam_enable)
- SIMOTION OPC UA Server – Configuration Manual
FAQ
What does "Tolerated time overflow in the task" mean on a SIMOTION D445?
It is the SIMOTION execution system telling you that one task ran a single cycle longer than its configured TimeOut × Factor. After the configured number of ToleratedOverflows (default 5), the controller raises STOP by execution system, cause: Timeout, which can lead to SHUTDOWN.
How do I find which task overflowed without being on site?
Open the diagnostic buffer in SCOUT over remote Ethernet (port 102). The Extended Info tab of the STOP entry shows the offending task name (e.g., IPOSynchronousTask_1). Enable the SIMOTION Web Server / OPC UA diagnostic namespace if SCOUT cannot reach the controller from your location.
Should I move the OPC receive logic into a MotionTask?
Yes. The receive, parse, and normalize of a large profile/cam must not run in BackgroundTask nor in the IPO task. Use a dedicated MotionTask (4×–8× IPO) with a generous TimeOut (≥500 ms) and ToleratedOverflows ≥ 10. This is the most reliable architectural fix.
Does increasing the IPO watchdog alone fix the SHUTDOWN?
No. Raising the TimeOut or Factor simply postpones the trip point and adds jitter to the IPO cycle during the heavy cam load. It must be combined with moving bulk work off the IPO task. Otherwise the next larger cam or heavier axis count will re-trigger SHUTDOWN.
Does SP5 HF15 already include the OPC-UA lock fix?
V5.4 and V5.5 SPE/HF lines are independent. For SIMOTION V5.4 the bug is fixed in V5.4 SP1 HF7; for V5.5 it is fixed in V5.5 SP2 HF4 and in V5.6 base. Installing the latest hotfix is necessary but not sufficient — architectural changes (MotionTask for receive) are still required for stable cam upload over OPC.