Troubleshooting Siemens 840D Error 17200 in TDI Ident Tool Delete

David Krause12 min read
Motion ControlSiemensTroubleshooting
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

On SINUMERIK 840D / 840D sl controls with active tool management and TDI Ident Connection sl active, operators commissioning gantry mills or similar dual-gripper magazines commonly encounter alarm 17200 "Tool data cannot be deleted" when an automated unload cycle tries to remove a tool that has just been transferred from the spindle to a buffer location.

The symptom pattern is consistent and reproducible:

  • The same DELT("T<no>",<duplo>) sequence works from MDI/MDA when the cycle is preceded by M30 or M02.
  • The same sequence inside an active part program returns alarm 17200.
  • Setting DB19.DBX196.3 = 1 (request: delete tool) from a cyclic M code produces the same alarm when invoked from inside a running NC program, but works from MDI.
  • Writing the tool data to the RFID code carrier via DB126 succeeds; only the subsequent deletion fails.

The root cause is not corrupted tool data, not an RFID handshake fault, and not a magazine geometry error. It is a tool selection condition in the NCK that persists even after the tool has been physically moved out of the spindle location.

Root Cause Analysis

Tool management in the 840D NCK maintains a current tool reference that is independent of the magazine slot occupancy. The reference is set by the last programmed T<no> selection and is only cleared when:

  1. A new T selection is executed (with or without M06), or
  2. An M30 or M02 resets the program context, or
  3. An explicit deselection is performed via the PLC/NCK interface.

When a cycle calls MVTOOL(state,9998,1,9998,4) to relocate the tool from the spindle (location type 1, location 9998, index 1) to the buffer (location type 1, location 9998, index 4), the NCK updates magazine occupancy but leaves the active tool pointer pointing at the relocated tool. From the tool list's perspective, the tool is still "in use" by the spindle, even though the spindle is now empty.

The DELT service (_N_TMDELT) and the equivalent FC8 task with TaskIdent = 5 (delete tool) both refuse to remove a tool that is referenced as the active D-number source. The NCK returns alarm 17200 with the supplemental text "tool data cannot be deleted." M30/M02 succeed because the program reset clears the active tool pointer as a side effect, which is why DELT runs without complaint immediately after the reset in MDI mode.

Affected System Configuration

Component Requirement / Setting
Control SINUMERIK 840D or 840D sl, NCU 561.x / 573.x / 710.x or compatible PCU 50.5
NCK software version SW 4.5 SPx and later for full tool management; verify with SETPI /_N_MA_INFO or HMI diagnostics
Tool management option Bit 1 (MM_TOA_UNIT) and magazine management bits enabled in machine data $MN_MM_TO_MANAGEMENT and $MN_MM_NUM_TO_MAG
TDI Ident option TDI Ident Connection sl option installed (article no. 6FC5800-0AP76-0YB0 or included in MCIS package)
Tool list layout Dual-gripper chain magazine with spindle as location type 1, index 1 (DBD 9998.1); buffer/pot as location type 1, index 4 (DBD 9998.4)
M code used for unload logic Custom M (e.g. M221) configured in $MN_M_NO_FCT_xx with subprogram call
Delete request bit DB19.DBX196.3 (DB19, byte 196, bit 3) - request delete tool
Code carrier interface DB126 (TDI Ident data block) - per Function Manual MCIS TDI Ident Connection sl
PLC FC used for tool mgmt FC8 (TM_TRANS) and FC6 (TM_GETTYP) per basic PLC program

Magazine Location Reference

Logical Name Location Type Number Index Role
Spindle 1 9998 1 Source: tool removed from here
Buffer / Pot 1 9998 4 Destination: holds tool during code carrier write
Dummy / T0 1 9998 2 or 3 Reserved for deselection target (recommended)
Gripper 1 / 2 1 9998 2 / 3 (if used) Available for dual-gripper chains
The exact location numbering for spindle, grippers, and buffer must be confirmed against the active magazine configuration loaded into the NCK. Use the HMI tool list "magazine" view to read the live _N_TM_MAG entries before hard-coding indices in cycles.

