Resolving Sinumerik 808D TOOL.SPF and ASUB Tool Change Errors

David Krause16 min read
Other TopicSiemensTroubleshooting
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 Overview

A 3-axis Forsun 1325 wood/PCB CNC router controlled by a Siemens Sinumerik 808D (SW 4.x, 12-tool linear magazine, 2.4 m × 1.2 m bed) is reported stuck in a non-recoverable state on every tool change attempt. The reference point (G74) approach works, manual jog and handwheel traverse work, and the spindle runs, but as soon as the part program calls T= the controller aborts execution with two stacked alarms:

  • Alarm 14011 — Channel %1 execution of ASUB file _N_TSM_MPF
  • Alarm 14012 / 14013 — Channel %1 block %2 program TOOL not existing or will be edited

Both alarms fire in Channel 1 (K1, the only productive channel on an 808D), with block 1 indicating the failure happens before the first executable line of the called routine. The same faults are produced regardless of which tool number is selected, which immediately rules out a magazine position, tool-length, or tool-list data error. The pattern is consistent with a missing or corrupted tool-change macro rather than a tool-data entry problem.

This article walks through the root cause, the field-proven recovery procedure, and the backup strategy that prevents the fault from reoccurring after the next service intervention.

Important: The Sinumerik 808D is a single-channel controller intended for entry-level milling. The 808D hardware is not field-swappable with 828D/840D sl part programs, ASUB names, or GUD layouts. Do not copy tool-change code from an 828D/840D project — the PLC interface (FB4/FC9 tool-change interface) is different and will fault the PLC at the next cycle.

Root Cause Analysis

The two alarms are produced in this order by the NCK interpreter:

  1. The part program issues a tool change, which the interpreter resolves against the tool list in TOA.TOA and the active tool-change routine registered in NC machine data.
  2. The interpreter attempts to load _N_TSM_MPF as an asynchronous subroutine (ASUB) because the tool-change call is asynchronous to block preparation.
  3. The NCK searches the part-program memory for a program with the name TOOL in the first block — this is the symbolic name declared inside the ASUB header.
  4. Because the program object no longer exists (deleted from the file system, or the active editor still has it open in a write lock), the interpreter raises program not existing or will be edited and stops the ASUB execution with execution of ASUB file _N_TSM_MPF.

In the field case described, the cause was human action: a non-OEM service technician performed an uncoordinated series commissioning / NCK reset, deleted the user area, and then attempted a backup restore that returned only the default tool list — the OEM-specific TOOL.SPF tool-change macro and the corresponding _N_TSM_MPF ASUB were lost.

Why a Default Restore Does Not Fix It

Out of the box, the 808D ships with a template tool-change routine that is associated with the standard magazine. The Forsun 1325 retrofit, however, uses an OEM-modified TOOL.SPF in which:

  • Tool pocket positions are mapped through R variables (settable GUD) rather than the default 808D table — pocket 1 to pocket 12 each have an R parameter pair for X/Y reference.
  • The macro performs a custom Z-axis clearance move that prevents the 1.5 kW water-cooled spindle from striking the workpiece fixture on a 1.2 m wide table.
  • The PLC interface expects a specific hand-shake timing for the ATC drawbar (M06 + auxiliary M-functions) that differs from the default template.

Restoring a default backup therefore leaves a working spindle, working axes, and a working tool list — but a missing tool-change macro. The machine will pass every reference-point and jog test, but fail on the first T call. This is exactly the failure mode observed.

Affected Controllers and Versions

The recovery procedure below applies to:

Controller SW Version Notes
Sinumerik 808D ADVANCED Milling SW 4.7 SP6 and later Recommended for retrofit routers. Uses the tool-management interface in the standard PLC program.
Sinumerik 808D ADVANCED Milling SW 4.5 to 4.7 SP3 Same ASUB path. The file TOOL.SPF may live in the user area rather than manufacturer area — verify the active file system before editing.
Sinumerik 808D (entry-level, PPU 14x.x) All SW versions Does not support full tool management. Uses a hand-coded T-call sequence in the part program. If you have this variant, see Alternative 1 below.

Verify your SW version at power-up on the HMI splash screen, or via menu Commissioning > System > Version. The exact ASUB name (_N_TSM_MPF vs _N_TOOLCHANGE_SPF) can differ between SW 4.5 and 4.7 — confirm by reading the call in your part program header before assuming the file name above.

Prerequisites for Recovery

