SINUMERIK 840Di Intermittent X/Y Axis Position Drift Diagnosis

David Krause15 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 Profile: SINUMERIK 840Di/PCU50 Hydraulic Drill Positioning Drift

A single-spindle structural drill built around a Siemens SINUMERIK 840Di controller with a PCU50 PC-based NC is producing holes that wander up to +/- 1/2 inch from commanded positions along the X axis (with Y axis exhibiting similar behavior). The failures are non-deterministic across program runs, no NCK or drive alarms are raised, and the operator can re-master the program in the drill manufacturer's CAM software to land the holes in spec for one cycle - after which the same file is wrong again in a different pattern. A ghost-image restore plus full re-calibration delivers only 4-8 hours of correct production before the error grows monotonically until the machine is unusable.

The pattern has these field-tested signatures:

  • First and last holes in each row are most frequently out of tolerance; mid-row spacing tends to recover.
  • Direction and magnitude of error change between consecutive runs of the same part program.
  • Time-based degradation: machine runs well after cold boot/calibration, then progressively drifts.
  • ADI4 module replacement at the OEM's recommendation produced no improvement.
  • Cable continuity, shielding, mechanical drives, and encoders have all been verified.
No alarms with a positional drift of +/- 0.5 inch is the single most important clue in this case. Active alarms indicate the NCK has detected a hard fault; their absence means the closed loop believes it is positioned correctly, and the error is being introduced downstream of position regulation or by the regulation itself silently.

System Architecture Review: 840Di with PCU50

The 840Di is the PC-based member of the SINUMERIK 840D family. The NCK runs as a software process on the industrial PC rather than on a dedicated NCU hardware module. In the configuration described, the PCU50 hosts the HMI (HMI Advanced or HMI sl) and the NCK; a separate industrial motherboard hosts the NCK execution, and PROFIBUS links the controller to distributed peripherals.

Two signal paths are critical to position control on this class of machine:

  1. Setpoint path: NCK -> PROFIBUS DP -> drive bus -> servo drive -> proportional/ servo valve -> hydraulic motor.
  2. Actual-value path: Encoder -> drive or ADI4 module -> PROFIBUS -> NCK position controller.

For machines with analog hydraulic drives that lack a native PROFIBUS interface, Siemens provides the ADI4 (Analog Drive Interface for 4 axes), catalog number 6FX1 135-4BA01 (or compatible variant). The ADI4 converts NCK digital setpoints into +/-10 V analog commands for up to four hydraulic proportional valves, and re-injects incremental encoder signals back into the PROFIBUS position-feedback chain.

Reference documentation for the controller and ADI4:

Symptom Pattern Analysis

The reported behavior - first and last holes wrong, mid-row correct, no alarms - points to one of three failure classes rather than a gross encoder or drive hardware defect.

Symptom Primary Implication Secondary Implication
First and last holes wrong, mid-row spacing correct Compensation table error at extremes of travel axis (SSFK / EEC) Reversal spike / backlash changing with temperature
Different error each run, same program NCK memory data corruption or thermal drift Compensation values being re-sampled or overwritten
4-8 hour degradation after re-calibration Temperature-dependent mechanical/electronic drift Leaking valve spool drift; thermal encoder growth
Restore fixes it temporarily NV storage or HDD file corruption PCU Windows side issue (pagefile, disk cache)
No alarms, no controller reaction NCK believes actual position = setpoint at end of move Error is being accepted into the actual value

The middle of a row being correct while the ends are wrong is the single most diagnostically valuable signal. It implies that the closed loop is functioning correctly per inch traveled, but is mis-scaling or mis-biasing the absolute position over the full axis length. That is precisely the symptom of a broken or corrupted spindle pitch / leadscrew error compensation table or of an absolute encoder reference being lost.

ADI4 Module Function and Failure Modes

The ADI4 sits on PROFIBUS as a slave and provides for each of its four axes:

  • Two encoder inputs (typically SSI or incremental 1 Vpp / TTL).
  • One +/-10 V analog setpoint output to the proportional valve.
  • One enable and one ready output to the drive.

ADI4 failure modes that can produce silent position drift (no alarm):

  1. Encoder count register rollover on long travel paths when MD settings do not match the actual axis length - produces an offset that reappears every full traverse.
  2. Reference mark enable timing set too tight (MD34xxx range) - the controller silently accepts a wrong reference pulse and then operates from a phantom home.
  3. PROFIBUS repeater / termination drift - signal integrity reduces over hours of operation, producing CRC retransmits that the NCK papers over without alarming.
  4. ADI4 internal EEPROM corruption - axis slot configuration reverts to defaults mid-shift.

