Configuring SINUMERIK 840D External Spindle on PROFIBUS

David Krause15 min read
Motion ControlSiemensTechnical Reference
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

Integrating an external spindle drive with a SINUMERIK 840D powerline controller requires explicit configuration of the PROFIBUS DP link, the spindle's machine data axis image, and the PLC user program. When the spindle is a DC machine driven by a SIMOREG 6RA70 series converter, the 840D acts as the setpoint source and command issuer; the closed-loop speed/torque control is executed by the 6RA70's internal current and speed regulators. The 840D provides the command word, the speed setpoint, and reads back the actual speed and drive status via cyclic PROFIBUS DP telegrams (typically six PZD words per direction).

This reference covers the hardware topology, the 6RA70 PROFIBUS parameters, the relevant 840D machine data (MD), the PLC interface using the HLA / FC 18 / DB axis structure, and the path to display the spindle RPM on the HMI. A secondary path covering the 840Dsl with an ADI4 analog interface board (6FC5211-0BA01-0AA4, firmware 01.04.07) is also included for installations that need a non-PROFIBUS analog spindle.

Functional split: 840D issues the command and setpoint only. The closed speed loop and field/ armature current control live inside the 6RA70. Do not attempt to close the loop through the NCK unless the drive is configured in torque-setpoint mode.

System Architecture and PROFIBUS Topology

The classic 840D powerline spindle integration uses one of two layouts:

  1. Direct PROFIBUS DP coupling – 840D NCU PROFIBUS interface → 6RA70 on the same DP segment. The drive appears as a PROFIdrive-compatible node and exchanges six PZD words cyclically.
  2. ADI4 analog interface (840Dsl only) – ADI4 board in the NCU rack converts PROFIdrive telegrams to ±10 V analog setpoints for a non-PROFIBUS drive. Useful when the spindle drive does not support DP-V1/V2.

For both layouts the spindle encoder can be wired to either the drive (preferred for direct DC control) or to the NCU via the HLA module. If the encoder is wired to the drive, the 6RA70 closes the loop locally and the 840D reads back the smoothed actual value through PROFIBUS. If the encoder is wired to the NCU's HLA module, the NCU closes the loop and the 6RA70 operates as a torque follower; this is rarely the right choice for a DC spindle because it removes the 6RA70's speed loop stability advantage.

SINUMERIK 840D NCU PROFIBUS DP master +6RA70 GSD file +HLA module option SIMOREG 6RA70 DC Master converter PROFIBUS CBP2 armature + field DC Spindle motor armature + tacho or pulse encoder incremental HTL/TTL 6 PZD (cyclic) armature cable encoder feedback (option A) drive-internal loop default

Hardware Configuration

Use the following minimum hardware list for a 840D powerline + 6RA70 external spindle:

Item Siemens designation Order number / notes
NCU module SINUMERIK 840D powerline 6FC5211 or 6FC5356 (NCU 561/571/572). Confirm DP master capability.
PROFIBUS option CBP2 communication board 6RA70 series – fits SIMOREG DC Master slot.
DC drive firmware SIMOREG 6RA70 firmware Use a version with DP-V0 PPO type 4 support (typical ≥ 2.0).
Spindle encoder Incremental encoder on motor TTL or HTL – connect to 6RA70 (X173) for closed loop.
PROFIBUS cable Siemens purple or FC cable 6XV1830-0EH10 standard; respect 100 m segment limit, repeaters beyond.
GSD file SIEM816D.GSD (CBP2) Install in STEP 7 / SIMATIC Manager hardware catalog.
PROFIBUS address Spindle DP slave address Typical address 6, set on 6RA70 keypad P786.
Address conflict: The 840D NCU PROFIBUS default is 3, the HMI is 1, the PLC is 2. Reserve a free number (for example 6) for the 6RA70 spindle. Verify the 611U feed drives use 4 and 5 before assigning.

6RA70 SIMOREG DC Master PROFIBUS Setup

Parameter setting on the 6RA70 side is split into drive-side parameters and PROFIBUS interface parameters. The two are linked by the PPO type selected in the master.

PROFIBUS interface parameters