Before touching the controller, gather the following. Without them you will not be able to fully commission the tool changer.

  1. Access level — Manufacturer password (Sun Protection Level 3, default SUNRISE for 808D, OEM-overridden). Without it, you cannot write to machine data, GUD, or perform NCK series commissioning. Open Commissioning > Password > Set password and enter the OEM value.
  2. Backup media — A CF card (≥ 1 GB, FAT32) or a USB stick formatted in the 808D. The 808D recognizes only one partition and only the directory /sinumerik/. Do not use SD-to-USB adapters on the PPU 14x.x — they fail reliably.
  3. Pocket-coordinate table — Either an OEM printout, a paper note, or a hand-measure for each of the 12 tool pockets. The router uses 3 reference axes: pocket number, X, Y. If this is not available, you can re-measure, but expect to spend 30–45 minutes per pocket with a dial indicator.
  4. Spindle drawbar M-code — Forsun 1325 typically uses M06 for tool change, with M71 for the dust shoe raise and M72 for the dust shoe lower. Verify by looking at any working subprogram or by reading the PLC status (menu Diagnosis > PLC > Status) while issuing M06 manually.
  5. Reference point for axes — All three axes must be at their G74 reference point before any tool-change macro is tested. The interpreter will reject the macro if axis posRemaining shows a non-zero position because of an un-referenced axis.
Safety: Before any tool-change work, lower the dust shoe, open the dust extraction, and place a clear block of material (or the original waste-board) on the bed. A misconfigured TOOL.SPF can drive the spindle into the table at full rapid if the clearance move is wrong. Keep the E-Stop within reach at all times.

Step-by-Step Recovery Procedure

Step 1 — Restore the File-System Integrity

Power the controller up; if the alarms fire immediately on boot, clear them with the Reset key. Navigate to Commissioning > NC > File system. The browser shows the active and passive file systems. The default and the user area both must be visible.

  1. Confirm the existence of _N_TSM_MPF in the user area. If the file is missing, the recovery cannot proceed without recreating it from scratch (Step 3).
  2. If the file is present but marked as will be edited, close the editor (open and discard the changes), then power-cycle the NCK. The 808D holds an exclusive write lock on any program that has been opened in the editor; until that lock is cleared, the interpreter raises the second alarm.
  3. Open the program in the editor to confirm the first line is the symbolic name declaration DEF INT TOOL (or equivalent PROC TOOL SAVE). The 808D requires this declaration; without it the ASUB call fails even if the file is otherwise empty.

Step 2 — Inspect the ASUB Reference in Machine Data

The ASUB that handles tool changes is bound to a specific NC machine data item. For SW 4.7 it is MD20150 $MC_GCODE_DEFAULT_VALUES[14] for the tool-change call. More directly, the ASUB name is registered in:

  • MD11620 $MN_PROG_EVENT_NAME — default PROG_EVENT; should not be modified.
  • MD20116 $MC_TOOL_CHANGE_NAME — the symbolic name of the ASUB. Verify it matches the file TOOL in _N_TSM_MPF.
  • MD22550 $MC_TOOL_CHANGE_MODE — should be set to 1 (interpreted call) for an 808D with a custom macro.

Read each of these via Commissioning > MD, search the index, and write down the current value. If $MC_TOOL_CHANGE_NAME is empty or contains a name that no longer corresponds to a file, the interpreter will resolve to _N_TSM_MPF as a default, which produces the alarm seen in the field.

Step 3 — Recreate the TOOL.SPF Macro from Scratch

If the file is unrecoverable, you must build it. The structure below is the minimum viable tool-change macro for a 3-axis router with a 12-station linear magazine:

PROC TOOL SAVE
DEF INT _TOOL_NO = $P_TOOL_NO
DEF REAL _X_POS
DEF REAL _Y_POS
DEF REAL _Z_POS

; --- dust shoe retract ---
M71
G04 F0.5

; --- spindle stop and orient ---
M05
M19 ; spindle orient for drawbar
G04 F1.0

; --- move to pocket using settable R variables ---
R100 = 12 ; hard-coded current pocket for first build
; map pocket n to R100..R112 / R200..R212 / R300..R312
_X_POS = R[100 + (R100 - 1)]
_Y_POS = R[200 + (R100 - 1)]
_Z_POS = R[300 + (R100 - 1)]

G0 Z50.0 ; clearance
G0 X_X_POS Y_Y_POS
G0 Z_Z_POS

; --- drawbar release / clamp (Forsun uses M70 / M71 on the auxiliary functions) ---
M70 ; unclamp
G04 F0.3
M72 ; clamp new tool
G04 F0.3

; --- return ---
G0 Z50.0
M72 ; dust shoe lower
M03 S12000 ; restart spindle at 12 000 rpm default

RET

This is a starting template. The exact pocket geometry must be re-measured for your machine. The 808D supports a settable GUD layout through the Define GUD menu; the macro above uses R variables, which are the legacy and most portable form on the 808D.

