Hiding Spindle from 840D MCS/WCS Display via MD20098

David Krause14 min read
HMI / SCADASiemensTutorial / How-to
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

Overview

The Sinumerik 840D operator panel renders channel axis positions in the Machine Coordinate System (MCS) and Workpiece Coordinate System (WCS) views. By default, every axis declared in the channel — including the spindle (SP) — appears in the position list. On a 5-axis milling centre configured as X, Y, Z, W, SP, V, B the position screen typically renders seven rows; the spindle row shows either current speed or rotational position depending on the spindle mode. Many machine builders prefer to suppress the spindle row from the operator panel because the rotation field clutters the screen, because tool-change and rigid-tapping operations produce transient position jumps in the SP row that operators misread as faults, and because some OEM templates reserve the row for custom widgets (counters, override, secondary status).

Channel machine data MD20098 $MC_DISPLAY_AXIS controls exactly this behaviour. It is a 32-bit field where each bit maps one-to-one with a channel axis index; clearing the bit for the spindle removes its row from every HMI view that consumes the channel axis list. The setting is cosmetic — spindle commands (M03, M04, M05, S-word, SPOS, rigid tapping G84/G88) are unaffected.

Prerequisites

Before editing MD20098, verify the following:

  • HMI access level Manufacturer — the password-protected level required for channel machine data writes. The User, Service, and Operator levels cannot edit MD20098.
  • The spindle's axis index inside the channel (1-based, in the order defined by $MC_AXCONF_CHANAX_NAME_TAB). This is the bit position you must clear.
  • NCK reset capability: a channel reset is normally sufficient. A full NCK restart (NCU power cycle) is only required when an MD attribute flag mandates it for that firmware build.
  • For PLC writes: STEP 7 / TIA Portal project with the Sinumerik Toolbox blocks loaded, including FB101 (NC-VAR selector), FB2 (PUT), and FB3 (GET). See the Sinumerik PLC programming manual on Siemens Industry Online Support.
  • A backup of the existing NCK machine data captured via Start-up > Series commissioning > Save or via the pi_save_mddb PI service, so you can revert if the change misbehaves.

Understanding MD20098 $MC_DISPLAY_AXIS

MD20098 is a channel-scope machine data item with the long name $MC_DISPLAY_AXIS and the HMI label Bit-coded display of the axis in MCS / WCS view. It is declared as a bitfield with up to 32 bits — one bit per channel axis position. Each bit independently toggles whether the corresponding axis is rendered in the operator screen's position block.

Attribute Value
MD number 20098
Long name $MC_DISPLAY_AXIS
Scope Channel (C)
Type BOOLEAN array (32-bit field)
Default All active bits set to 1 (every axis visible)
Read access Manufacturer, Commissioning, Safety, Operator
Write access Manufacturer only
Change effectiveness Immediately after channel reset (no NCK restart required)
Although the bit field has 32 positions, only the bits corresponding to active channel axes (those declared in $MC_AXCONF_CHANAX_NAME_TAB) are evaluated. Bits for non-existent axes are ignored by the HMI and by any PLC code that reads the field back.

Bit Layout and Axis Mapping

The bit index is zero-based and matches the axis position in the channel axis table. Bit 0 controls the first axis, bit 1 the second, and so on. The HMI does not redraw the position block until the next refresh cycle (default 200 ms, controlled by MD9000 $MM_DISPLAY_RESOLUTION and the configured cycle time on the HMI). The diagram below shows the bit layout for the example 7-axis configuration.

MD20098 $MC_DISPLAY_AXIS — clear bit 4 to hide the spindle (SP) Bit 0X Bit 1Y Bit 2Z Bit 3W Bit 4SP Bit 5V Bit 6B Bit 7+unused Default value: 0x0000007F (bits 0–6 = 1, all 7 axes visible) With SP hidden: 0x0000006F (bit 4 cleared, binary 0110 1111) Bit numbering: bit 0 = LSB (axis 1 in $MC_AXCONF_CHANAX_NAME_TAB) Bits 8–31 follow the same pattern for axes 9–32; ignored if the axis is not declared in the channel

Identifying the Spindle's Axis Index

Before writing, confirm the spindle's bit position. Two methods are reliable:

  1. HMI path: Start-up → Machine Data → Channel MD → Axis configuration. The $MC_AXCONF_CHANAX_NAME_TAB list shows channel axes in index order; the spindle row reveals its index.
  2. Programmatic readback: issue an NC-VAR selector GET on $MC_AXCONF_CHANAX_NAME_TAB for each index, or read DB31..DB61.DBB2 on the PLC side (axis name field) to map PLC axis DBs to channel indices.

For the example machine X, Y, Z, W, SP, V, B, the channel axis table typically lists SP at axis index 5 (0-based: bit 4). If your project reorders the table — for example by declaring B before W — the spindle bit may shift. Verify before writing.

