1. Overview of SINUMERIK 840D Tool Management
SINUMERIK 840D tool management is the Siemens-supplied runtime environment that orchestrates automatic tool changes between a machine spindle, a tool magazine, and intermediate carriers such as dual grippers, loading stations, and swivel arms. On the 840D PL (software version with integrated PLC) the control delegates all real-time sequencing to the S7-300-compatible PLC sub-system, while the NCK retains authority over the tool catalog, magazine geometry, and tool life monitoring. The PLC is therefore responsible for every mechanical handshake with the changer mechanics: clamping, unclamping, arm indexing, gripper transfer, and final acknowledgement back to the NCK.
Siemens packages this functionality as an optional compile-cycle / option set identified by MLFB 6FC5251-0AB12-0AA0. Without this option loaded, the NCK ignores the tool-management command bytes in the PLC-NC interface and the changer will not move. The option is purchased as a license key on the CF card and is selected in Commissioning > Licenses. The full functional specification, signal tables, and worked examples are documented in the SINUMERIK 840D sl Tool Management (FBWsl) function manual, which is the controlling reference for the descriptions below.
The standard PLC toolbox supplied with the COM archive (delivered with every 840D PLC programming package, ToolsPLC / PLC Programming Toolbox) contains a set of pre-built functions and function blocks that the integrator either calls directly or copies into the project as a starting point:
- FC6 — Transfer tool data to NCK (prepare status)
- FC7 — Loading the old tool (T command follow-up)
- FC8 — Acknowledge tool change completion
- FC9 — Search for empty location in magazine
- FC10 — Search for load location
- FC22 — Prepare tool change (decoded command, multi-step changer)
- FC25 — Decoding tool change commands for complex magazines
- FB110 — Worked example for chain magazine with single gripper
- FB111 — Worked example for disk magazine or dual-gripper 8-carrier changer
Each block is implemented in the supplied toolbox as S7 STL / SCL source so it can be opened in STEP 7 (or TIA Portal with the SINUMERIK add-in) and adapted to the physical hardware I/O of the machine.
2. Required Option, License, and PLC Hardware
Before any function block will execute correctly, the integrator must verify that the four preconditions in the table below are satisfied. Skipping any of these items produces NCK alarm 8022 "Tool management option not set" or 17000 "Channel not ready" on the first tool change attempt.
| Item | Requirement | Verification Path |
|---|---|---|
| Option MLFB | 6FC5251-0AB12-0AA0 enabled | Commissioning → Licenses → Option list |
| NCK software | 840D PL with TM enabled in machine data | MD 18080 $MN_MM_TOOL_MANAGEMENT_MASK |
| Magazine configuration | Magazines, distances, and tools defined in TOA | HMI → Tools → Magazine list |
| PLC toolbox | FC6/FC7/FC8/FC22, FB110/FB111 present in S7 project | STEP 7 symbol table or TIA project tree |
18080 bit 0 = 1, which enables the TM command interpreter.3. Tool Management Architecture and NCK-PLC Interface
The tool-management signal set is distributed across three data blocks in the PLC user program. These blocks are hard-coded logical interfaces: the NCK writes command and status data to them, and the PLC reads from / writes to them. The integrator must not move or rename these blocks, because the NCK looks up the pointer in the configured machine data (default is the same DB numbers as below).
| DB | Direction | Purpose |
|---|---|---|
| DB72 | PLC → NCK | Command words, acknowledgement, change-task data |
| DB73 | NCK → PLC | Status words, current command, last change task |
| DB74 | NCK → PLC | Spindle / tool holder status, magazine position |
| DB75 | NCK → PLC | Optional tool-management status (extended) |
The two blocks most relevant during a tool change are DB72 and DB73. DB72 carries the change-task data that the PLC must execute; DB73 reports the current state of the NCK command interpreter. The PLC sequence engine (FC8, FC22, etc.) reads DB73 to know what the NCK is asking for, performs the mechanical motion, and writes the result back into DB72.
4. Acknowledgment Signals: DB72.DBX4.1, DBX4.2, DBX4.3
Byte 4 of DB72 is the acknowledgement channel. Each bit is an edge-triggered signal that the PLC sets high for one PLC cycle when it has completed a specific sub-step of the tool change. The three signals referenced in the field report are decoded as follows:
| Address | Name | Function |
|---|---|---|
| DB72.DBX4.1 | Acknowledgement (-1)
|
Tool placed in the previous magazine location, decrement position counter (e.g. gripper 1 returned tool to source magazine location) |
| DB72.DBX4.2 | Acknowledgement (+1)
|
Tool moved forward in the sequence, increment position counter (e.g. gripper 2 picked new tool from target location) |
| DB72.DBX4.3 | Acknowledgement (old position)
|
Old tool has been returned to its original magazine location and the changer has returned to the home position; the NCK may clear the task |
The exact meaning of each acknowledgement bit is configured by the magazine definition in the TOA (Tool Offset Active) area, specifically by the bits set in MD 20310 $MC_TOOL_MANAGEMENT_MASK and the bit maps in $TC_MAPx. For a chain magazine with a single gripper, only the "old position" acknowledgement is typically required. For a dual-gripper or dual-arm disk changer, both (-1) and (+1) are used because two simultaneous transfers occur.
17181 "No acknowledgement from PLC for tool change." The Siemens toolbox blocks implement a one-cycle pulse with a SET/RESET pair and an internal timer; the integrator should follow the same pattern.5. Change-Task Data Words: DB72.DBW20 – DBW26
Bytes 20 through 27 of DB72 carry the data words that identify which magazine, which location, and which tool is being moved in the current sub-step. The data words are written by the NCK when it issues a change task, and the PLC reads them to determine where the gripper or arm needs to travel. The mapping shown below corresponds to the standard 840D sl tool-management interface:
| Address | Type | Meaning |
|---|---|---|
| DB72.DBW20 | INT | Source location number (magazine place the tool is leaving) |
| DB72.DBW22 | INT | Target location number (magazine place the tool is going to) |
| DB72.DBW24 | INT | Source magazine number |
| DB72.DBW26 | INT | Target magazine number |
For a single-magazine, single-gripper machine only DBW20 and DBW22 are meaningful; DBW24 and DBW26 both contain the active magazine reference. For a two-magazine setup (e.g. a loading magazine plus a working magazine) all four words are used and the PLC must route the motion accordingly.
6. Status Return Channel: DB73
DB73 is the NCK's status output to the PLC. During a tool change the PLC polls DB73 to know which sub-command the NCK is currently demanding. Key fields in DB73 (offsets shown are for the standard 840D sl layout; verify against your project-specific header file):
| Address | Type | Meaning |
|---|---|---|
| DB73.DBX0.0 | BOOL | Change active (NCK has a pending T command) |
| DB73.DBX0.1 | BOOL | Tool change in progress (PLC has acknowledged start) |
| DB73.DBX0.2 | BOOL | Change complete (NCK is waiting for next block) |
| DB73.DBB2 | BYTE | Current command code (matches FC7/FC8/FC22 selection) |
| DB73.DBW4 | INT | Current tool number in spindle |
| DB73.DBW6 | INT | Current tool number at the active gripper |
The toolbox's FC8 is a polling block: it reads DB73, decides which acknowledgement bit in DB72 to fire, and returns the appropriate status. The integrator typically calls FC8 in OB1 or in a cyclic task at a defined priority (e.g. OB35 at 100 ms) so the changer response stays well within the time-out window of 30 s defined in machine data MD 10110 $MN_PLC_CYCLE_TIME_AVERAGE divided by the NCK task time.
7. FC7 — Loading the Old Tool
FC7 implements the "load old tool" command. It is called by the PLC application when the NCK has signalled via DB73 that the spindle currently holds a tool that must be returned to a magazine location. The integrator calls FC7 in the change sequence immediately before the mechanical unclamp command and after the spindle has been oriented to the tool-change position.
FC7 performs the following steps internally:
- Reads the source magazine and location from DB72.DBW24/DBW20.
- Verifies that the tool is present (cross-checks against the tool catalog state).
- Sets DB72.DBX0.0 = 1 to start the NCK-side transfer state.
- Returns a status word indicating success, position not found, or magazine disabled.
17150 "Command already active." Always wrap the call with an interlock that checks DB73 state first.8. FC8 — Tool Change Acknowledgement
FC8 is the central acknowledgement block referenced most frequently in the field report. It is the function that fires the DB72.DBX4.x bits and writes the completion data words back to the NCK. A typical call looks like the SCL stub below:
// SCL call to FC8 from FB111
IF bChangerReady AND bArmHome AND bSpindleOriented THEN
FC8(
i_Command := wCurrCmd, // from DB73.DBB2
i_SourceMag := DB72.DBW24,
i_SourcePlace := DB72.DBW20,
i_TargetMag := DB72.DBW26,
i_TargetPlace := DB72.DBW22,
b_AckMinus := bStepMinus, // -> DB72.DBX4.1
b_AckPlus := bStepPlus, // -> DB72.DBX4.2
b_AckOldPos := bHome, // -> DB72.DBX4.3
w_Status := wRetStat
);
END_IF;
The exact symbol names of the FC8 formal parameters differ by Toolbox version, but the addressing is identical: every write inside FC8 targets one of the DB72.DBX4.x acknowledgement bits. The integrator never has to write those bits directly if FC8 is used. The standard toolbox version of FC8 is the recommended path; rewriting the acknowledgement logic from scratch is rarely necessary and is the most common source of 17181 alarm faults.
9. FC22 — Tool Change Preparation
FC22 is the "prepare tool change" block. It is used on machines where the changer needs to be set up before the spindle actually arrives at the tool-change position — for example, an arm-type disk changer that pre-indexes the next tool pocket while the spindle is still cutting. Calling FC22 tells the NCK to reserve the new tool in its internal database and to update the tool catalog state to "reserved for change," so a competing T command will be rejected with alarm 17220 rather than corrupting the magazine table.
FC22 is typically the first block called in the change sequence. The recommended call order on a complex changer is:
- FC22 (prepare)
- Mechanical pre-index and gripper pick
- FC7 (load old tool) — only if the spindle holds a tool
- Mechanical transfer and spindle clamp
- FC8 (acknowledge)
10. Worked Example: FB110 Chain Magazine
FB110 is the Siemens-supplied example block for a chain magazine with a single gripper. It is the smallest complete example in the toolbox and is the right starting point for any new tool-management project. FB110 calls FC7 and FC8 internally and adds the standard sequence engine:
- Read DB73 to detect a new T command.
- Calculate the magazine travel distance (longest-axis or shortest-path search).
- Drive the magazine motor to the target pocket.
- Extend the gripper, grip the old tool, retract.
- Unclamp the spindle, swing the arm into position, clamp the new tool.
- Fire the
old positionacknowledgement via FC8.
To use FB110, copy the block from the toolbox into your S7 project, assign it an instance DB (e.g. DB120), and call it from OB1 with the magazine I/O symbols as inputs. The two acknowledgement bits used by FB110 are DBX4.2 (step (+1)) for the new tool pickup and DBX4.3 (old position) for the final return-to-home signal.
11. Worked Example: FB111 Dual-Gripper 8-Carrier Changer
FB111 is the example block used in the field report on the CW800 Fritz Heckert lathe. The CW800 is fitted with a twin-gripper arm and an 8-pocket disk magazine, so the changer must:
- Verify that a tool is in the spindle.
- Pick the new tool from the magazine with gripper 2.
- Deposit the old tool in the gripper 1 pocket or directly into a free magazine location.
- Perform the spindle swap.
- Return the gripper 1 arm to the magazine and load the old tool into the empty pocket.
FB111 therefore fires all three acknowledgement bits: DBX4.1 when gripper 2 has moved (-1) in the sequence, DBX4.2 when gripper 1 has moved (+1), and DBX4.3 when the changer is back at the home position. The eight acknowledgement slots inside FB111 correspond one-to-one with the eight carrier positions of the disk magazine. The carrier data (DB72.DBW20–DBW26) is read in pairs, with the source/target magazine numbers identifying which carrier the gripper is currently working.
The mask ToolManagement in the HMI (operator menu, softkey "Magazine" → "ToolManagement") can be used to monitor FB111 in real time: the current command code, the source and target location numbers, and the last acknowledgement timestamp are all visible, which is invaluable during commissioning.
12. Step-by-Step Implementation on a 840D PL
The procedure below assumes a fresh PLC project, a licensed 840D PL NCU, and STEP 7 Classic (the same flow applies to TIA Portal with the SINUMERIK add-in; the block names are unchanged). The CW800 example from the source is used as the reference machine.
-
Verify the option. On the HMI, navigate to Commissioning → Licenses and confirm that option
6FC5251-0AB12-0AA0is shown as set. If the entry is missing, the NCK will not service DB72/DB73. -
Check machine data. Open the machine data display in Commissioning → Machine Data and confirm
MD 18080 $MN_MM_TOOL_MANAGEMENT_MASKhas bit 0 = 1 andMD 20310 $MC_TOOL_MANAGEMENT_MASKhas the bits for "old position acknowledgement" and "(-1) / (+1) acknowledgement" enabled to match your changer type. - Import the toolbox. Open the PLC project in STEP 7, choose Options → SINUMERIK 840D ToolBox (or copy the supplied STL sources), and import FC6, FC7, FC8, FC22, FB110, and FB111 into the program.
- Assign the DB numbers. Confirm that DB72, DB73, DB74, and DB75 exist with the correct lengths (typically DBW128 or DBB256 depending on the number of magazines). Do not reuse these DB numbers for other purposes; the NCK writes into them directly.
- Adapt the example FB. If your machine is a single-gripper chain magazine, copy FB110 to a new FB (e.g. FB100) and rename the I/O symbols to match your magazine motor, gripper, and clamp signals. If it is a dual-gripper disk, copy FB111 instead.
- Wire the acknowledgement logic. Inside the FB, set the call to FC8 with the correct edge-triggered booleans for DBX4.1, DBX4.2, and DBX4.3. Use a SET/RESET pair or the toolbox default; do not drive the bits as level signals.
- Configure the magazine in the TOA. On the HMI, open Tools → Magazine and define the magazine type, number of pockets, and tool list. The change-task generator inside the NCK uses this data to populate DB72.DBW20–DBW26 during a T command.
-
Run a dry cycle. With the spindle in a safe position, enter
T1 M6in MDA. Observe DB73.DBX0.0 transition from 0 to 1; the PLC must respond with the first acknowledgement within 30 s. - Verify the change. Watch the HMI ToolManagement mask: the spindle line must show the new tool and the magazine line must show the old tool in the correct pocket. DB72.DBX4.3 should pulse high at the end of the cycle.
- Document and lock. Save the project, archive the STEP 7 source, and protect the blocks against accidental write access via the PLC password.
13. Verification Checklist
After a successful first tool change, run the following acceptance checks. They cover the most common commissioning gaps seen in the field and align with the safety tests required by the SINUMERIK 840D sl Tool Management function manual.
| Check | Expected Result | What it Verifies |
|---|---|---|
| HMI magazine list shows the new tool at the spindle | Yes | FC8 acknowledgement reached the NCK |
| Old tool shows in the original magazine location | Yes | FC7 / old-position acknowledgement correct |
| DB72.DBX4.1, DBX4.2, DBX4.3 pulse for 1 cycle only | Yes | No stuck acknowledgement bits |
| DB73.DBX0.0 returns to 0 after the change | Yes | NCK has cleared the pending T command |
| NCK alarm log is empty | Yes | No 17150/17181/17220 alarms |
| Repeat T1 M6 ten times in MDA | Ten consecutive successes | No intermittent timing faults |
| Spindle speed 0, gear stage clear, axis enable | Yes | Safety interlocks intact |
14. Troubleshooting Matrix
The faults below are the ones most frequently reported when commissioning the 840D PL tool changer. The diagnostic logic and addresses are taken from the function manual and the field report.
| Symptom | Likely Cause | Action |
|---|---|---|
| Alarm 8022 "Tool management option not set" | Option 6FC5251-0AB12-0AA0 not licensed | Load license on CF card, NCK reset |
| Alarm 17181 "No acknowledgement from PLC" | DB72.DBX4.x driven as level, or wiring reversed | Convert to one-cycle pulse via FC8 |
| Alarm 17150 "Command already active" | FC7 called while DB73.DBX0.1 is still set | Insert pre-call interlock on DB73 |
| Alarm 17220 "Tool already reserved" | FC22 not used, two T commands issued back-to-back | Always call FC22 first in the sequence |
| Changer moves but tool remains in spindle | Spindle clamp I/O not wired to the FB | Verify clamp feedback signal in FB110/FB111 |
| Magazine rotates past the target pocket | Shortest-path search disabled in MD 20272 $MC_TOOL_CHANGE_M_CODE | Enable shortest-path search in machine data |
| HMI shows wrong tool in spindle after change | DB72.DBW20/DBW22 swapped in PLC code | Cross-check with TOA tool list and swap data words |
| FB111 example compiles but second gripper does not move | DBX4.1 acknowledgement not wired | Add the (-1) acknowledgement inside FB111 instance |
15. Safety and Commissioning Notes
- Disable the spindle drive (DB31.DBX61.0 = 0) before any tool change during commissioning. The NCK will not enforce this; it is the integrator's responsibility.
- Always program an emergency-stop category 1 stop on the magazine drive and the gripper, separate from the spindle ESTOP chain. A common field fault is to wire the magazine into the spindle ESTOP, which then triggers a coast-down that drives the gripper into the spindle taper.
- The acknowledgement time-out defaults to 30 s; reduce it to the value in your PLC cycle analysis. A long time-out hides intermittent faults but masks genuine gripper stalls.
- For 840D PL systems with safety-integrated (SINUMERIK Safety Integrated plus / F-PLC), the F-PLC must monitor the spindle clamp and the gripper position independently of the standard tool-management DBs. The standard FC7/FC8 chain is not safety-rated.
- After any change to the magazine configuration, regenerate the PLC interface DB72–DB75 with the correct lengths; an undersized DB73 will cause the NCK to write past the end and corrupt the next DB.
16. Further Reference Material
For the complete signal map, the full source code of FC6/FC7/FC8/FC22, and the worked example archives for FB110 and FB111, consult the SINUMERIK 840D sl Tool Management function manual hosted on the Siemens support portal. The product family page for the broader SINUMERIK control range is also useful when comparing 840D to 840D sl or to the newer ONE platform.
Frequently Asked Questions
What option enables SINUMERIK 840D tool management?
Tool management is enabled by option MLFB 6FC5251-0AB12-0AA0. The license must be present on the CF card and the option bit in MD 18080 $MN_MM_TOOL_MANAGEMENT_MASK must be set, otherwise the NCK ignores the tool-change commands in DB72/DB73.
What is the difference between FC7, FC8, and FC22?
FC7 loads the old tool currently in the spindle, FC8 fires the acknowledgement bits in DB72.DBX4.1/4.2/4.3 to confirm completion, and FC22 prepares a tool change by reserving the new tool in the NCK catalog so concurrent T commands cannot corrupt the magazine table.
Which PLC interface signals are used for the tool change handshake?
The handshake runs over DB72 (PLC to NCK) and DB73 (NCK to PLC). DB72.DBX4.1, DBX4.2, and DBX4.3 are the edge-triggered acknowledgement bits; DB72.DBW20 to DBW26 carry the source/target location and magazine numbers used by the changer sequence.
Should I use FB110 or FB111 as a starting point?
Use FB110 for chain magazines with a single gripper; use FB111 for dual-gripper disk or arm changers. FB111 is the example used on the CW800 Fritz Heckert machine and fires all three acknowledgement bits (DBX4.1, DBX4.2, DBX4.3) to coordinate both grippers.
Why does the NCK raise alarm 17181 immediately after a tool change?
Alarm 17181 "No acknowledgement from PLC for tool change" is raised when the acknowledgement bits in DB72.DBX4.x are driven as level signals or are not pulsed within the configured time-out (default 30 s). Always use the toolbox FC8 or a one-cycle pulse generator to set these bits.