Step 4 — Populate the Tool Pocket Coordinates

For each of the 12 pockets, measure the spindle centerline to the pocket reference pin. Forsun racks typically place the 12 pockets on a 195 mm pitch along the X axis at Y = 850 mm. For a generic 1325 router:

Pocket X (mm) Y (mm) Z (mm)
1 180.0 850.0 -50.0
2 375.0 850.0 -50.0
3 570.0 850.0 -50.0
4 765.0 850.0 -50.0
5 960.0 850.0 -50.0
6 1155.0 850.0 -50.0
7 1350.0 850.0 -50.0
8 1545.0 850.0 -50.0
9 1740.0 850.0 -50.0
10 1935.0 850.0 -50.0
11 2130.0 850.0 -50.0
12 2325.0 850.0 -50.0

Enter these in the R-variable table at Parameters > R Variables:

  • R100 = 1, R101 = 180.0, R102 = 375.0, ... R111 = 2130.0, R112 = 2325.0 (X positions for pockets 1–12)
  • R200 = 850.0, R201 = 850.0, ... R212 = 850.0 (Y positions, all constant for a linear rack)
  • R300 = -50.0, R301 = -50.0, ... R312 = -50.0 (Z pick-up positions)

Once the table is filled, the macro's array-indexing R[100 + (R100 - 1)] resolves the correct X coordinate at run time. The first build always uses pocket 1; after the first successful change, change R100 = 1 to test pocket 2, and so on.

Step 5 — Test with M00 / Single Block

Create a one-line test program in the user area:

%_N_TEST_MPF
;$PATH=/_N_MPF_DIR
T1 M6
M30

Run this program in Single Block with the Override rapid slider at 25%. Confirm the spindle stops, orients, the gantry moves to pocket 1, the drawbar releases, the new tool clamps, and the spindle restarts. The HMI should show Tool 1 loaded in the tool list. Repeat for each pocket in turn.

Step 6 — Take a Full Series Commissioning Archive

Once the macro is working, take a full backup. This is the only way to prevent the failure from recurring.

  1. Insert the CF card or USB stick into the front of the PPU.
  2. Open Commissioning > Series commissioning > Create archive.
  3. Select NCK + PLC + drives + HMI — not just NCK. A common field mistake is backing up only NCK; that excludes the part programs and the GUD/R-variable file.
  4. Save the archive to /sinumerik/data/archive/<date>_full.arc.
  5. Power-cycle and verify the archive by performing a Restore to a different USB stick. If the restore completes without error, the backup is consistent.

Verification Checklist

After Step 5, confirm each of the following before returning the machine to production:

  • Reference point — G74 returns the same machine coordinates on every axis on every power-up. The HMI shows REF in the axis field.
  • Single-block T1 through T12 — all 12 tools load without alarms. Each tool is measured and present in the tool list with the correct length and diameter.
  • Full tool table — Parameters > Tool list shows all 12 tools with non-zero length, radius, and magazine location.
  • R variable table — all 39 R variables (R100–R112, R200–R212, R300–R312) are populated and non-zero.
  • No residual alarms — clear the alarm history (Diagnosis > Alarm log > Clear) and run a 30-minute production cycle. Confirm the alarm log is still empty at the end.
  • Backup verified — the series commissioning archive restores cleanly to a spare USB stick. This is the only test that proves the recovery is reproducible.

Troubleshooting Matrix

Symptom Likely Cause Remediation
Alarm 14011 + 14012 fire on every T call ASUB file missing or editor holding write lock Close editor, power-cycle, recreate TOOL.SPF from Step 3
Alarm 14011 alone, no second alarm Syntax error inside TOOL.SPF Open the program in the editor, the cursor jumps to the offending line
Tool change starts, drawbar does not release M70 not configured in PLC auxiliary-function decoder Open the PLC project in TIA Portal (or the built-in PLC editor for 808D SW 4.7) and check FC9 / FC10 for the M70/M71 mapping
Tool change starts, drawbar releases, gantry does not move to pocket R variables not populated, or R100 (= current pocket) is zero Open Parameters > R Variables and confirm R100 = 1 on first test; populate the array
Gantry crashes into pocket at full rapid TOOL.SPF written with absolute coordinates not from a Forsun file, clearance move missing Add the G0 Z50.0 clearance line before any X/Y move. Inspect the macro for absolute Z0 moves
Tool loaded, but next T call reports tool not in magazine Tool list not synchronized with magazine assignment Commissioning > Magazine > Reload; check that Magazine location in the tool list matches the actual pocket
Alarm clears, but part program continues without tool change PLC FB4 / FC9 tool-change handshake bit not pulsing Open Diagnosis > PLC > Status and watch the relevant bit (typically DB9.DBX0.0 for ToolChangeRequest); cross-check with the PLC project