Some OEMs declare the spindle as a separate axis via $MC_AXCONF_CHANAX_NAME_TAB[<n>] = "S" or "SP1". The index n in that array is the bit you must clear; do not assume the spindle is always bit 4.

Method 1: Direct HMI Configuration

The fastest path for a one-time commissioning change is via the SINUMERIK Operate (or HMI Advanced) start-up area. The procedure below works on 840D sl, 840D pl legacy systems, and Sinumerik ONE with Operate 4.5 SP2 or later.

  1. Select access level Manufacturer from the HMI login dialog or by turning the keyswitch to position 3.
  2. Navigate to Start-up → Machine Data → Channel Machine Data.
  3. Type 20098 into the search box and press Enter. The HMI filters down to a single entry showing the bit-coded field.
  4. Open the entry. The editor displays a 32-bit hex/decimal representation of the current value plus a row-by-row axis table for the active channel.
  5. Identify the spindle row (axis name SP, S, or S1) and uncheck the corresponding checkbox, or set the bit directly to 0.
  6. Press OK (or Accept) to commit. The HMI prompts for a channel reset if needed.
  7. Trigger a channel reset via the Reset key on the MCP, or via the HMI button Channel reset in the start-up area.
  8. Switch to the MCS/WCS view: the SP row should be absent.
On 840D pl (legacy) without Operate, the path is Start-up → Machine Data → Channel MD → … and the editor opens a single bit-row view. Selecting Axis = 5 and Value = 0 is equivalent. The legacy HMI may not show a graphical axis-table editor; the operator must type the bit value directly.

Method 2: PLC NC-VAR Selector (FB101 + FB2)

Use the PLC path when the change must be conditional — for example, hide the spindle only during a specific OEM screen, then restore it after a setup operation — or when an external signal drives the toggle. The Siemens toolbox provides three function blocks that work together. Reference the Sinumerik PLC basic program list on Siemens Industry Online Support for the block versions shipped with your toolbox.

Block Function Call source
FB101 NC-VAR selector — formats the variable access into a request data record Called first to resolve the variable
FB2 PUT — writes a value to the NCK Called after FB101 to perform the write
FB3 GET — reads a value from the NCK Optional, used for verification reads

The variable descriptor is built once and stored in the instance DB of FB101; subsequent FB2 / FB3 calls reference that DB by passing the same DB number.

Variable Specification

Fill the input structure of FB101 with the following values. The selector UI on the HMI accepts these as strings; the PLC string constants below match character-for-character.

Field Value Meaning
Unit C Channel scope
Variable name DISPLAY_AXIS Long name without $MC prefix
Number 20098 Direct MD lookup
Block Y System / user data
Line 5 Axis index in the channel (spindle)
Column 0 Not applicable for bit fields
Type BOOLEAN Bit-field element

When the selector resolves the request, it writes the resolved access pointer (NCK variable address and length) into the request data record used by FB2 / FB3. The optional Edit, Search, Filter Variables box on the NC-VAR selector accepts the MD number directly — type 20098 into the Machine/Setting Data Number box and the selector resolves the rest.

SCL Programming Example

The following SCL (Structured Control Language) snippet inside a STEP 7 / TIA Portal function block hides the spindle (axis index 5) of channel 1, then verifies by reading the value back with FB3.

// Instance DBs
// NCVAR_DB : instance of FB101 NC-VAR selector
// PUT_DB   : instance of FB2   PUT
// GET_DB   : instance of FB3   GET

IF "i_HideSpindle" AND NOT "Busy" AND NOT "Error" THEN
    // ---- Configure the variable request ----
    "NCVAR_DB".Unit       := 'C';           // Channel scope
    "NCVAR_DB".VarName    := 'DISPLAY_AXIS';
    "NCVAR_DB".VarNumber  := 20098;
    "NCVAR_DB".Block      := 'Y';
    "NCVAR_DB".Line       := 5;             // spindle axis index
    "NCVAR_DB".Column     := 0;
    "NCVAR_DB".ReqType    := 2;             // 2 = write (PUT)

    // Trigger FB101 to resolve the access pointer
    "NCVAR_DB".REQ := TRUE;
    IF "NCVAR_DB".DONE THEN
        "NCVAR_DB".REQ := FALSE;

        // ---- PUT value: clear bit for axis 5 ----
        "PUT_DB".REQ     := TRUE;
        "PUT_DB".ID      := 1;              // NCK connection ID
        "PUT_DB".ADDR    := "NCVAR_DB".Addr; // resolved pointer
        "PUT_DB".SD[1]   := BOOL#FALSE;     // 0 = hide
        IF "PUT_DB".DONE THEN
            "PUT_DB".REQ := FALSE;
            "Busy" := FALSE;
        END_IF;
        IF "PUT_DB".ERROR THEN
            "PUT_DB".REQ := FALSE;
            "Error"   := TRUE;
            "Status"  := "PUT_DB".STATUS;
        END_IF;
    END_IF;