Parameter Value Purpose
P786 6 (example) PROFIBUS slave address
P790 1 PPO type – select PPO type 4 (6 PZD out / 6 PZD in) for 840D
P791 0 Setpoint source via PROFIBUS
P793 0 Actual value transmission via PROFIBUS
P795 0 (4 ms) PROFIBUS fault response – adjust to application

PZD word mapping (PPO type 4)

Word Output (NCU → drive) Input (drive → NCU)
PZD1 STW1 control word ZSW1 status word
PZD2 NSOLL speed setpoint (N2 format) NIST actual speed
PZD3 STW2 extension ZSW2 extension
PZD4 MOMRED torque reduction IA actual current
PZD5 G1_STW freely usable G1_ZSW freely usable
PZD6 G2_STW freely usable G2_ZSW freely usable

Reference the Siemens Product Support SIMOREG 6RA70 parameter list (function block diagrams) for the bit definitions of STW1/ZSW1. Bits 0–3 of STW1 carry the standard PROFIdrive state machine (OFF1, OFF2, OFF3, ENABLE); bit 7 must be set for fault acknowledgement, and bit 10 must be set for control via PLC (control requested).

Speed normalization: The 6RA70 interprets the NSOLL word in N2 format (4000 hex = 100 % of P402 reference speed). Match P402 to the mechanical spindle's reference RPM; otherwise the displayed RPM on the HMI will not match the programmed S value.

SINUMERIK 840D Machine Data Configuration

The 840D uses machine data to bind a logical spindle to a physical PROFIBUS slot and to choose between NCK-internal setpoint generation and external setpoint routing.

Key machine data

MD Typical value (840D powerline external spindle) Description
MD30130 CTRLOUT_TYPE[n] 0 = analog (HLA only); 1 = PROFIBUS (6RA70) Output type of setpoint for spindle drive
MD30220 ENC_MODULE_NR[n] 2 (HLA) or 0 (drive encoder) Encoder input assignment
MD30240 ENC_TYPE[n] 1 = incremental Encoder type for actual value acquisition
MD32010 CTRL_TYPE[n] 1 = position, 0 = speed (spindle) For spindle, the 840D closes position only if needed; usually set to 0.
MD32200 POSCTRL_GAIN[spindle] 1.0 (default) Used only if loop is closed in NCK
MD32250 RATED_OUTVAL / MD32260 RATED_VELO Match to motor data Reference for 100 % speed
MD35000 SPIND_ASSIGN_TO_MACHAX 5 (example: spindle = axis 5) Logical axis to machine axis binding
MD35010 GEAR_STEP_CHANGE_ENABLE 1 Enables M40 gear range switching
MD35020 SPIND_DEFAULT_ACT_SPEED 1 Displays actual speed in HMI default screen
MD35040 SPIND_ACTIVE_AFTER_RESET 1 Spindle remains active after RESET
MD36700 DRIFT_ENABLE 0 for external drive Disable NCK drift compensation when drive is on PROFIBUS

For PROFIBUS-coupled external drives on 840D, set MD30130 CTRLOUT_TYPE to 1 and reference the 6RA70 PROFIdrive PPO4 telegram in the drive configuration window. The drive slot index used here must match the logical address allocated by STEP 7 for the 6RA70 DP slave.

MD changes take effect only after NCK reset. Use PI service _N_KSET or perform an NCK restart. Verify with MD2:MD 30130[5] in the HMI diagnostics.

Spindle-specific MDs for rpm feedback to HMI

MD Value Note
MD31020 ENC_RESOL[spindle] encoder lines × 4 Required for correct RPM display
MD31030 LEADSCREW_PITCH[spindle] 1.0 Set to 1.0 for direct rotary spindle
MD31050 DRIVE_AX_RATIO_DENOM / NUM 1 / 1 for direct mount Adjusted when spindle has gear stages
MD32250 RATED_OUTVAL[spindle] 100.0 (typical) Reference output value
MD32260 RATED_VELO[spindle] max spindle RPM Reference speed for 100 %

PLC Interface and Programming

The PLC exchanges cyclic data with the 6RA70 using the S7 input/output image. The 840D toolset provides function blocks in the standard toolbox (FC18, FC19, FC24, FC25) for spindle handling; the user typically only needs to route the VDI interface bits and handle the M3/M4/M5 logic in the PLC's spindle FC (default spindle FB in the supplied basic program).

Reading 6RA70 PZD into the PLC

