1. Problem Statement
On a SINUMERIK 840D-controlled turning machine (in this case, an EMCO HT 45 from build year 2013, running the Operate HMI on a Linux-based TCU/PCU platform), the integrated 3D simulation renders the workpiece only for the channel that is currently active on the main spindle (HS), and not for any tool-change operations that have been delegated to Channel 2 (K2) and physically mounted on the same HS. The on-screen workpiece produced by K1 appears correctly in the standard 3D view, half-section view, and turn-section view, but the material removed (or added, in the case of driven-tool drilling on the front face) by K2 routines stays invisible to the operator. Because the real machine happily executes K2 operations against the same workpiece that K1 has just finished, the simulation diverges from the actual stock removal, which is unacceptable for any single-piece or small-batch job where a dry-run must fully mirror the cut before a real spindle start.
This article documents the field-proven root cause, the diagnostic path required to confirm it, the NC-level workarounds that bring the simulation back into agreement with the part, and the alternatives when the standard simulation cannot be coerced into faithful behavior at all.
2. Hardware and Channel Configuration Context
The fault only appears on multi-channel turning centers where more tool pockets exist than a single 12-station turret can carry, or where two turrets must share access to the same physical spindle. The reference configuration below is typical for an HT-class turning machine with two turrets and a counter-spindle (GS), and is the configuration that triggered the original field report.
| Logical Side | Name Tag | Meaning |
|---|---|---|
| Left side (turret 1) | C11 | C-axis of main spindle (HS) |
| C13 | C-axis of driven tool on K1 | |
| X10 | X-axis of K1 | |
| Y10 | Y-axis of K1 | |
| Z10 | Z-axis of K1 | |
| Right side (turret 2) | C12 | C-axis of counter-spindle (GS) |
| C14 | C-axis of driven tool on K2 | |
| X11 | X-axis of K2 | |
| Z11 | Z-axis of K2 | |
| Auxiliary | Z12 | Z-axis of GS |
Because the user is loading up to 20 live tools onto the main spindle while each turret can index only 12 pockets, K1 and K2 must coexist on the HS during the same workpiece. The 840D treats K1 and K2 as separate NC channels even though they physically address the same spindle. That mapping is the seed of the simulation issue.
3. Root Cause: Channel-Centric Simulation Architecture
The integrated simulation on the 840D Operate HMI models the kinematics and the workpiece per channel, not per spindle. The geometry kernel takes the channel-specific zero points, the channel-specific tool table slice, and the channel-specific BLUM (or equivalent) blank definition, and renders that channel's toolpath onto a virtual blank. When two channels address the same spindle (HS in this case), each channel runs its own private blank:
- K1's blank is initialized from
SETPIECEor the_N_SETPIECEentry referenced by the K1 program header. - K2's blank is initialized identically, but neither channel "owns" the cumulative result of the other.
The result: K1's simulation shows the workpiece after K1 has finished. K2's simulation shows the workpiece after K2 has finished — but starting from the original blank, not from K1's post-cut state. When the operator only loads K1's view (because K2 is being driven against the HS and the operator expects to see both cuts on the same part), the K2 cuts are simply not represented in that view.
The Siemens knowledge base confirms this scope. Document ID 56902427 - SINUMERIK 840D sl/828D Turning - Simulating a machining operation describes the simulation as a "machining operation" preview performed before execution, with simultaneous recording available during execution. The document explicitly scopes the rendering to the per-channel setup, which means any topology that violates the one-channel-one-spindle assumption must be reconciled by the programmer.
4. ShopTurn vs. DIN/G-Code Interface
Two HMI surfaces are typically present on a 2013-vintage 840D turning machine:
| Interface | Programming style | Simulation fidelity on multi-channel HS | When to use |
|---|---|---|---|
| ShopTurn | Cycle-based, shop-floor oriented | Faithful only for the projected configuration (typically K1↔HS and K2↔GS) | Standard production where K2 stays on the counter-spindle |
| DIN / G-Code (Operate Programming) | ISO-style block-by-block | Accurate for any axis assignment, but blank inheritance is still per channel | Custom topologies, K1+K2 on same HS, prototyping |
When EMCO projects an HT-class turning machine, the channel assignment is hard-coded by the machine's configuration file .../siemens/sinumerik/machine_data/...:
- K1 → Turret 1 + Main spindle (HS)
- K2 → Turret 2 + Counter spindle (GS)
Running K2 against the HS is mechanically possible (the machine is wired that way and the operator can issue SETMS(1) or equivalent channel-spindle swaps), but it falls outside the projected simulation envelope. ShopTurn's simulation engine quietly refuses to render it; DIN-mode renders it but treats the blanks as independent.
$NC_SPIND_ASSIGN_TAB entry points to the same logical spindle as K1's, the simulation will treat them as siblings, not as parent/child — which is precisely the gap you are observing.
5. Diagnostic Procedure
Run through these checks in order. Each step confirms one layer of the problem before you commit to a workaround.
- Identify the HMI build. Menu → Help → About. Note the Operate version (e.g. 4.5 SP4, 4.7, 4.8) and the HMI-PRO runtime. Older 4.5 SPx builds had documented rendering glitches on multi-channel setups; if you are below 4.7, plan an HMI-PRO update before doing anything else.
-
Read the controller build.
Menu → Diagnostics → Version. Note the NCK version, PLC version, and the drive version (SINAMICS S120 / Combi). The simulation kernel is tied to NCK build; 840D sl NCK 4.7+ ships the unified simulation engine. -
Capture the channel-axis assignment.
Diagnostics → Axis/spindle assignment. Print or photograph this screen. The channel → axis → spindle wiring is the canonical map of what the simulation kernel sees. -
Run a single-channel dry-cut in K2 only. Load a trivial facing program, set K2 as the master spindle (
SETMS(2)), simulate. If K2-only simulation also mis-renders, the problem is the blank definition for K2, not the channel-on-HS issue. - Run the same program in ShopTurn. If a ShopTurn switch is exposed on the HMI, re-open the program in ShopTurn and simulate there. ShopTurn will (correctly, for its projection) tell you that K2 is not configured for HS — that error message itself is the diagnosis.
-
Inspect
SETPIECE. In the K2 program header, look for:SETPIECE(0,0,-50, 0,0,0, 80,80,80)
The blank must match the part starting stock for K2 to render sensibly. If the value is missing or inherited from a default, the simulation may render against an oversized blank and visually hide the K2 cuts.
6. NC Program Workarounds for Simulation Alignment
Three field-tested workarounds exist. Each has trade-offs.
6.1 Force a per-channel blank with sequential rendering
This is the lightest touch. At the top of every K2 program section, redefine the blank to the post-K1 stock:
; K2 program header
DEF INT _K1_DONE = 0
; After K1 finishes its cuts at HS
IF _K1_DONE == 0
; Trigger a "no-op" G1 cut on K1 to flush its simulation context
G0 G90 X100 Z100
SETPIECE(0,0,-50, 0,0,0, 80,80,80)
_K1_DONE = 1
ENDIF
; Now the K2 blank is re-anchored. Render continues here.
G0 G90 X20 Z2
G1 Z-25 F0.15
This does not actually unify the two views, but it ensures each channel starts from a known, documented blank. Combined with section labels, you can simulate K1 and K2 independently and trust both renders.
6.2 Use labels and jumps to gate K2 cuts during K1 simulation
Switch off the K2 cuts while running the K1-only simulation, then switch them back on for the K2 pass:
DEF INT _SIMULATE_K2 = 0 ; set to 1 from HMI for full simulation
; ---------- K1 main program ----------
G0 G90 X20 Z2
CYCLE62("FACE_001")
LABEL_K2_HOLE:
IF _SIMULATE_K2 == 1 GOTOF LABEL_RUN_K2
GOTOF LABEL_SKIP_K2
LABEL_RUN_K2:
SETMS(2)
M61 ; K2 tool change
CYCLE83(10,0,-25, ...) ; deep-hole drill at face
LABEL_SKIP_K2:
SETMS(1)
M30
The HMI-side variable _SIMULATE_K2 is toggled before invoking "Simulation". When the operator wants to see K2 cuts, set the GUD to 1; when only K1 is of interest, leave it at 0. This pattern keeps the simulation deterministic across operators.
6.3 Embed a virtual blank-of-blanks via M-code and SETPIECE chain
For shops that need a single contiguous dry-run, use a custom M-code (or a GUD-driven branch) that:
- Runs the K1 simulation in headless mode, capturing the resulting blank mesh.
- Exports that mesh as a SETPIECE-compatible definition (a binary or ASCII fixture file).
- Injects the fixture into K2's blank at simulation start.
This requires a PLC-side handler (FB on the SINUMERIK PLC, written in STL or LAD/FBD with a STEP 7 Professional V18+ toolchain). The FB listens for M-function 61–69 reserved for simulation hooks, copies the fixture, and updates the K2 program header. The development effort is non-trivial; only justify it if you run 50+ parts/month through this topology.
7. Alternative Simulation: VERICUT and Off-Controller Options
When the on-controller simulation fundamentally cannot represent the topology (because the projected channel assignment excludes your real-world usage), move the dry-run off the 840D. The reference off-controller simulation package is CGTech VERICUT, which performs a per-block, per-spindle kinematic replay of the NC code and detects gouges, collisions, axis-travel violations, and over-travel of tool data before the program ever hits the spindle.
| Tool | License model | Topology support | Notes |
|---|---|---|---|
| CGTech VERICUT | Per-seat floating license | Multi-channel, multi-spindle, dual-turret | Industry standard; supports SINUMERIK post-processed G-code natively |
| Siemens NX CAM (machine simulation) | Bundle with NX | Full kinematic machine builder | Best when you already author in NX |
| On-controller ShopTurn | Included | Only projected channel config | Free, fast, but limited as documented above |
The end-to-end dry-run workflow then becomes:
- Author or post-process the part on the engineering workstation.
- Import into VERICUT, attach the SINUMERIK 840D post-processor and the EMCO HT 45 (or equivalent) machine definition file.
- Run "Auto-Diff" against a verified reference stock to catch any geometric deviation before cut time.
- Push the verified program to the 840D via network share or CF card.
8. Verification Procedure
After applying any workaround, verify the fix with these acceptance checks. If any check fails, step back to §5 and re-diagnose before trusting the dry-run.
- Open the program, press Simulation. The 3D view must render the part with all K1 cuts visible.
-
Toggle
_SIMULATE_K2 = 1(or equivalent). Re-launch simulation. The K2 cuts must now appear layered onto the K1 stock. - Check tool-path colors. Rapid = yellow, cut = green, plunge = blue, dwell = red. Any segment where K2 should plunge but shows yellow is a missed section.
- Compare simulation time vs. real run time. They should be within ±15%. Wild divergence means the simulation is skipping a section.
- Dry-run on the machine with feed-override at 0%. Watch the actual tool path on the real machine; it must match the simulation 1:1 in geometry (not timing). If it does not, the SETPIECE chain is wrong.
- First real cut on a Styropor or Delrin sacrificial blank. Confirm there is no crash, no missed section, no over-travel. This is the final go/no-go before production stock.
9. Preventive Measures and Best Practices
-
Lock the channel-spindle assignment. Use
SD 42800 $SC_SPIND_ASSIGN_TABto freeze which spindle each channel addresses. This prevents an operator from accidentally swapping spindle assignments via SETMS during a program run and breaking the simulation assumptions. - Maintain a single source of truth for blanks. Whether you use SETPIECE in the program or a fixture file, document it. Stale SETPIECE values are the single most common cause of "simulation showed nothing wrong, real cut crashed."
- Pin the HMI-PRO version. The simulation kernel is shipped with HMI-PRO. Once a build passes your acceptance tests, freeze it. Siemens releases HMI-PRO service packs that fix known simulation regressions but can introduce new ones; do not blindly update in production.
- Train operators on the SETMS discipline. A SETMS(2) in the middle of a K1 program is legal and the machine will execute it, but the simulation will silently break. Document every SETMS in the program header as a comment so reviewers can audit it.
- Subscribe to Siemens Product Safety Advisories. Specific SINUMERIK 840D builds have shipped with simulation regressions that overwrite each other when two channels target the same spindle. The Siemens support site at support.industry.siemens.com publishes these under "Product Safety / Security Advisories".
10. Troubleshooting Matrix
| Symptom | Most likely cause | First action | Reference |
|---|---|---|---|
| K2 cuts at HS invisible in simulation | Channel-centric blank model | Apply §6.2 label/jump pattern | §3, §6 |
| Simulation blank renders huge or unbounded | SETPIECE missing or stale | Inspect and rewrite SETPIECE per K2 header | §5 step 6 |
| ShopTurn refuses to open program | Program authored in DIN/ISO, ShopTurn expects cycle calls | Either re-author in ShopTurn or stay in DIN | §4 |
| Simulation OK, real cut crashes | Simulation rendered K2 cuts at GS, real machine cuts at HS | Lock SD 42800 spindle assignments | §9 |
| 3D view hangs on launch | HMI-PRO below minimum version for kernel | Update to current HMI-PRO service pack via Siemens support | §5 step 1 |
| Two K2 cuts at HS overlay each other | Same tool referenced in both channel slices | Audit tool table; ensure T-numbers are channel-unique | §9 |
| Simulation accurate, but feed/time estimate is wrong | Feed-override applied to sim-time calc incorrectly | Reset feed-override to 100% before simulation | §8 step 4 |
11. When to Escalate to Siemens or the Machine Builder
If the on-controller simulation still does not agree with the real cut after the §6 workarounds have been applied, escalate with this evidence packet:
- NCU/PCU type and serial (printed on the front of the unit).
- NCK software version (Diagnostics → Version).
- HMI-PRO software version (Help → About).
- A copy of
.../siemens/sinumerik/machine_data/.../channel.inior the equivalent configuration file. - A small test program that demonstrates the K2-on-HS rendering problem in under 50 blocks.
- The exact SETPIECE statements used in both K1 and K2 program headers.
For an EMCO HT 45 specifically, EMCO support should be the first stop (the machine builder owns the channel-axis projection). For non-EMCO machines with the same topology, escalate to Siemens with the packet above and reference Siemens KB 56902427 as the canonical simulation-document reference.
12. Summary
The "K2 simulation invisible at HS" behavior on a SINUMERIK 840D is not a bug in the simulation engine — it is the engine honoring the channel-centric blank model exactly as designed. The machine can execute K2 cuts at the main spindle, but the standard simulation only renders one channel at a time, against the blank that channel declared. Resolving the issue for production work requires one of three paths:
- Per-channel blank discipline — every K1/K2 program header carries its own SETPIECE; accept that you simulate twice.
- Label/jump gating — drive K2 cuts from a GUD variable; toggle from the HMI to switch between K1-only and full simulation.
- Off-controller simulation — move dry-runs to VERICUT or NX CAM machine simulation, where the topology is faithfully modeled.
Lock the spindle assignment in SD 42800, freeze the HMI-PRO version once validated, and document every SETMS call. With those controls in place, the simulation will match the real cut, and the dry-run workflow becomes trustworthy again.
Why does the 840D simulate per channel instead of per spindle?
Because each channel owns its own zero offsets, tool table, and blank definition. The simulation kernel cannot resolve which channel's stock should be authoritative when two channels target the same physical spindle, so it renders each channel against its own private blank. This is the documented architecture per Siemens KB 56902427.
Can ShopTurn be coerced into rendering K2 cuts at the main spindle?
No. ShopTurn's simulation is restricted to the projected channel-spindle assignment (typically K1↔HS, K2↔GS) that was configured at commissioning. To render K2 cuts at HS, switch to the DIN/G-code programming surface and use the label/jump or SETPIECE workarounds described in §6.
What is the minimum HMI-PRO version for reliable multi-channel simulation?
HMI-PRO 4.7 or later (shipped with SINUMERIK Operate 4.7) is the practical baseline. Builds below 4.7 have documented regressions on multi-channel rendering; update via the Siemens support portal before troubleshooting anything else.
Is running VERICUT on the 840D's industrial PC supported?
No. The PCU 50.5 and TCU 30.3 are sized for real-time NC tasks and lack the CPU/GPU/memory headroom for full NC-code simulation. Run VERICUT on an engineering workstation connected to the same network as the machine, and push verified programs back via network share or CF card.
How do I prevent an operator from breaking simulation assumptions with a stray SETMS?
Lock the spindle assignments in setting data SD 42800 $SC_SPIND_ASSIGN_TAB at commissioning, and document every SETMS call in the program header as a comment. Periodic audit of program headers catches drift before it causes a crash.