Replacing the ADI4 with another known-good unit addresses the EEPROM and most analog-output problems, but it will not fix corrupted compensation data resident in the NCK's NV memory, and it will not fix a fundamental PROFIBUS cable or termination problem. The fact that the ADI4 swap did not help is significant: it shifts the investigation away from the analog signal chain and back into the NCK and into the hydraulic system.

Most Likely Root Causes

Given the symptom pattern, rank-order the candidates:

Rank Cause Why It Fits Confirm By
1 Compensation table (SSFK / EEC / CEC) corruption Ends wrong, middle correct; resets with image restore Dump MD38000-MD38999 series + compensation tables; compare to backup
2 Hydraulic proportional valve spool drift / contamination Progressive degradation, temperature-dependent, direction varies run-to-run Command - hold - log actual position; thermal cycle test
3 Lost or unstable absolute reference / encoder reference pulse First/last hole wrong after every re-reference; offset varies Set MD34200 with edge evaluation, monitor reference pulse on oscilloscope
4 NCK / PCU50 HDD or NV memory corruption 4-8 hour degradation consistent with file-system write-back timing Run from RAM disk; image a fresh HDD; check SMART status
5 PROFIBUS physical layer degradation Terminating resistor thermal drift; cable shielding intermittent PROFIBUS diagnostics with BT200 or Amprolyzer; check termination voltage
6 Axis pairing or measuring-system switch logic If MD30200 dual-encoder config is enabled and inactive system is faulty Disable $MA_ENC_SWITCH, re-test

Rank 1 and Rank 2 explain essentially all of the observed behavior. Rank 4 explains the time-based degradation and is consistent with the temporary fix from re-imaging.

Diagnostic Procedure: Step by Step

Execute the steps in order. Do not skip steps; several of the early checks cost minutes and disqualify expensive hardware swaps that have already been done.

Step 1 - Mechanical and Encoder Verification (Re-confirm with quantitative test)

Continuity is not the same as signal quality under load.

  1. Power down, disconnect encoder at ADI4, measure insulation resistance shield-to-ground: should be > 1 MOhm at 500 V.
  2. With machine powered and idle, monitor the encoder's A/B signals on a differential oscilloscope at the ADI4 terminals. Check for: rise time degradation, ringing > 20%, pulse amplitude below 1 Vpp.
  3. Command a slow traverse (F100) of the full X axis. Count pulses into the NCK using the service display (Menu: Commissioning -> Diagnostics -> Axis Service). Compare against MD38000 $MA_ENC_TYPE and the encoder's stated line count. A discrepancy of more than 0.05 mm per meter flags an encoder or interpolation problem.
  4. Check MD32750 $MA_TEMP_COMP_TYPE - if active, a faulty temperature sensor on the motor can inject a fictitious thermal expansion correction that grows as the motor warms up, exactly matching the 4-8 hour degradation profile.

Step 2 - Hydraulic System Verification

Hydraulic drift is the most common silent cause on machines of this class.

  1. With the machine at operating temperature and a steady position command (G01 X... F0), use the service display to read the following error (MD LIST: SERVO -> Axis actual values -> Following error). If it grows steadily at constant command, the analog command is being absorbed by valve spool drift.
  2. Measure the analog command voltage at the proportional valve input with a true-RMS DMM referenced to the valve's signal ground. Log for 30 minutes. Any DC drift > 20 mV over that period, or AC ripple > 50 mV, is suspect.
  3. Check hydraulic fluid temperature at the valve. If it is rising more than 8 degC during the 4-8 hour working period, internal leakage in the valve is dumping heat.
  4. Verify the valve's null-adjustment: with the machine clamped and zero command, the LVDT or spool position sensor (if equipped) should sit at exactly the value recorded at commissioning. Drift here means the valve center has moved.

Step 3 - NCK Software and Data Integrity

  1. Export the full NCK image using Commissioning -> NC -> Data Backup -> Series Start-up and save off-line. Diff against a known-good backup (from commissioning records).
  2. Inspect the compensation tables explicitly:
    • MD32700 $MA_CEC_ENABLE and axis assignment in MD32710 $MA_CEC_SLING_ASSIGNM
    • MD32720 $MA_CEC_SCALING_SYSTEM
    • Compensation tables stored under /NCK/_N_CEC or /NNC/_N_SSFK depending on configuration
  3. Run the circularity test (described in the next section) and save the result. If the test passes but the production holes still drift, the problem is downstream of the NCK - confirming a hydraulic or PROFIBUS path issue.

