Archiving SINUMERIK 840D NC Programs with Version Control

David Krause8 min read
Best PracticesOther TopicSiemens
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

Problem Scope

A shop runs lathes on SINUMERIK 840D controls at differing software and MMC versions and mills on Fagor controls. NC programs are hand-written in a plain text editor and dumped into one directory per machine; setup sheets, tool lists and drawings live in parallel directory trees. There is no link between a part number, its revision, the machine it was proven on, and the documents that belong to it, and no version history at all.

As parts grow more complex the programs get longer, manual DIN/ISO edits get riskier, and the cost of a bad transfer moves from a scrapped part to a crashed spindle. The engineering task is therefore two separate problems that are often bundled into one purchase:

  1. Program and document management - identity, revision, approval state, and the machine/part linkage.
  2. Verification - DIN-code simulation of turning and milling before the file reaches the control.
Decide these separately. An editor with simulation and a DNC/document database are different products with different price points. Bundling them into a single quotation is what produces surprise five-figure numbers.

Constraints Imposed by a Mixed 840D / Fagor Fleet

Any archive design has to survive the following, because they are properties of the machines, not of the software you buy:

Constraint Consequence for the archive
Different 840D software and MMC versions across lathes A program proven on one lathe is not automatically valid on another. Version the file per machine, not only per part.
SINUMERIK file identity is carried in the file header, not the DOS/Windows filename Renaming a file in Explorer does not rename the program on the control. The archive filename and the internal program name must be kept in sync by rule.
Fagor mills use a different dialect and a different transfer mechanism Do not attempt one universal post or one universal file extension. Segment the repository by control family.
Cycles, R-parameters, tool offsets and zero offsets live outside the MPF The part program alone is not a reproducible setup. Archive the supporting data with it.
Setup sheets in spreadsheet form, drawings in CAD form The management system must store arbitrary binary attachments, not just ASCII NC text.

The last row is the usual elimination criterion. A lightweight NC program archiver that only understands ASCII program files forces workarounds for DWG drawings and XLS/ODS setup sheets, and workarounds are exactly where revision control fails.

Repository Structure and Naming Convention

Before buying anything, fix the identity scheme. This is portable across every tool you might later adopt and is the part that actually prevents errors.

Use a composite key of part number - operation - machine - revision:

<PARTNO>_<OPNO>_<MACHINE>_R<nn>.MPF

Example:  144207_OP10_DMG04_R03.MPF
          144207_OP10_DMG04_R03.XLS   (setup sheet + tool list)
          144207_R00.DWG              (drawing, revision independent of NC)

Rules that make this work:

  1. Revision is immutable. Never edit R03 in place. Copy to R04, edit, then archive R03 read-only. This gives you version history even on a bare file server.
  2. One released revision per machine. Keep a RELEASED folder containing only the current proven revision per part/machine and a WIP folder for everything else. Only RELEASED is allowed to feed the DNC transfer.
  3. Header block in every program. Put the identity into the NC text itself so it is visible on the control:
; PART   : 144207 REV C
; OP     : 10  TURN + DRILL
; MACHINE: DMG04  840D
; NC REV : R03   2026-08-20  ED
; TOOLS  : T1 D1 ROUGH, T3 D1 FINISH, T7 D1 DRILL 8.5
; ZERO   : G54 = CHUCK FACE
  1. Checksum the released file. Store a hash (or at minimum file size and byte count) with the release record so a corrupted or silently edited transfer is detectable.
  2. Subprograms are versioned as dependencies. If 144207_OP10 calls a shared SPF, the release record must name the SPF revision it was proven against.

Tooling Options and How to Evaluate Them

Three functional layers exist; you can mix vendors per layer.

Layer Function Selection criteria
NC editor Syntax highlighting for DIN/ISO, file compare, block renumber, search/replace across files File compare between two revisions is the single most valuable feature - it turns "what changed?" into a two-second answer.
Backplot / simulation Toolpath generation and verification for turning and milling from the DIN code Must accept the actual dialect including SINUMERIK cycles. A generic ISO backplotter will choke on cycle calls and give false confidence.
DNC / program database Server-side repository, revision history, machine-side program request, attachment of drawings and setup sheets Must store arbitrary file types, support per-machine release state, and log every transfer to and from the control.

Commercial NC editors with integrated backplot are sold in the low hundreds of euros per seat, with the database/DNC layer licensed separately as a server plus per-client model. Indicative figures seen in vendor quotations for this class of product:

