1. Problem description & Scope
This document serves as a diagnostic guide for technicians confronted with positioning errors in CNC machine tools. These errors manifest as deviations in final product dimensions, surface quality, tool wear and overall machine performance. The guide addresses specific causes such as ball screw backlash, incorrect encoder feedback, insufficient thermal compensation and suboptimal servo tuning.
The scope of this guide covers a wide range of CNC machining centers, including vertical and horizontal machining centers, CNC lathes and grinders that rely on precise linear and rotary positioning. The severity of the positioning errors can vary:
- Critical: Large deviations outside tolerances (e.g., > 0.1 mm), leading to unusable parts, machine collisions or frequent downtime. Requires immediate action.
- Major: Consistent deviations that require rework or significantly shorten tool life (e.g., 0.02 mm - 0.1 mm). Requires planning for corrective action.
- Minor: Intermittent or minor deviations that marginally affect product quality but may be an indication of emerging problems (e.g., < 0.02 mm). Requires monitoring and preventative maintenance.
2. Safety measures
WARNING: Working on CNC machines can be life-threatening. Always observe the following safety precautions to avoid personal injury or damage to the machine.
- Lockout/Tagout (LOTO): Switch off the machine completely and isolate all energy sources (electrical, hydraulic, pneumatic) according to company procedures and NEN 3140/NEN-EN-ISO 14118. Verify energy freedom with suitable measuring equipment.
- Personal Protective Equipment (PPE): Always wear safety glasses (EN 166), safety gloves (EN 388) and safety shoes (EN ISO 20345). Depending on the situation, hearing protection (EN 352) and protective clothing may be necessary.
- Residual energy: Be aware of stored energy in capacitors, hydraulic accumulators, pneumatic systems and tensioned springs. Relieve these systems in a controlled manner before starting disassembly or inspection.
- Moving Parts: Avoid contact with moving shafts, ball screws, and tool magazines, even when the machine is turned off. When performing diagnostics under voltage, remain alert to unexpected machine movements.
- Hot Surfaces: Components such as motors, spindles and hydraulic lines may be hot. Use suitable heat-resistant gloves if necessary.
- Chemicals: Cooling lubricants and cleaning agents can be irritating. Consult material safety data sheets (MSDS) and wear appropriate PPE.
3. Required Diagnostic Tools
Specialist tools are essential for accurate diagnosis of CNC positioning errors. Make sure all equipment is calibrated and in good working order.
| Tools | Specification/Model | Measuring range | Goal |
|---|---|---|---|
| Dial Indicator (Dial Test Indicator - DTI) | 0.001 mm resolution, spring loaded | +/- 0.5mm | Measuring axial and radial play in ball screws, bearings and guides. |
| Laser accuracy system | Renishaw XL-80 or equivalent (EN ISO 230-2) | Up to 80 meters, 0.5 µm accuracy | Measuring positioning accuracy, repeatability, backlash and reversal play of shafts. |
| Ball screw test kit | Specific adapters, torque meter | 0-50 Nm, 0-100 N | Determining friction, preload and torque requirements of ball screws. |
| Vibration analyzer | Portable, with accelerometers (EN ISO 10816) | 10Hz - 10kHz, 0-50mm/s RMS | Detection of bearing defects, unbalance, misalignment in motors and spindles that affect positioning. |
| Multimeter | True RMS, with frequency and capacitance measurement | VDC/VAC (0-1000V), ADC/AAC (0-10A), Ohm (0-50MΩ), Hz (0-100 kHz) | Checking supply voltages, signal integrity of encoders, cable breaks. |
| Oscilloscope / Servoscope | Minimum 2 channels, 100 MHz bandwidth | +/- 500V, 100ns | Visualization of encoder pulses (quadrature signals), servo current/voltage, motor commands and feedback. |
| Thermal camera | Resolution minimum 320x240, sensitivity 0.05 °C (EN 13187) | -20°C to 350°C | Identification of overheating in bearings, motors, drivers and thermal expansion of machine components. |
| Allen key set, torque wrench set | Calibrated, range 1-200 Nm | N/A | Assembly and disassembly of mechanical components with correct tightening torques. |
4. Initial Assessment Checklist
Before beginning detailed diagnostics, a thorough initial assessment is crucial. This helps locate the problem area and prevents unnecessary disassembly.
| Observation/Registration | Description |
|---|---|
| Product details | Which products are processed? Are the problems related to specific operations or materials? |
| Defect description | How exactly does the positioning error manifest itself? (E.g. deviation in X direction, round holes become oval, step error). |
| CNC error messages | Check the history of error messages on the CNC control. Specific alarm codes (e.g. 'servo deviation', 'encoder error') can lead directly to the cause. |
| Recent maintenance/changes | Have there been any recent mechanical adjustments, software updates, part replacements or program changes? |
| Operating conditions | Record the ambient temperature, humidity, and any external vibrations. |
| Machine use | How intensively is the machine used? Is the problem constant or intermittent? |
| Visual inspection | Check for visible damage: loose cables, coupling play, leaking seals, dirt build-up on guides or encoder disks. |
| Acoustic inspection | Listen for unusual sounds (creaking, squeaking, grinding) during shaft movements. |
| Trial edit | Perform a standardized test operation (e.g. circle interpolation, square pocket milling) and measure the results to quantify the error. |
5. Systematic Diagnosis Flowchart
Follow this flowchart to methodically isolate the cause of CNC positioning errors. Always start with the most obvious and easily tested causes.
- Symptom: Inaccuracy in positioning or repeatability.
- Check mechanical clearance.
- Diagnostic Test: Place a dial indicator on the machine table and move the shaft counterclockwise and clockwise. Measure the reversing clearance.
- Expected Result: Acceptable clearance < 0.005 mm. Clearance > 0.01 mm indicates a problem.
- If play > 0.01 mm:
- Check ball screw play. (Go to 6. Error Cause Matrix, 'Ball Screw Play')
- Check bearings and couplings. (Go to 6. Fault-Cause Matrix, 'Mechanical play (miscellaneous)')
- If play within tolerance: Continue with step 2.
- Check encoder feedback.
- Diagnostic Test: Use an oscilloscope to check the encoder's A/B phase signals for purity, amplitude, and phase shift.
- Expected Result: Clean, square waveforms, 90° phase shift, adequate amplitude (e.g. 5V TTL).
- If signal distortion, noise or amplitude deviation:
- Check cabling and connectors.
- Check the encoder itself. (Go to 6. Error-Cause Matrix, 'Encoder defect')
- If encoder feedback correct: Proceed to step 3.
- Assess thermal influences.
- Diagnostic Test: Use a thermal camera to measure temperature differences across machine components before and after a period of operation. Focus on spindle, bearings, ballscrews, machine bed.
- Expected Result: Maximum temperature difference over the shaft length < 5°C. Maximum surface temperature of bearings < 60°C.
- If significant temperature gradients or high peak temperatures:
- Check cooling systems (spindle, ballscrew).
- Check machine ambient temperature. (Go to 6. Error Cause Matrix, 'Thermal Expansion/Contraction')
- If thermal influences checked: Continue with step 4.
- Check servo performance.
- Diagnostic Test: Use the CNC control's built-in diagnostic tools or an external servoscope to analyze servo errors, torque deviations, and positioning tracking errors.
- Expected Result: Tracking errors within tolerance (e.g. < 0.01 mm at maximum feed rate). Stable torque curve without overshoots.
- If servo errors or instability:
- Check servo motor, driver and cabling.
- Check servo parameters (P, I, D values, gain). (Go to 6. Error-Cause Matrix, 'Servo Tuning')
- If servo performance is optimal: The problem is probably elsewhere, repeat the previous steps or consult OEM documentation.
- Check mechanical clearance.
6. Error Cause Matrix
This matrix presents common symptoms, their likely causes and the diagnostic tests to confirm them. The probability ranking (High, Medium, Low) is based on general experience in the field.
| Symptom | Probable Causes (ranking) | Diagnostic Test | Expected Result if Cause Confirmed |
|---|---|---|---|
| Deviations in hole position or diameter; stepwise errors when reversing direction of motion. | Ball screw clearance (High) Loose coupling connection (Medium) Bearing wear (Medium) |
Dial indicator test on shaft; Laser interferometer test (EN ISO 230-2) | Reversal clearance > 0.01 mm; Irregular movement when changing direction. |
| Intermittent positioning errors; irregular speed control; 'Servo Alarm' on controller. | Dirty/damaged encoder ruler/disc (High) Defective encoder (Medium) Damaged encoder cable (Middle) Poor encoder cable ground (Low) |
Oscilloscope on encoder output; Visual inspection encoder; Multimeter test for cable continuity. | Distorted, missing or noisy A/B signals; Encoder error code. |
| Positioning drift after prolonged machining; errors in long edits; deviations with temperature change. | Insufficient thermal compensation (High) Overheated ballscrew/bearings (Medium) Changes in ambient temperature (Medium) |
Thermal camera (EN 13187) on machine components; Read temperature sensors. | Temperature difference > 5°C over shaft length; Bearing temperature > 60°C. |
| Vibrations during movement; 'Servo Alarm'; overshoot or instability; poor surface finish at high speeds. | Incorrect servo tuning (High) Defective servo motor (Medium) Defective servo driver (Medium) Mechanical binding/high friction (Medium) |
Analysis of servo parameters (P, I, D) on controller; Servo diagnosis via software; Torque and current measurement. | Large positioning tracking error; Unstable axis movement; Engine vibrates; High current peaks. |
7. Root Cause Analysis for Each Error
7.1. Play in ball screw
Why it happens: Backlash, also called backlash, occurs when there is excessive space between the ball nut and the ball screw. This may be due to natural wear of the balls and grooves from repetitive motion and loading, inadequate or incorrect lubrication, or a loss of preload in the ball nut assembly. Incorrect installation or loose bearings on the spindle can also contribute.
How to attach: The most effective method is to use a laser interferometer (according to NEN-EN-ISO 230-2) to measure the positioning accuracy and reversal clearance of the shaft. A dial indicator (DTI with 0.001 mm resolution) placed on the machine table, while the shaft slowly changes direction, will also reveal play. Maintain a force of approximately 50-100 N to ignore elastic deformation. Play of > 0.01 mm is critical and indicates the need for repair.
Damage if left unresolved: Uncorrected backlash leads to consistent undersized or oversized machining, poor surface finish, increased tool wear, and potentially even machine collisions due to inaccurate positioning. This results in higher production costs, rejection and longer downtimes.
7.2. Encoder feedback problems
Why it happens: Encoders provide the positional feedback to the CNC control. Problems can arise due to:
- Mechanical damage: Dirt, dust, oil or cooling lubricant on the encoder ruler/disc; physical damage to the disk or read head.
- Electrical problems: Damaged cables (break, short circuit), bad connectors, insufficient shielding leading to electromagnetic interference (EMI), defective encoder unit.
- Aging: Components may degrade over time.
How to confirm: Use an oscilloscope to measure the quadrature signals (A, B, Z phases) directly from the encoder. Look for signal distortion, missing pulses, incorrect amplitudes (typically 5V TTL or 1Vpp sine/cosine) or 90° phase shift anomalies. Visual inspection of the encoder ruler and read head for dirt or damage is also essential. Measure the resistance of the cable (acceptable < 1 Ohm per conductor). Check the insulation resistance of the cable (> 2 MOhm).
Damage if unresolved: Erroneous encoder feedback results in incorrect axis positioning, excessive position tracking errors and can cause 'Servo Alarms' on the CNC control, causing the machine to shut down. This reduces productivity and can lead to costly machine collisions if the steering adopts an incorrect position.
7.3. Insufficient Thermal Compensation
Why it happens: CNC machines generate heat through friction, motors and spindle activity. Environmental factors such as room temperature fluctuations also contribute. Thermal expansion and contraction of machine components (machine bed, spindle, ball screws) can cause significant positioning errors, especially over longer machining times or with large temperature differences. Many modern machines have thermal compensation systems, but these may be incorrectly calibrated or malfunctioning.
How to attach: Use a thermal camera to measure temperature profiles across the machine during warm-up and operation. Focus on the ball screws, spindle housings and machine bed. Compare measured values with the machine specifications. A temperature difference of more than 5°C over an axis length of 1 meter can already lead to a positioning error of 0.05 mm or more, depending on the material (e.g. steel has a linear expansion coefficient of ~12 µm/m·°C). Monitor the ambient temperature over a 24 hour period.
Damage if unresolved: Positioning errors due to thermal effects are often unpredictable and dependent on duty cycle and environment. This leads to inconsistent product quality, difficult to track errors and excessive rejects. It can also put unnecessary strain on the machine due to incorrect compensation attempts.
7.4. Suboptimal Servo Tuning
Why it happens: Servo motors and drivers control the precise movement of the axes. The servo tuning (setting of P, I, D parameters and gains) is crucial for stability, accuracy and dynamics. Incorrect tuning can lead to overshoots, vibrations, long settling times or large tracking errors (the deviation between the command position and the actual position). This can occur after replacing a component, or if the machine is used under new, demanding conditions.
How to confirm: Use the CNC manufacturer's diagnostic software or a specialized servoscope to read the servo parameters and analyze the axis response. Perform step response and frequency response tests. Too low a P gain leads to large tracking errors; too high a P gain can cause oscillation. A tracking error of > 0.01 mm at the maximum feed rate is unacceptable. Check torque and current curves for irregularities.
Damage if unresolved: Poor servo tuning causes unstable axis movements, resulting in poor surface quality, increased wear of mechanical components and motors, and higher energy costs. In extreme cases it can lead to machine collisions or frequent alarms that halt production.
8. Step-by-Step Troubleshooting Procedures
8.1. Solution for Backlash in Ball Screw
- WARNING: Turn off machine and perform LOTO.
- Inspection: Remove covers and visually inspect the ball screw, ball nut, spindle bearings, and couplings for wear, corrosion, or damage.
- Measuring clearance: Use the dial indicator method (as described in Section 7.1) to determine the exact location and magnitude of the clearance. Note the value.
- Coupling check: Check the coupling between the servo motor and the ball screw for play. If necessary, tighten bolts to the correct torque (refer to OEM manual, typically 20-50 Nm for M8 bolts).
- Bearing replacement/preload:
- If the play is in the spindle bearings, replace them (preferably P4 class angular contact ball bearings). Ensure correct preload during installation (refer to OEM manual).
- If the play is in the ball nut itself, the ball nut or the entire ball screw must be replaced.
- Lubrication: Clean and lubricate the ball screw with the prescribed lubricant (e.g. ISO VG 68 oil or NLGI 1/2 grease).
- Verification: Assemble everything, turn on the machine, and run the laser interferometer or dial indicator test again. The reversal clearance must now be < 0.005 mm.
- Thermal compensation calibration: After mechanical adjustments, it may be necessary to reset or calibrate the thermal compensation parameters.
8.2. Fix for Encoder feedback issues
- WARNING: Turn off machine and perform LOTO before inspecting/replacing cables or components.
- Visual inspection: Check the encoder ruler/disc and read head for dirt, damage, or misalignment. Clean with isopropyl alcohol and a lint-free cloth.
- Cable check: Check the encoder cable for kinks, wear, damaged insulation, or loose connectors. Measure continuity (expected < 1 Ohm per conductor) and insulation resistance (> 2 MOhm) with a multimeter.
- Grounding: Verify proper grounding of the encoder cable shield on both sides (CNC control and encoder housing). Poor grounding can cause EMI.
- Replacement: If the encoder appears to be defective after oscilloscope measurements (no or distorted signals with correct power supply), replace the encoder unit with an OEM-approved part.
- Alignment: When replacing an incremental linear encoder, ensure the correct air gap between read head and ruler (refer to specification, typically 0.1-0.2 mm).
- Verification: Turn on machine and check encoder feedback with an oscilloscope. The signals must be clean and correct. Run a test program to verify positioning.
8.3. Solution for Insufficient Thermal Compensation
- WARNING: Work may involve machine movements. Stay alert and maintain sufficient distance from moving parts.
- Environment: Stabilize the ambient temperature in the workshop (e.g. 20 +/- 1 °C) if possible.
- Cooling systems: Check operation of spindle coolers and ball screw cooling systems. Check fluid levels, filters, pumps and temperature settings (e.g. cooling water temperature at 20°C).
- Warm-up time: Implement an adequate warm-up cycle before starting production. This can be a 'warm-up' program that gradually brings all shafts and the spindle up to operating temperature.
- Thermal compensation parameters:
- Refer to the OEM documentation for the thermal compensation settings in the CNC control.
- Take measurements with a laser interferometer (EN ISO 230-3) and thermal camera as the machine heats up and cools down, and map the thermal expansion.
- Adjust the compensation parameters in the CNC control based on these measurements. This can be iterative.
- Verification: After the adjustments, perform a long-term trial operation and measure the product accuracy throughout the cycle. Use the thermal camera to check for excessive temperature differences.
8.4. Fix for Suboptimal Servo Tuning
- WARNING: Incorrect servo tuning can cause unexpected machine movement and damage. Be extremely careful.
- Backup parameters: Always backup the current CNC control servo parameters before making any changes.
- Manual Tuning: If the machine is still relatively stable, minor adjustments to P, I, D gains (Proportional, Integral, Differential) can be made.
- P-Gain: Increase gently to increase stiffness and reduce tracking errors. Too high leads to vibrations.
- I-Gain: Increase carefully to reduce static tracking errors (steady-state error). Too high leads to overshoot.
- D-Gain: Increase gently to dampen oscillations. Too high makes the system sensitive to noise.
- Automated Tuning: Many modern CNC systems offer auto-tuning features. Use these if available, but always verify results manually.
- Resonance filters: If vibrations occur at specific frequencies, resonance filters in the servo driver can be configured to suppress these frequencies.
- Inertia: Check that the inertia ratio between the load and the motor is set correctly in the servo driver parameters. An incorrect setting can lead to instability.
- Verification: After each adjustment, run a test program at different speeds and accelerations. Monitor the positioning tracking errors (ideally < 0.005 mm in normal operation) and oscillations with the diagnostic software. The shaft movement should be smooth and responsive.
9. Preventive Measures
Prevention is the key to minimizing positioning errors and maximizing the life of CNC machines.
| Root Cause | Prevention strategy | Monitoring method | Recommended Interval |
|---|---|---|---|
| Ball screw play | Regular lubrication with correct lubricant. Prevention of overload. Replacement of ball nut/spindle at wear limits. |
Dial indicator test (reverse play). Noise analysis. Torque measurement (friction). |
Monthly (critical machines); Semi-annually (general). |
| Encoder feedback problems | Regular cleaning of encoder ruler/disc. Check integrity of cabling and connectors. Maintain proper grounding. |
Visual inspection. Signal quality check with oscilloscope. Cable resistance measurement. |
Semi-annually (cleaning); Annually (electrical inspection). |
| Insufficient thermal compensation | Maintain stable ambient temperatures. Effectively functioning cooling systems. Adequate warm-up cycles. |
Thermal camera (temperature profiles). Ambient temperature registration. Reading out machine-internal sensors. |
Daily (warm-up cycle); Quarterly (cooling system); Annually (compensation validation). |
| Suboptimal servo tuning | Periodic check of servo parameters. Regular auto-tuning (if available). Check of mechanical friction in the shaft. |
Servo diagnosis software (tracking errors, torque curves). Vibration analysis. Sound analysis. |
Every six months or after major mechanical overhaul. |
10. Spare Parts & Components
The timely availability of critical spare parts is essential for minimizing downtimes. UNITEC-D offers a wide range of high-quality components.
| Part description | Specification | When to Replace | UNITEC Category |
|---|---|---|---|
| Ball screw (complete with nut) | Precision class (e.g. C3/C5), diameter, pitch, length, prestress type. | In case of excessive play (> 0.01 mm) or serious damage. Preventive after X operating hours (see OEM). |
Mechanical drive |
| Spindle bearings (angular contact ball bearings) | P4 or P2 precision class, dimensions (inside diameter, outside diameter, width), preload. | With measurable radial/axial play, noise or increased temperature. | Bearings |
| Linear encoder (absolute or incremental) | Resolution (µm), measuring length, signal type (TTL, HTL, sine/cosine), interface. | In case of unclean signals, intermittent errors, or 'Servo Alarm' encoder error. | Sensors & Feedback |
| Rotary encoder | Pulses per revolution, signal type, shaft diameter, mounting. | Same as linear encoder. | Sensors & Feedback |
| Servo motor | Rated torque, rated speed, flange size, feedback type (encoder). | In case of excessive vibrations, overheating, or if the motor does not respond to command (after checking the driver/tuning). | Engines & Drives |
| Servo driver/amplifier | Rated power, communication interface, motor compatibility. | In case of consistent 'Servo Alarm' messages, or if the motor cannot be controlled stably. | Electronic Control |
| Couplings (motor-spindle) | Type (flexible, bellows), bore diameter, torque transmission, stiffness. | In case of visible wear, play or breakage. | Mechanical drive |
For detailed specifications and ordering information, visit our e-catalog: www.unitecd.com/e-catalog/
11. References
- NEN-EN-ISO 230-1:2012 - Test codes for machine tools - Part 1: Geometric accuracy of axes.
- NEN-EN-ISO 230-2:2014 - Test codes for machine tools - Part 2: Determination of positioning accuracy and repeatability of numerically controlled axes.
- NEN-EN-ISO 230-3:2012 - Test codes for machine tools - Part 3: Determination of thermal effects.
- NEN 3140:2019 - Operation of electrical installations - Low voltage.
- NEN-EN-ISO 14118:2018 - Safety of machines - Prevention of unexpected start-up.
- OEM manuals for specific CNC machines (consult your machine manufacturer's documentation).
- UNITEC-D Maintenance Guides (additional guides on lubrication, bearing replacement, etc.).