Field-Proven Caveats

Several issues specific to the 808D show up repeatedly in retrofit installations like the Forsun 1325:

  • Single-channel only. An 808D has one productive channel. If you see channel 2 in any alarm, the controller has been misconfigured — return to standard single-channel layout via series commissioning before continuing.
  • NCK series commissioning is destructive. It wipes the entire NCK file system, including all part programs. It cannot be undone. Always take a verified backup immediately before initiating a series commissioning, and confirm the backup is restorable on a sacrificial USB stick.
  • OEM password override. Most retrofit OEMs change the manufacturer password from SUNRISE to their own value. If the standard password fails, contact the OEM rather than guessing — repeated wrong attempts can lock the controller for a power-cycle interval.
  • CF card size limit. The 808D PPU 14x.x supports CF cards up to 2 GB reliably. Cards larger than 4 GB often format as a partition the controller cannot read. Stick with a known-good 1 GB or 2 GB industrial CF card.
  • Handwheel tool change is not a valid test. The handwheel jogs the spindle but does not exercise the ASUB. Always run an actual T-call test program before declaring the system healthy.

Prevention: Backup Strategy

The original failure was caused by an untrained technician performing a non-OEM service. The structural fix is a written backup-and-recovery procedure that anyone in the shop can follow without specialist training:

  1. Daily — auto-archive to the network share (RCS-Commander or equivalent) on EOB. The 808D does this natively if a network share is mounted.
  2. Weekly — copy the latest archive to a USB stick stored in the shop office, not on the machine. Label with the date.
  3. Monthly — perform a full Series commissioning > Create archive with NCK + PLC + drives + HMI on a dedicated 2 GB CF card stored offsite. Verify the CF card archive by restoring it to a sacrificial USB stick once per quarter.
  4. Per service intervention — before any non-OEM technician touches the controller, take a backup and label it with the technician's name and the date. The shop can then prove which intervention caused a fault and roll back if needed.

Related Siemens Documentation

For deeper coverage, the following official Siemens documents apply to this procedure:

FAQ

What is the difference between _N_TSM_MPF and TOOL.SPF in a Sinumerik 808D?

_N_TSM_MPF is the NC-internal file-system path: the underscore prefix marks it as a system file, TSM is the file name, and MPF is the file type (Main Program File). TOOL is the symbolic program name declared inside the first line of the file. The HMI may show either form depending on context; both refer to the same physical file. The error program TOOL not existing or will be edited is fired against the symbolic name, not the file name.

Why does the machine pass reference-point and jog tests but fail on the first tool change?

Reference point (G74) and jog mode operate entirely on the NCK axis module and the drive bus — they never invoke the ASUB interpreter. The tool-change routine is the first operation in a normal production cycle that calls the TOOL ASUB, so it is also the first operation to expose a missing or corrupted ASUB file. A machine that jogs cleanly is not necessarily ready to run a part program.

Can I copy the TOOL.SPF from a Siemens 828D or 840D sl into an 808D?

No. The 808D uses a single-channel NCK with a simplified tool-management interface and a different PLC handshake (FC9/FC10 plus a reduced FB4). Tool-change macros written for 828D/840D sl call GUD layouts and PLC bits that do not exist on the 808D, and the resulting macro will compile but raise channel %1 ASUB execution alarms on the first T call. Always start from an 808D template or from the OEM's commissioning archive.

What is the default manufacturer password on a Sinumerik 808D?

The default is SUNRISE at protection level 3 (manufacturer). Most retrofit OEMs change this to a private value — common examples include CNC, FORSUN, or a numeric string. If the default does not work, contact the OEM rather than guessing. Three wrong entries trigger a power-cycle lockout on most 808D PPUs.

How do I take a complete backup of an 808D?

Open Commissioning > Series commissioning > Create archive, select NCK + PLC + drives + HMI (not just NCK), and write to a USB stick formatted in the controller. The archive file is stored under /sinumerik/data/archive/ with the date stamp. To verify, restore the archive to a different USB stick on a powered-up controller; the restore must complete without error to be considered a valid backup.

Why does the alarm persist after I rewrite TOOL.SPF?

The 808D holds an exclusive write lock on any program that is open in the editor. Until the lock is released — either by closing the editor cleanly, or by power-cycling the NCK — the interpreter continues to raise program will be edited. After rewriting the file, always perform a full NCK reset (Commissioning > NC > Reset (NCK)) followed by a power cycle, not just a Reset key on the HMI.

Back to blog