Item Indicative price
Editor with simulation, single seat ~EUR 540
Database, 1 server + 1 client ~EUR 700
Each additional client ~EUR 300-350
Verify every quotation line item. A quotation of ~EUR 11,000 for "editor + management + simulation + calculator" is an order of magnitude above the component list prices above and normally indicates bundled CAM modules, multi-seat licensing, machine-specific DNC interfaces, or on-site integration services. Ask the vendor for a line-by-line breakdown before rejecting the product on price. Pricing shown here is indicative and must be confirmed with the vendor.

Free CNC simulators for turning and milling exist and are worth trialling for backplot verification, but validate them against a known-good program first: run a part you have already cut, confirm the plotted path matches the actual result, and confirm the simulator handles your cycle calls rather than skipping them silently. A simulator that ignores unrecognised blocks is worse than no simulator.

If a five-axis or mill-turn machine is on the horizon, budget separately for full machine-model verification with collision checking against the kinematic model - a 2D/3D backplotter does not cover tool holder, turret and tailstock collisions.

Implementation Sequence

  1. Freeze the current state. Take a full read-only copy of every existing machine directory before touching anything. This is your fallback.
  2. Build the part-number index. For each existing program, record part number, operation, machine, date last run, and whether it is proven. Anything unproven or unidentifiable goes to a quarantine folder, not into the release tree.
  3. Rename into the convention and insert the header block. Do this machine by machine, starting with the lathe that produces the most repeat work.
  4. Attach documents. Link setup sheet and drawing to the part/operation record. If your chosen tool cannot hold DWG/XLS attachments natively, store them alongside in the same folder with the same key - never in a parallel tree with a different naming scheme.
  5. Pull a fresh archive from each control and diff it against the file server copy. Undocumented edits made at the control are the normal case; the diff tells you where the file server is already wrong.
  6. Establish the release gate: edit in WIP -> simulate/backplot -> transfer -> prove out at the machine -> pull the as-run program back from the control -> diff against WIP -> promote to RELEASED with a new revision number.
  7. Lock down write access to the RELEASED tree so only the release step can write to it.
  8. Back up the whole repository on the normal IT schedule and test a restore.

Verification and Ongoing Checks

Check Method Pass criterion
File server matches control Periodic archive pull from each 840D and Fagor control, byte-compare against RELEASED Zero differences, or a raised revision explaining them
Transfer integrity Compare byte/block count of sent file with the program on the control; confirm the program terminates with the expected end-of-program block Counts match, program end present
Revision traceability Pick any produced part at random, walk from part number to NC revision, setup sheet and drawing revision All four documents found in under a minute and mutually consistent
Simulation fidelity Backplot a known-good proven program Path matches reality; no blocks silently skipped
Cross-machine validity Attempt to load a program released for machine A on machine B Blocked by the release state, or explicitly re-released and re-proven for machine B

The economic argument for spending on the DNC layer is straightforward: one avoided crash on a mid-size turning centre typically exceeds the cost of a server plus a handful of clients. Size the spend against crash exposure and lost spindle hours, not against the sticker price of a text editor.

FAQ

How do I version control SINUMERIK 840D NC programs without buying a DNC system?

Use an immutable revision suffix in the filename (PARTNO_OPNO_MACHINE_Rnn.MPF), never edit a released file in place, keep separate WIP and RELEASED trees with write protection on RELEASED, and use an NC editor's file-compare function to diff revisions. This gives usable history on a plain file server.

Why does my archive copy differ from the program actually running on the machine?

Because edits made at the control are rarely fed back. Pull a fresh archive from each control and byte-compare it against the file server copy; make "pull the as-run program back and diff it" a mandatory step of the prove-out procedure before promoting a revision.

Can one program be used on all lathes if they all have 840D controls?

No. Different control software and MMC versions, different cycle packages, tooling and zero offsets mean a program proven on one machine is not automatically valid on another. Release and revision programs per machine, and re-prove before releasing to a second machine.

Is a free DIN-code simulator adequate for turning and milling verification?

It is adequate for gross toolpath sanity checks only if you first validate it against a known-good proven program and confirm it interprets your cycle calls rather than skipping unrecognised blocks. It does not replace full machine-model verification with collision checking on mill-turn or multi-axis machines.

Why is my NC software quotation ten times the published component prices?

Bundled quotations usually roll in extra modules, multi-seat client licences, machine-specific DNC interfaces and on-site integration. Request a line-by-line breakdown and price the editor, simulation and database/DNC layers separately before making a decision.

Back to blog