Step 4 - Run the Circularity Test

The circularity test is the single most useful diagnostic on this class of fault because it isolates axis mechanics from controller compensation.

  1. In the operator area, navigate to Commissioning -> Diagnostics -> Circularity Test.
  2. Program a 100 mm diameter circle in a counterclockwise direction with feed F500 and a clockwise return at F500.
  3. Run the test three times at cold start, then again every hour for 8 hours.
  4. If the circle becomes a non-circular oval that grows with time, the analog output (hydraulic valve) is drifting.
  5. If the circle becomes a perfect circle but offset from its commanded center by an increasing amount, the absolute reference is being lost or the compensation table is corrupting.

Step 5 - Compensation Table Inspection

Compensation tables are stored as pairs of (axis position, correction) in the NCK. They are persistent across reboots but are written to volatile memory at NCK start from the disk image. If the on-disk copy is corrupted, every NCK start loads bad data until the operator re-calibrates, and subsequent writes can re-introduce the corruption.

  1. From the HMI: Commissioning -> NC -> Compensation -> SSFK (for linear axes, depending on configuration the table name may be SSFK, EEC, or MS).
  2. Plot the compensation curve. It should be smooth and within +/- 0.05 mm of zero unless the axis has documented geometric errors. Any step change, any value > 0.2 mm, or any entry marked invalid is suspect.
  3. Disable compensation temporarily with MD32700 = 0 and re-test. If the holes are now within tolerance (with no SSFK table applied), the compensation table is the root cause. Re-measure the axis geometry with a laser interferometer and regenerate the table from scratch.

Step 6 - Temperature and Time-Based Drift Test

  1. Configure the controller to write axis actual values to the service log every 10 seconds for a full 8 hour shift.
  2. Plot actual X position vs. commanded X position over the shift. A linear divergence with temperature is valve spool drift. A step divergence at a particular time is an event (file write, Windows update, EMC event) - inspect the system event log.
  3. Touch-probe the machine table with a Renishaw or equivalent at hour 0, 2, 4, 6, and 8 at the same NCK coordinates. Plot the probe readings. They will tell you if the drift is in the controller or in the mechanics.

Step 7 - Ground and EMC Verification

  1. Measure AC voltage between encoder cable shield and machine ground at the ADI4 end with the machine running. Anything > 100 mV RMS indicates a ground loop that is injecting common-mode noise into the encoder feedback.
  2. Inspect PROFIBUS connector terminations. The two end nodes must have termination on; all others off. A terminator left on in the middle of the segment will reflect signal edges back into the cable as time-dependent echoes.
  3. Run the controller on a UPS with clean power during the test. PCU50 platforms with marginal ATX power supplies can develop voltage regulator drift over time that masquerades as a control fault.

Hydraulic Drive Drift Considerations Specific to the Peddinghaus MDL1000B Class

The Von Ruden hydraulic axial vane motor combined with rack-and-pinion on the X axis is a low-bandwidth mechanical system. Several characteristics of this hardware class interact with the 840Di in specific ways:

  • Oil temperature swing: Hydraulic oil viscosity changes by roughly 10% per 10 degC. Valve spool null shifts as viscosity changes. On a cold-start machine, oil is thick, valve response is sluggish, and the proportional valve's center has not thermally stabilized. This is the opposite of the symptom (cold works well, hot drifts), so it points away from temperature and toward an electronic drift rather than a hydraulic one.
  • Rack and pinion backlash: Reversal spike is compensated by MD32450 $MA_BACKLASH and MD32452 $MA_BACKLASH_DIR. If backlash compensation is too small, the first move in any new direction will be short. If it is too large, the first move will be long. This is a candidate for the first-hole-wrong symptom.
  • Encoder mounting compliance: A linear encoder on a flexible mount under rack-and-pinion load can shift with thermal expansion of the structure. Verify that the encoder bracket is mounted to the same thermal mass as the rack, not to a separate bracket that expands at a different rate.

Resolution Sequence

