Monitoring SINUMERIK 840D Motor Current and Power via Profibus

David Krause11 min read
ProfibusSiemensTutorial / 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

Extracting live motor current and power data from a SINUMERIK 840D controller over Profibus requires direct access to NCK (Numerical Control Kernel) system variables. Unlike PLC-side data exposed through the DP slave image, drive-side current and torque values are mapped to NC variables such as $AA_CURR, $AA_TORQUE, $AA_POWER, and the corresponding axis-specific load data blocks. This article describes the variable set, the NCK version constraints, the Profibus DP coupling, and a LabVIEW acquisition workflow that reads these values from a connected server PC.

Document basis: Variable definitions and compensation functions referenced here come from the official SINUMERIK 840D sl Monitoring and Compensating Function Manual. Always validate against the printout associated with the controller's software version (machine-readable on the HMI under Commissioning > Version).

SINUMERIK 840D System Architecture Relevant to Drive Data

The 840D controller consists of three logical units that determine how drive data becomes accessible:

  • NCK – the numerical control kernel. Holds axis-specific state, setpoints, and actual value variables prefixed with $AA_ (axis actual) and $VA_ (VO actual).
  • PLC – a SIMATIC S7-300 subsystem. Exchanges process data with the NCK through the NC/PLC interface (DP1 / DP2 / DP3 internal couplings).
  • Drive bus (Profibus) – the external DP master line to which a server PC can be attached as a DP slave or via a Profibus-to-Ethernet gateway.

Motor current and torque are drive-side signals. The NCK mirrors them into its variable pool at each IPO cycle so user programs (compile cycles, HMI, OA applications, and external readers) can address them symbolically rather than parsing raw telegram slots.

NCK System Variables for Current and Power Monitoring

The following NCK variables are the primary access path for drive load data. Indices map to the logical axis (1 = X, 2 = Y, 3 = Z, 4 = A, 5 = B, 6 = C, and so on for spindle and additional axes up to the configured maximum).