END_IF;

LAD / FBD Equivalent

In ladder or function block diagram the call pattern is identical:

  1. Wire a normally-open contact from the Hide Spindle trigger tag to the REQ input of the FB101 instance.
  2. Pre-assign the input fields (Unit, VarName, VarNumber, Block, Line, Column) using MOVE boxes fed from constants.
  3. Call FB2 below FB101; route NCVAR_DB.DONE into PUT_DB.REQ.
  4. Capture PUT_DB.DONE and PUT_DB.ERROR outputs into flags for HMI feedback (status word, alarm bar, or message line).

Verification Procedure

  1. Confirm the write by reading MD20098 back through HMI Start-up → Machine Data → Channel MD, or by issuing a GET request with FB3 from the PLC.
  2. Switch the HMI to MCS view: the position block should list only X, Y, Z, W, V, B (six rows).
  3. Switch to WCS view: same six rows. The spindle row should remain hidden.
  4. Cycle the HMI display mode through JOG, MDA, AUTO: the spindle should remain hidden in every mode.
  5. Test M03 / M04 / M05: spindle rotation commands should still execute. The DB31..DB61 axis-status bits on the PLC still reflect spindle rotation regardless of the HMI display.
  6. Power-cycle the NCU: confirm the setting persists (MD20098 is non-volatile; persisted via the active NCK file system).

Related Channel Machine Data

MD20098 does not work in isolation. Several adjacent MDs interact with the axis display and must be consistent with it.

MD Name Relationship
20050 $MC_AXCONF_GEOAX_ASSIGN_TAB Geometry-axis assignment; affects MCS/WCS transformation chain
20060 $MC_AXCONF_MACHAX_USED Logical-to-machine axis mapping
20070 $MC_AXCONF_MACHAX_NAME_TAB Machine-axis names
20080 $MC_AXCONF_CHANAX_NAME_TAB Channel-axis names — defines the order MD20098 indexes
20090 $MC_AXCONF_CHANAX_DEFAULT_NAME_TAB Default channel-axis names (used when $MC_AXCONF_CHANAX_NAME_TAB is empty)
20100 $MC_DIAMETER_AX_DEF Diameter-programming flag; spindle is never on this list
20110 $MC_RESET_MODE_MASK Defines reset behaviour; spindle bit controls spindle behaviour on reset
20150 $MC_GCODE_RESET_VALUES G-code reset values (G0, G1, G17, G90, …)
28020 $MC_MM_NUM_SPINDLES Number of spindles declared in the channel
MD20100 $MC_DIAMETER_AX_DEF defines which linear axes are programmed as diameters. The spindle is never included in this list, so hiding the spindle via MD20098 has no effect on diameter-programming behaviour.

Cross-Channel and Multi-Spindle Considerations

MD20098 is per-channel. A 5-axis machine with two channels — for example channel 1 for milling, channel 2 for a tail spindle on a lathe-mill combination — requires the change to be applied to each channel separately. If channel 2 is configured as Channel not active, the MD20098 write in channel 2 still succeeds but takes no display effect.

For machines with multiple spindles (SP1, SP2, sometimes SP3), the channel axis table contains every spindle as a separate axis entry. Clear the bits for every spindle index. To find them, look at $MC_AXCONF_CHANAX_NAME_TAB in Start-up → Machine Data → Channel MD → Axis configuration, or read each entry via the NC-VAR selector GET interface.

Software Variant Compatibility

Controller HMI MD20098 supported Notes
Sinumerik 840D (classic) HMI Advanced / Operate Yes Menu path differs slightly on legacy HMI Advanced
Sinumerik 840D sl Operate 4.5 SP2+ Yes Standard procedure as described above
Sinumerik 840D sl (early) Operate 4.0–4.5 Yes Field label reads "Bit-coded display"; same bit layout
Sinumerik ONE Operate 6.x Yes Same parameter, same access path, same PLC block interface
SinuTrain (PC simulation) Operate (slim) Yes Effective immediately, no NCK reset prompt; useful for offline commissioning rehearsal

Troubleshooting Matrix