Diagnostic Procedure

  1. Trigger the failing cycle manually from MDI and observe the alarm line. Confirm the alarm number is 17200 and the supplementary text begins with "tool data cannot be deleted."
  2. Open the HMI diagnostics: Commissioning > NC > Tool Management > Tool List. Inspect the state column for the tool you attempted to delete. A tool flagged with active D-number compensation or active spindle reference will not be deletable.
  3. Read the PLC status from the basic program:
    DB71.DBX<tool_no_offset>.0 - tool exists
    DB71.DBX<tool_no_offset>.1 - tool disabled
    DB71.DBX<tool_no_offset>.2 - tool measured
    DB71.DBX<tool_no_offset>.3 - tool released (in active state)
    If bit 3 is set after MVTOOL has moved the tool out of the spindle, the active tool pointer has not been cleared.
  4. Insert a temporary write before the failing DELT:
    STOPRE
    R100 = $AC_TOOLNO (current tool number)
    R101 = $AC_DNUM (active D number)
    Compare R100 with the tool number you intend to delete. Equal values confirm the tool is still the active tool.
  5. Test the cycle termination theory: replace the cycle's terminating M17 with M30 and re-run. If DELT then succeeds, the cause is confirmed as residual active tool selection.

Solution Methods

Three field-proven remedies exist. Each clears the active tool reference so that DELT, FC8 TaskIdent=5, or DB19.DBX196.3 can complete without alarm 17200.

Method 1: T0 / Dummy Deselection in Cycle (Recommended)

Program a synchronous deselection by calling an unused or dummy tool before the delete:

; --- unload cycle ---
MVTOOL(2,9998,1,9998,4)    ; move from spindle to pot
M221                        ; write RFID via DB126
; --- force deselection ---
T0 M06                       ; or T"DUMMY" M06 if a placeholder tool exists
DELT("T<tool_no>",<duplo>)
M17                          ; safe to use M17 now

If your standard M06 would invoke a full tool change macro and re-introduce a tool into the spindle, use a second M function reserved for "effective tool change" (for example M206) that the PLC interprets as a no-op except for clearing the NCK active-tool pointer. Configure the M-code in machine data $MN_M_NO_FCT_E and link it in the basic PLC to a stub that returns immediately.

Method 2: Asynchronous Transfer via FC8 TaskIdent=4

FC8 (TM_TRANS) supports asynchronous relocation of the old tool to a destination defined by the last prepare-change command. This is the cleanest PLC-side remedy when you cannot modify the NC cycle:

Parameter Value Meaning
TaskIdent 4 Transfer old tool from gripper to magazine
TaskIdentNo 0 Default
NewToolMag Mag. number Target magazine
NewToolLoc Location number Target location in magazine
OldToolMag 9998 (buffer) Source magazine for old tool
OldToolLoc 4 Source location
Status Word Returns 1=ready, <0=error

After the FC8 call completes (poll the Status word or the corresponding ready bit in DB71), the active tool pointer has been updated and DELT can run in the next NC block.

Method 3: Program Reset via M02 / M30 Wrapper

When modifying the cycle is not possible, run DELT in a separate MDI-equivalent context by issuing a nested subprogram that terminates with M30 instead of M17:

; in main cycle
MVTOOL(2,9998,1,9998,4)
M221
CALL _DELT_WRAP
; back in main cycle, but state is preserved only if wrapper
; does not perform actual reset

This approach is fragile. The NCK will reset modal settings, G codes, and tool offsets on M30, which typically corrupts the calling program's context. Prefer Method 1 or Method 2.

PLC-NCK Interface Reference

Delete Tool Request Path