Variable Type Unit Meaning
$AA_CURR[ax] REAL A (rms) Actual current of axis ax (drive-actual). Up to NCK v6; replaced by $AA_CURR_LIMIT variants in later releases.
$AA_TORQUE[ax] REAL Nm Actual torque at motor shaft.
$AA_POWER[ax] REAL kW Active mechanical power of the axis (signed).
$AA_LOAD[ax] REAL % Drive load (current / setpoint) percentage.
$AA_TEMP[ax] REAL °C Motor temperature reported by the drive.
$VA_LOAD[ax] REAL % Servo load (mirror of drive's SMO, used for monitoring functions).
$VA_POWER[ax] REAL kW Drive-reported actual power.
$VA_CURR[ax] REAL A Velocity-dependent current, accessible in NCK v5+.

For the spindle, the same prefix pattern applies but with the spindle index reserved in the machine data. Typical access is $AA_CURR[$SN_SPIND_ASSIGN_TAB[0]] or direct read of $AA_CURR[31] when the spindle is the highest-indexed axis, as commonly documented in NCK version 6 projects.

NCK Version Compatibility Matrix

Variable availability and unit scaling depend on the NCK software version. The 840D and 840D-sl line shipped through several major releases with different default units (metric/imperial) and additional variables for power monitoring introduced incrementally.

NCK Version Current Var Power Var Unit Default Notes
NCK v4.x (840D) $AA_CURR available $AA_POWER not always present Metric (mm / A) Use $VA_LOAD for percentage readback.
NCK v5.x $AA_CURR, $VA_CURR $AA_POWER, $VA_POWER Metric / Imperial switch via MD Power introduced as standard variable.
NCK v6.x (840D) $AA_CURR[ax] up to 31 axes $AA_POWER, $VA_POWER MD10240 $MN_SCALING_SYSTEM $AA_CURR[31] commonly used for spindle on a 5-axis machine.
NCK v7.x (840D sl) $AA_CURR continued, plus $AA_CURR_LIMIT $AA_POWER continued Metric Current-limit variables available for advanced monitoring.
NCK v4.5+ sl $VA_*, $AA_*, plus MD-based scaling Full set Metric Compensation functions described in monitoring manual.
Critical version pin: $AA_CURR[31] is documented as readable up to NCK v6. On NCK v7 and later, the index range and semantics of $AA_CURR may change; consult the HMI's Start-up > MD > Drive MD and the monitoring/compensating manual for the active variable table.

Profibus Communication Setup

Two architectural patterns are deployed in the field:

  1. Direct DP slave coupling – the server PC hosts a Profibus DP slave card (e.g., Siemens CP5611, CP5621, or compatible Hilscher / Siemens PC cards). The 840D is the DP master; the PC is the slave. Telegrams 370 (drive actual values) or custom PPO types carry the desired signals.
  2. Profibus-to-Ethernet bridge – a DP/DP coupler or Profinet gateway translates the bus to TCP/IP. The server PC reads data over Ethernet using OPC or a vendor SDK.

DP Slave Telegram Configuration

For direct drive data extraction, configure the slave with a PPO type that includes PZD (Process Data) words. A typical configuration for axis actual values:

  • PPO type 5: 2 PKW (parameter) words + 6 PZD (process data) words
  • PPO type 4: 2 PKW + 4 PZD

PZD slot 1 / 2 generally carry status word and actual speed; the additional PZD slots are mapped to actual current, actual torque, and DC-link voltage as configured in SINUMERIK Commissioning tool under Drive > Telegram configuration.

GSD File and Node Address

Install the Siemens siem80d5.gsd (or version-appropriate) GSD into the PC's Profibus configurator (COM PROFIBUS / STEP 7 HW Config). Assign a free node address (e.g., 6) that does not conflict with the NCK's own DP master (default 1) or HMI (default 2). The PLC's Profibus is address 3 in default 840D layouts.

Data Acquisition with LabVIEW

LabVIEW supports two practical approaches for SINUMERIK 840D data extraction:

  1. Profibus raw read via LabVIEW DSC – using a National Instruments Profibus master interface (e.g., NI PXI-8531) with the NI-Profibus driver. Telegrams are decoded in LabVIEW Real-Time and scaled according to SINAMICS drive scaling rules.
  2. OPC / S7 variable bridge – the server PC runs an OPC DA/UA server (e.g., Softing S7 OPC, Kepware SIEMENS TCP/IP Ethernet Driver) that exposes NCK variables. LabVIEW's DSC Module binds OPC tags to shared variables. This is the most common production path because it does not require additional Profibus hardware on the PC.

Reading NCK Variables via OPC

The NCK exports a subset of its variables through the /Nck/ path when an OPC server is bound to the 840D's CMI (Configuration Management Interface) or via the SINUMERIK Integrate server. A sample tag address for current:

Channel1.Device1.NCK.AA_CURR[1]

For the spindle on a machine with spindle at axis index 31:

Channel1.Device1.NCK.AA_CURR[31]

For active power on the same spindle:

Channel1.Device1.NCK.AA_POWER[31]

LabVIEW Block Diagram Outline

  1. Place an OPC Read or DSC Tag node for each variable of interest.
  2. Bundle tags into a cluster and convert from Variant to double-precision (DBL).
  3. Apply engineering-unit scaling: raw counts are typically 4000 hex = 100% for current on SINAMICS S120. Convert with:
    I_actual [A] = (raw / 16384) * MD1107 (motor rated current)
  4. Write to a TDMS file at 100 ms intervals for trend recording.

Variable Address Mapping Reference

The following table summarizes the read access points used in production deployments. The Item ID column shows the symbolic path exposed by the SINUMERIK Integrate OPC server; the native column shows the NCK variable name.

Signal NCK Variable OPC Item Example Cycle
Axis X current $AA_CURR[1] /NCK/AA_CURR[1] IPO
Axis Y current $AA_CURR[2] /NCK/AA_CURR[2] IPO
Axis Z current $AA_CURR[3] /NCK/AA_CURR[3] IPO
Spindle current $AA_CURR[31] /NCK/AA_CURR[31] IPO
Spindle torque $AA_TORQUE[31] /NCK/AA_TORQUE[31] IPO
Spindle power $AA_POWER[31] /NCK/AA_POWER[31] IPO
Axis X load % $VA_LOAD[1] /NCK/VA_LOAD[1] IPO
Motor temp Z $AA_TEMP[3] /NCK/AA_TEMP[3] 1 s

Configuration Procedure

  1. Confirm the controller generation. Open the HMI menu Commissioning > Version and note the NCK software version and the controller type (840D vs 840D sl). This determines the variable set.
  2. Enable monitoring access. The system variable access rights are controlled by MD51074 $MN_ACTIVATE_SL_BOX and access level settings in the user interface. In default configurations, $AA_* and $VA_* are read-accessible at user level.
  3. Set up the OPC bridge. Install SINUMERIK Integrate / Access MyMachine / OPC UA server on the PC or on a separate node. Configure the CMI connection to the 840D's internal OPC DA server (port 7001 / 7002) or use the OPC UA server on sl controllers.
  4. Browse the NCK namespace. In your OPC client (e.g., Matrikon, Kepware, or LabVIEW DSC), connect and browse to /NCK/. Verify that AA_CURR, AA_POWER, and AA_TORQUE items are present for each axis.
  5. Read at the IPO cycle. Configure subscription update rate to 10–100 ms to match the IPO cycle (typical 4–20 ms on 840D sl; up to 40 ms on 840D legacy).
  6. Scale to engineering units. Apply the formula above using the motor's rated current from MD1107 and rated torque from MD1113 / MD1114.
  7. Log to disk. Stream to a TDMS or CSV store for offline analysis.

Verification and Diagnostics

After the data path is live, perform the following checks to confirm signal integrity:

  1. Static check: With the machine idle, $AA_CURR values should be within ±2% of zero (offset). Persistent offsets indicate scaling errors or noise pickup on the drive bus.
  2. Step response check: Issue a controlled axis move (e.g., 1 mm at 1 mm/s) on axis X. The X current trace should rise briefly while the move executes and return to zero after completion. Y/Z currents should remain near zero.
  3. Cross-check with HMI: Open Diagnostics > Axis Diagnostics > Service on the HMI and compare the displayed current and torque to the values read by LabVIEW. Deviation beyond the scaling tolerance (typically 1–2% of rated) indicates MD-side scaling mismatch.
  4. Power sanity check: Verify that $AA_POWER ≈ $AA_TORQUE * $AA_VACT[ax] * 2π / 60 / 1000 for a rotating axis. Discrepancy indicates that scaling machine data (MD10240, MD10220) is set differently between variables.

Troubleshooting Matrix

Symptom Likely Cause Action
$AA_CURR returns 0 for all axes OPC server not subscribed to NCK namespace, or wrong user level Verify access level ≥ Manufacturer; check OPC server log
Variable read returns quality BAD NCK variable does not exist on this software version Check NCK version; fall back to $VA_CURR or $VA_LOAD
Current values read but constant Read at slower cycle than IPO; or subscription buffer overflow Reduce subscription rate; check bus load on Profibus
Scaling wrong (10x off) Imperial/metric mismatch in MD10240 Switch scaling to match default; reload NCK
Spindle current is on index 31 but axis count is 8 Spindle index depends on machine configuration, not fixed to 31 Read $SN_SPIND_ASSIGN_TAB to find actual index
Profibus DP slave never goes to cyclic exchange Wrong GSD version, or slot config mismatch Update GSD to controller's SW version; verify PPO type
LabVIEW reads succeed but values are stuck at 0 Polluted shared variable cache Disable cache, force re-read, or use DSC tag engine

Safety and Operational Considerations

Read-only design. Use a Profibus DP slave interface on the PC; never configure the PC as a DP master to the 840D. The 840D retains mastership over its drive bus for safety reasons, and introducing a second master on the same physical segment violates Profibus deterministic guarantees.
  • Drive current data is informational; it must not be used in safety chains (EN ISO 13849-1 / EN 61508). Use SINAMICS Safety Integrated signals for safety paths.
  • The server PC must be on a separately protected network segment. Profibus media is not routable; if crossing subnet boundaries, use a certified Profibus-to-Ethernet gateway (e.g., Scalance, Helmholz).
  • Personnel accessing drive current data should be qualified per the warning at the head of the monitoring/compensating manual. Drive-level information is not a substitute for the HMI's safety-critical diagnostics.

Extending the Approach Beyond 840D sl

The same NCK variable philosophy applies to SINUMERIK 828D and SINUMERIK ONE controllers. On 828D, the OPC server is built-in and exposes /NCK/ names directly. On SINUMERIK ONE (driven by SINAMICS S120 with Create MyVirtual Machine), the OPC UA server uses the same root namespace and adds per-axis telemetry at higher sample rates (1 kHz native).

For legacy environments with the original 840D (NCK v4–v6) where $AA_CURR is the only available current variable, the recommended approach is to read the variable at IPO cycle and use the scaling formula:

I_actual [A] = raw_INT16 * I_max [A] / 16384

where I_max is the motor's maximum current from MD1108 (current limit).

Which SINUMERIK 840D variable exposes motor current to an external Profibus reader?

Use the NCK axis-actual variable $AA_CURR[ax] for current in amps, indexed by axis number (e.g., $AA_CURR[1] for X). It is documented as available up to NCK v6, with $AA_CURR_LIMIT added in later releases. See the 840D sl monitoring manual for the full variable table.

How is spindle motor current addressed when the spindle is the 31st axis?

On a 5-axis 840D where the spindle is logically the highest-indexed drive, the spindle current is read as $AA_CURR[31]. Always verify with $SN_SPIND_ASSIGN_TAB[n], because the spindle index depends on machine data, not on a fixed convention.

Can LabVIEW read current and power values from an 840D over Profibus?

Yes. The most reliable path is a Profibus-to-Ethernet bridge or the controller's built-in OPC server, with LabVIEW DSC consuming OPC tags. Direct Profibus acquisition is possible with an NI Profibus master card, but the OPC path is the standard production deployment.

What is the default scaling for $AA_CURR values read from the NCK?

On SINAMICS S120 drives, 4000 hex (16384 decimal) corresponds to the motor's maximum current, defined by MD1108 $MD_MOTOR_MAX_CURRENT (or MD1107 for rated current). Convert raw counts to amps using the formula: I_actual = raw / 16384 × I_max.

Do I need to modify the PLC to expose current data to LabVIEW?

No. NCK variables $AA_* and $VA_* are accessible to external OPC clients without any PLC program change. The PLC's role is limited to its own data (DB blocks, M flags); reading NCK variables goes through the OPC bridge, not the PLC program.

Back to blog