STEP 7 hardware config maps the 6RA70 PPO4 to a logical address range. For a slave at PROFIBUS address 6 with PPO4, the typical I-address range is IB 264 .. IB 275 (6 PZD = 12 bytes) and the Q-address range is QB 264 .. QB 275. Adapt to the actual project; the following code assumes those addresses.

// Sample S7 STL excerpt – spindle control via PROFIBUS PPO4
// Drive slave address = 6, I address 264..275, Q address 264..275

// ---- Build STW1 (control word) ----
      L     QB 264                  // load current STW1 low byte
      L     W#16#0                  // clear working word
      T     LW 10

// Bit 0 = ON / OFF1
      A     M 100.0                 // PLC spindle enable (M3/M4 active)
      S     L 10.0
// Bit 1 = OFF2 (clear coast stop)
      R     L 10.1
// Bit 2 = OFF3 (rapid stop)
      R     L 10.2
// Bit 3 = Enable operation
      A     M 100.0
      S     L 10.3
// Bit 7 = Acknowledge fault
      A     M 102.0                 // fault acknowledge edge
      S     L 10.7
// Bit 10 = Control requested by PLC
      SET
      S     L 11.2                  // bit 10 of word = L 11.2
      L     LW 10
      T     QB 264                  // STW1 low  → drive

// ---- Build NSOLL (setpoint) ----
// M3/M4 direction via sign, magnitude from axis setpoint interface
      L     MD 104                  // signed setpoint RPM (e.g. 0.5 rpm units)
      ITD
      T     QD 266                  // PZD2 setpoint → drive

// ---- Read back actual speed from ZSW1/NIST ----
      L     IW 268                  // NIST actual speed
      T     MW 110                  // store in flag for HMI / DB

// ---- Read ZSW1 status ----
      L     IW 264                  // ZSW1 status word
      T     MW 112
// ZSW1 bit 2 – operation enabled
      A     M 112.2
      =     M 110.2                 // spindle running
// ZSW1 bit 3 – fault present
      A     M 112.3
      =     M 110.3                 // spindle fault → MMC alarm

VDI spindle interface (default NCK ↔ PLC bits)

Signal PLC byte.bit (default) Meaning
DB31..DBX30.0 Spindle stop (M5) Stops the spindle with acceleration
DB31..DBX30.1 Spindle start CW (M3) CW rotation, speed in DB31..DBD0
DB31..DBX30.2 Spindle start CCW (M4) CCW rotation
DB31..DBX30.3 Spindle jog mode Jog selection
DB31..DBX30.5 Spindle reset Resets spindle ramp
DB31..DBX84.0 Spindle actual direction CCW Actual direction feedback
DB31..DBX84.3 Spindle in set range Speed reached within tolerance
DB31..DBX84.5 Spindle in setpoint range Programmed S reached (from SINUMERIK 840D sl/828D Basic Functions)
DB31..DBX84.7 Spindle actual direction CW Actual direction feedback
DB31..DBX93.7 Speed limit exceeded From spindle monitoring
DB number is axis-dependent. For the first spindle, use DB31; for the second, DB32. The block number does not change for a 6RA70 on PROFIBUS – only the underlying I/O mapping in the PLC user program changes.

ADI4 Module Alternative for 840Dsl

For 840Dsl systems that must drive an external spindle without PROFIBUS, the ADI4 (Analog Drive Interface for 4 axes) board converts PROFIdrive telegrams to ±10 V analog setpoints. The relevant catalog number is 6FC5211-0BA01-0AA4, firmware 01.04.07. The ADI4 mounts in the NCU rack and provides:

  • 4 analog ±10 V setpoint outputs (one per axis / spindle).
  • 4 incremental encoder inputs (TTL, RS422) for actual value acquisition.
  • 4 SSI absolute encoder inputs (option).
  • Digital I/O for drive enable and ready feedback.