Signal Direction Meaning
DB19.DBX196.3 PLC → NCK Request delete tool
DB19.DBX197.3 NCK → PLC Delete acknowledgement/error
DB19.DBB198 NCK → PLC Status byte for delete request
DB71.DBX<n>.0 NCK → PLC Tool exists flag
DB72.DBW<n> NCK → PLC Tool number / duplo lookup
DB73.DBD<n> NCK → PLC Magazine location reference
DB74.DBW<n> NCK → PLC Active D-number offset
DB19.DBD<n> PLC → NCK PI service parameter index

FC8 (TM_TRANS) TaskIdent Catalog

TaskIdent Operation Use Case
1 Move tool (sync) Direct relocation between known locations
2 Prepare change Set up source/destination for upcoming M06
3 Perform change Execute change after M06
4 Transfer old tool (async) Relocate gripper contents to magazine
5 Delete tool Equivalent to DELT - subject to active-tool check
6 Create tool Equivalent to NEWT
7 Position magazine Rotate chain to specific location

Cycle Programming Patterns

Safe Unload-and-Delete Pattern (840D sl)

DEF INT _TOOL_NO, _DUPLO
DEF INT _ACTIVE_T, _ACTIVE_D

; --- read current tool ---
_STOPRE
_ACTIVE_T = $AC_TOOLNO
_ACTIVE_D = $AC_DNUM

; --- move to buffer ---
MVTOOL(2, 9998, 1, 9998, 4)

; --- write RFID via M221 (PLC sets DB126 and pulses ready) ---
M221

; --- explicit deselection: command T0 and clear offsets ---
T0
M206                            ; custom "effective no-op change"
D0

; --- delete from tool list ---
DELT("T" <<_TOOL_NO>>, _DUPLO)

M17

Variant: PLC-Driven Asynchronous Reload

For very large magazines where cycle execution time matters, the PLC can drive the deletion entirely asynchronously:

  1. Cycle sets a marker in the user interface DB (e.g. DB900.DBX10.0 = 1) and continues without DELT.
  2. PLC FC8 call with TaskIdent=4 runs in the background, moving old tool to a defined location.
  3. PLC polls DB71 for completion, then issues TaskIdent=5 to delete.
  4. PLC clears the marker and updates HMI tool list display.

This pattern decouples cycle execution from tool-list housekeeping and avoids tying the part program to ALC handshake timing.

Verification Steps

  1. Run the corrected cycle from MDI with the original part program loaded in the background. Confirm DELT returns without alarm 17200.
  2. Run the cycle from inside a part program that performs a previous tool change to a real tool. Verify the unload tool is removed from the tool list while the previously active tool remains correct.
  3. Check HMI tool list: the unloaded tool entry should disappear; D-numbers of remaining tools should be intact.
  4. Read $AC_TOOLNO and $AC_DNUM immediately after the cycle: both should reflect the new state (typically T0 / D0).
  5. Trigger a code-carrier read on a known tool to verify DB126 integrity was preserved.
  6. Stress test: run the cycle 50 consecutive times. Watch for memory or magazine-inconsistency alarms (14000-14999 series) that could indicate a hidden race between FC8 and the cycle.

Edge Cases and Field Notes

  • Multi-spindle configurations: The active-tool pointer is per-channel. If your cycle runs in a non-active channel of a multi-channel system, ensure the delete is targeted at that channel's tool list, not the global one.
  • Adaptive control with $AC_ADAPT: If adaptive feed tables are enabled and reference the tool's geometry, DELT will still be blocked until those tables are flushed. Issue STOPRE before DELT to settle the interpolator.
  • Persistent tool data ("P" status): Tools marked as persistent in the tool list (bit in DB71) cannot be deleted by standard DELT regardless of selection state. Clear the persistent bit in PLC before issuing delete.
  • Code-carrier verification: The Function Manual MCIS TDI Ident Connection sl mandates that 840D sl tool management must be installed and configured before TDI Ident Connection sl setup is allowed. If you bypassed the wizard and set up code carriers manually, DB126 may not be properly linked, which can mask the selection issue behind write faults.
  • M02 vs M30 in part programs: Some post-processors emit M30, others M02. The deselection effect is identical at the NCK level; both clear $AC_TOOLNO and $AC_DNUM. However, M30 also signals to the PLC that the program has finished and can be used to reset job counters in the HMI.
  • Re-entry protection: If the unload cycle is called twice in quick succession (e.g. operator double-press), the second call will see the tool already in the pot but still selected. Insert a guard at the start of the cycle:
    IF $AC_TOOLNO == 0 GOTOF _END