Apply fixes in this order. Stop and re-verify at each step.

  1. Capture a full NCK backup of the current (faulty) state for analysis before any changes.
  2. Disable SSFK/EEC compensation (MD32700 = 0) and run a representative part. If holes land in tolerance, the compensation table is the fault. Re-measure and regenerate.
  3. If compensation is not the fault, repeat with backlash compensation disabled (MD32450 = 0). If first-hole errors disappear, backlash is the fault.
  4. Run a circularity test and follow the time-drift protocol. If drift correlates with hydraulic oil temperature, schedule a valve service. If drift correlates with electronic component temperature (check at the ADI4, PROFIBUS connectors, and proportional valve coils), replace the thermal-drift component.
  5. Replace the PCU50 HDD with a fresh SSD and reload the NCK image. Confirm SMART status on the original drive. File-system corruption that the operator's ghost image only temporarily papers over is the most common cause of the 4-8 hour degradation cycle on 840Di systems.
  6. If none of the above resolves the issue, escalate to a PROFIBUS physical-layer audit with a BT200 or Amprolyzer, including measurement of signal level, edge steepness, and segment termination at cold and hot temperatures.

Verification Protocol

After any corrective action, run this verification sequence before returning the machine to production:

  1. Run the full circularity test, three repetitions, at cold start. Required: roundness error < 0.02 mm, repeatability < 0.01 mm.
  2. Run a 4-axis reference-part program (X, Y, drill sequence) at cold start. Touch-probe all hole locations. Required: every hole within +/- 0.05 mm of nominal, no pattern of offset.
  3. Run the same reference-part program again after 6 hours of operation. Required: same touch-probe results as cold start within +/- 0.03 mm.
  4. Re-run a second time after re-referencing the axes. Required: results unchanged.
  5. Cycle machine power, run reference-part again. Required: results unchanged.

Passing all five steps confirms both the position accuracy and the time stability of the fix.

Preventive Measures

  • Schedule a quarterly NCK image export with checksum to a network share; trend the checksums to detect on-disk corruption early.
  • Monitor PCU50 HDD SMART status via a service script; alert on reallocated sector count > 5.
  • Log hydraulic oil temperature to the NCK as a daily record; correlate against axis drift history to spot developing valve drift before it becomes a production fault.
  • Document encoder reference-pulse waveform at commissioning and re-capture annually; deviations flag mechanical shifts before they produce hole-position errors.

Why are first and last holes wrong but mid-row spacing correct?

This is the signature of a broken or corrupted spindle pitch / leadscrew error compensation (SSFK/EEC) table. The controller believes the axis is at the commanded position over most of its travel but mis-scales or biases the absolute position at the ends. Disable MD32700 $MA_CEC_ENABLE and re-test; if the holes land in tolerance, regenerate the compensation table from a laser interferometer measurement.

Why does a ghost image restore fix the machine for only 4-8 hours?

The image reload resets the NCK's in-memory compensation data, but the underlying on-disk image is still corrupted or the HDD is developing bad sectors. Each subsequent write to NV memory re-introduces the corruption. Replace the PCU50 HDD with a fresh SSD, reload the image, and run a 24-hour soak test before returning the machine to production.

Why were no alarms raised for a +/- 0.5 inch positional error?

The NCK alarms on position following error (MD36050 $MA_STOP_LIMIT_FAULT) and on contour deviation, not on absolute target-position error versus commanded position. If the closed loop is internally consistent (following error near zero at end of move) but the actual axis position differs from the expected geometric position, no alarm fires. This is exactly what corrupted compensation or lost absolute reference produces.

How do I distinguish hydraulic valve drift from encoder drift?

Run the circularity test with the machine at cold start, then again at 4-hour intervals. If the circle becomes elliptical and grows with time, the proportional valve is drifting (analog output drift). If the circle stays round but offsets uniformly with time, the encoder reference is being lost or the absolute scaling is changing. Hydraulic drift is repairable by valve service; encoder or scaling drift requires NCK or mechanical attention.

Does an ADI4 replacement address all analog axis feedback problems?

No. The ADI4 swap addresses the ADI4's own EEPROM, its analog output stage, and its encoder count register. It does not fix PROFIBUS physical-layer problems, NCK-side compensation data, hydraulic valve null drift, or mechanical backlash issues. If a replacement ADI4 does not resolve a position-drift symptom, shift the diagnostic focus back to the NCK software, the hydraulic system, and the PROFIBUS cabling as described in the procedure above.

Back to blog