Symptom Likely cause Remediation
Spindle row still visible after HMI edit Channel not reset, or write applied to wrong channel number Trigger a channel reset; verify the channel number in the start-up area matches the active channel
SP row hidden but position field still shows 0.000 deg Old HMI page cached; WCS widget pulls from a different source Switch HMI view and back; reload the Operate browser page
PLC PUT fails with STATUS = 0x0F Access level is User or Service, not Manufacturer Raise access level to Manufacturer via password before the FB2 call; verify FB2 connection ID matches the active NCK connection
PLC PUT fails with STATUS = 0x1F Line parameter out of range or axis does not exist Verify spindle axis index in $MC_AXCONF_CHANAX_NAME_TAB; clamp Line to the active range
Edit field shows all bits locked Keyswitch in OPERATOR or USER position Move keyswitch to SETUP or higher; enter the Manufacturer password
Multiple spindles declared, only one hidden Only one bit cleared Clear the bit for every spindle axis index declared in the channel
Setting lost after NCU restart Configuration not saved via series commissioning Run Start-up → Series commissioning → Save; verify the backup file exists on the CF card
Tool-change macros refer to SP position field OEM macro queries the HMI widget, not the actual axis position Update macro logic to read $AA_IM[SP] or DB31..DB61 axis DBs directly
Operator reports "missing axis" alarm Geometry axis accidentally hidden instead of spindle Restore bits 0–2 (X, Y, Z) to 1; only bit 4 should be cleared in this scenario
WCS view shows transformed coordinates but MCS shows spindle MCS display uses a different filter or a custom widget Check OEM-specific HMI project; some custom screens override MD20098 with their own filter

Backup and Reset Procedures

After the change is verified, persist it across NCK power cycles:

  1. Navigate to Start-up → Series commissioning → Save.
  2. Select the channel and the MD group (or full backup) and confirm.
  3. Verify the backup file is written to the CF card or system memory; check the file timestamp.

To revert the change without losing other settings, set MD20098 back to its previous value (typically 0x0000007F for a 7-axis channel where all bits are visible, i.e., bits 0–6 set), perform a channel reset, then re-save the series commissioning file.

To perform a full reset to factory defaults for this MD only, use Start-up → Machine Data → Reset MD with filter Channel MD → MD20098. The reset takes effect after the next channel reset.

Safety and Operational Notes

  • Hiding the spindle from the HMI does not disable the spindle. M03, M04, M05, S-word programming, SPOS, and rigid tapping remain fully active.
  • The PLC-controlled axis-status DBs (DB31..DB61) are unaffected; the spindle's status bits, position feedback, and drive-status words remain visible to the PLC.
  • Synchronized actions and OEM macros that reference $AA_IM[SP] continue to read the spindle position normally. Only the operator-screen widget consumes MD20098.
  • Tool-change programs that expect the SP row to display a tool number are not affected; tool data appears in the tool list and the tool-change widget, not in the axis position block.
  • For collision-monitoring setups (e.g., NX protective zones), the spindle must remain declared in the channel axis table. Hiding via MD20098 is a display-only change and does not alter kinematics.
  • Operator training: after hiding the spindle row, update any operator-facing documentation that referenced the SP position as a status indicator. Operators should rely on the spindle-load display, the override indicator, and the actual S-word value for spindle status.

Frequently Asked Questions

Does MD20098 affect displays other than MCS and WCS?

Yes. The bit controls the channel-axis position block on every standard view that consumes it: MCS, WCS, plus user-defined OEM screens that read the channel axis list. It does not affect the tool list, alarm line, or channel-status line.

Is a channel reset or a full NCK restart required after writing MD20098?

A channel reset is normally sufficient because MD20098 has no NEW_CONF attribute that requires a full restart. A full NCK restart is required only when the MD attribute column in your firmware's parameter manual lists it. Check the parameter manual for your build if behaviour is unexpected.

Why does the spindle still appear after writing through the PLC?

Common causes: the Line parameter was set to the wrong axis index (verify with $MC_AXCONF_CHANAX_NAME_TAB), the access level in the PLC is below Manufacturer, or FB101 was not called before FB2 to resolve the variable pointer. Read the value back with FB3 to confirm the write actually landed in the NCK.

Can I hide linear axes too, not just the spindle?

Yes. Clear any bit of MD20098 to hide the corresponding axis. Most builders clear the spindle bit only because the geometry axes (X, Y, Z) are mandatory for operator awareness. Hiding a geometry axis will distort the WCS view because WCS depends on the geometry-axis chain.

Will hiding the spindle break rigid tapping (G84/G88)?

No. Rigid tapping is a kinematic and PLC function; the spindle position is still commanded by the interpolator and read by the PLC position-sensing routine. The HMI display change is purely cosmetic. No axis-mode MD or PLC logic reads MD20098 during rigid-tap motion.

Where do I find the official parameter reference for MD20098?

The Sinumerik 840D sl Parameter Manual (or equivalent 840D pl / ONE documentation) lists MD20098 with attribute, access level, and default values. The manual is hosted on Siemens Industry Online Support; the same document is bundled with the SINUMERIK Operate commissioning tool.

Back to blog