Troubleshooting Matrix

Symptom Likely Cause Action
17200 from cycle, OK from MDI Active tool pointer not cleared Apply Method 1 (T0 + M206)
17200 always, even MDI Persistent tool flag set Clear bit in DB71 / PLC
17200 after power cycle Tool list restore from CF card with mismatched active tool Re-initialise tool list, accept new active
17200 with multiple D numbers D number compensation still active Issue D0 before DELT
Write to DB126 fails TDI Ident Connection sl not configured Re-run setup wizard per Function Manual
DELT runs but tool reappears HMI cache not refreshed Re-read tool list, check DB72.DBX0.0
FC8 TaskIdent=4 returns error Old tool location mismatch Re-read current magazine position before call
M206 ignored by PLC Basic program not aware of custom M Update PLC basic program, link M206 to FC8 stub

Commissioning Checklist

  • Confirm tool management is licensed and enabled in $MN_MM_TO_MANAGEMENT, $MN_MM_NUM_TO_MAG, $MN_MM_NUM_LOCS.
  • Confirm TDI Ident Connection sl option is active and DB126 is generated by the setup wizard.
  • Map location types: spindle = 9998/1, buffer pot = 9998/4 (or per active configuration).
  • Define M206 as "effective no-op tool change" in $MN_M_NO_FCT_E and wire it in the basic PLC.
  • Place D0 reset before DELT in any cycle that touches the spindle.
  • Insert STOPRE before any DELT to flush the look-ahead.
  • Add re-entry guard using $AC_TOOLNO == 0.
  • Log $AC_TOOLNO and $AC_DNUM at cycle start and end for traceability.
  • Run a stress test of 50+ cycles to confirm race-free behaviour with FC8 background tasks.

What does Siemens 840D alarm 17200 mean exactly?

Alarm 17200 "Tool data cannot be deleted" is raised by the NCK when DELT, NEWT, or FC8 TaskIdent=5/6 is invoked on a tool that the NCK still considers selected as the active tool, has an active D-number compensation, or carries the persistent-tool flag. The alarm can also appear if the tool is still assigned to a fixed location in a non-empty magazine.

Why does the same DELT work from MDI but fail inside a part program?

MDI/MDA mode terminates with an implicit program reset when you exit or when the MDI session ends, which clears $AC_TOOLNO and $AC_DNUM. Inside a part program, the active tool pointer is preserved across cycles and is only cleared by a real tool change, by T0, or by an explicit reset. The cycle's M17 return does not perform a reset, so the pointer remains and DELT refuses to act.

Can I deselect a tool with T0 without triggering M06?

Yes. Configure a second M function (commonly M206) as the "effective tool change" M-code in the PLC. Call T0 M206 and the PLC stub clears the active-tool pointer without invoking any mechanical tool change. This is the cleanest cycle-based remedy and avoids touching the part program reset.

Is FC8 TaskIdent=4 always safe to use?

FC8 TaskIdent=4 ("Transfer Old Tool" asynchronous) is safe provided the source location and magazine numbers are read live from the NCK before each call. Hard-coding 9998/4 without verification can lead to magazine-inconsistency alarms if the tool is not actually in that location. Poll the status word and the corresponding ready bit before issuing a follow-up TaskIdent=5.

How do I confirm TDI Ident Connection sl is properly installed?

Check that DB126 is generated by the setup wizard, that the option bit is set in the license, and that the HMI menu shows "Code Carrier" entries under Tool Management. The Function Manual MCIS TDI Ident Connection sl requires 840D sl tool management to be installed and configured before TDI Ident Connection sl setup; otherwise the wizard will not generate DB126.

Back to blog