Configuration steps for ADI4:

  1. Set MD30100 CTRL_OUT_NR[ax] to the ADI4 channel (1..4).
  2. Set MD30110 CTRLOUT_MODULE_NR[ax] to the ADI4 slot address (0 for ADI4 #1, 1 for ADI4 #2).
  3. Set MD30130 CTRLOUT_TYPE[ax] = 0 (analog) and MD30240 ENC_TYPE[ax] = 1 (incremental).
  4. Assign the encoder input via MD30220 ENC_MODULE_NR[ax] and MD30230 ENC_INPUT_NR[ax].
  5. Wire the analog output (X11 of the ADI4) to the drive's setpoint input and the drive enable relay to one of the ADI4's digital outputs.

Check the ADI4 firmware against the NCU software version – a mismatch will surface as PROFIBUS alarm 380005 "PROFIBUS I/O fault". Up-to-date firmware is published on the Siemens support portal under entry ID 64932982 and related ADI4 KB articles.

Spindle Speed Monitoring

Per the SINUMERIK 840D sl / 828D Basic Functions manual (entry ID 64932982), the standard spindle monitoring functions include:

  • Spindle in setpoint range (DB31..DBX84.5 / MD35400). The actual speed is within the tolerance band of the programmed S word. The check uses MD35150 SPIND_DES_VELO_TOL as the tolerance (default 0.1 = 10 %).
  • Spindle in setpoint range (extended) (MD35410). Adds a programmable minimum and maximum speed window.
  • Spindle in actual speed range (MD35500 SPIND_ON_SPEED_AT_IPO_START). Gates feed enable on the spindle actually being at S.
  • Maximum spindle speed (MD35100 SPIND_VELO_LIMIT). Hard clamp independent of drive limits.
  • Minimum / maximum gearbox speed (MD35120 / MD35130 SPIND_GEAR_MIN_VELO / MAX_VELO).

For an external 6RA70 spindle, also enable:

  • MD36030 STANDSTILL_POS_TOL = 5° (spindle stop window for M5 / M0).
  • MD36060 STANDSTILL_DELAY_TIME = 1.0 s (delay before "spindle stopped" flag is set).

HMI Display Configuration

To make the spindle RPM visible on the SINUMERIK Operate (or MMC 103) screen, follow these steps.

  1. Open Start-up → Machine Data → Spindles in the operator area and select the spindle axis.
  2. Set MD35020 SPIND_DEFAULT_ACT_SPEED = 1 – this switches the spindle display from programmed S to actual RPM.
  3. For MMC 103 (HMI Advanced) screens, edit the file spindel.com / axisscreen.com in the project, or use the inbuilt axis screen configuration to show the actual speed field.
  4. For SINUMERIK Operate, configure a custom user screen with the tag /Plc/DB31.DBD6 (current actual speed) or read the value the PLC has written into MW 110 from the PROFIBUS NIST word.

If the displayed value is the S-word value rather than the measured actual speed, verify that the encoder feedback path is correctly closed and that MD30240 ENC_TYPE matches the connected encoder (1 for incremental). A common mistake on retrofits is leaving the encoder on the NCU HLA module but wiring it for 6RA70 closed loop, which leaves the 840D with a default of 0 rpm.

Verification and Commissioning

  1. Power the system and verify the 6RA70 appears online in STEP 7 hardware diagnostics (no SF/LED red).
  2. Use the 6RA70 keypad parameter P790 to confirm PPO4 is selected and P786 to confirm the slave address matches the project.
  3. In the HMI diagnostics, navigate to Startup → Diagnostics → PROFIBUS and confirm the 6RA70 reports a healthy cyclic PZD exchange.
  4. From the PLC, force M 100.0 = 1 (spindle enable) and write a small speed setpoint (for example 10 % via MDW 104). Check the drive display shows a non-zero NSOLL and that the motor accelerates.
  5. Measure the armature voltage and current with a clamp meter, compare to P401 (armature rated current) and P402 (armature rated voltage).
  6. Verify HMI RPM tracks the actual motor speed within 5–10 RPM at 1000 rpm; if not, recalculate the encoder scaling in MD31020.
  7. Trigger an E-Stop and confirm the drive honours OFF1/OFF2 (decay to 0 within 1 s) and that ZSW1 bit 3 is cleared by the drive and that the 840D issues alarm 25000 series.

Troubleshooting Matrix

Symptom Probable cause Corrective action
Drive does not appear in STEP 7 GSD not installed, wrong CBP2 version Install SIEM816D.GSD, restart HW Config
Alarm 380005 PROFIBUS I/O fault ADI4 firmware mismatch or DP address clash Update ADI4 firmware to 01.04.07, reassign address
Drive online, motor does not run STW1 bit 10 (control requested) not set Set bit 10 in the Q-word; confirm with watch table
Speed setpoint ignored, motor at 0 rpm PPO type mismatch between master and drive Set P790 = 1 (PPO4) on drive side, re-import slave in HW Config
Actual speed on HMI = 0, drive runs Encoder wired to drive, not to NCK; MD35020 default off Set MD35020 = 1; or wire encoder to HLA + set MD30220
Spindle oscillates at low speed 6RA70 speed loop gain too high for inertia Reduce P225 (Kp) and adjust P226 (Tn) on 6RA70
HMI shows overshoot during accel MD32200 POSCTRL_GAIN too high for non-positioned spindle Lower MD32200 or set MD32010 CTRL_TYPE = 0
M3/M4 from NC part program do not start spindle PLC FC18 / default spindle FB not called Check OB1 (or OB35 cyclic) call of FC18 in the basic program
NCK alarm 25000 "Axis %1 drive fault" 6RA70 reports fault; ZSW1 bit 3 set Read r947/r949 from drive, resolve, then acknowledge
Spindle does not run with override = 0 Override gating in spindle FB Check MD12200 RUN_OVERRIDE and spindle override DB30 DBB400..407

Edge Cases and Field-Proven Caveats

  • Multiple spindles on a single DP segment: the 840D reserves a PROFIBUS slot per logical drive. Two 6RA70 slaves with consecutive addresses (for example 6 and 7) use two slot configurations; keep the PPO type identical for both or the NCK will not link them.
  • Power-on sequence: PROFIBUS must be live before the 6RA70 runs up its CBP2. If the 6RA70 powers up first it logs F060 (PROFIBUS timeout) which latches and prevents start until acknowledged.
  • NCK reset after MD change: changes to MD30130, MD30220, MD30240 and MD35000 require an NCK reset. Plan a controlled restart window.
  • Safety integration: when the spindle is part of a safety zone (Safety Integrated), the PROFIsafe telegram occupies PZD 7/8. Plan address space accordingly and use the Safety Integrated configuration tool, not the standard PPO4 selection.
  • Mixed 611U and 6RA70 spindle: the 611U feed drives and the 6RA70 spindle can share the same DP segment. Reserve addresses 4/5 for 611U and 6 for 6RA70 to keep the bus scan deterministic.

How do I read the actual spindle RPM on the SINUMERIK 840D HMI when the drive is a 6RA70?

Set MD35020 SPIND_DEFAULT_ACT_SPEED = 1 so the axis screen shows the actual speed, and verify the encoder is wired to the 6RA70 with the correct line count in MD31020 ENC_RESOL. For a custom SINUMERIK Operate widget, bind the display tag to /Plc/DB31.DBD6 (current actual speed) or to the PLC flag you copy from the PROFIBUS NIST word.

Which PROFIdrive PPO type should I select for a 6RA70 external spindle on 840D powerline?

Use PPO type 4 (six PZD each direction). It carries STW1/ZSW1, NSOLL/NIST, STW2/ZSW2, MOMRED/IA, and two freely usable words. Set this on the drive with parameter P790 = 1 and configure the slave in STEP 7 hardware to match.

Can I close the speed loop in the 840D NCK instead of the 6RA70?

Technically yes, by routing the encoder to the HLA module and setting MD30220/30240 accordingly, but this removes the 6RA70's current-loop advantage. For a DC spindle, keep the loop in the 6RA70 and have the 840D act as setpoint source only.

What machine data links a SINUMERIK 840Dsl spindle to a G120 drive?

Set MD30130 CTRLOUT_TYPE = 1 (PROFIBUS), MD30110 CTRLOUT_MODULE_NR to the G120's slot, and assign a logical axis to the spindle with MD35000 SPIND_ASSIGN_TO_MACHAX. The G120 must be configured for PROFIdrive telegram 1 or 2 and its PZD must be consistent with the 840D's telegram selection.

Which catalog number identifies the ADI4 board for 840Dsl analog spindles?

The 4-axis ADI4 board is 6FC5211-0BA01-0AA4, firmware 01.04.07. It converts PROFIdrive telegrams to ±10 V analog setpoints and accepts incremental or SSI encoders for actual speed feedback.

Back to blog