AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

What Gantry Router Sag Compensation Can and Cannot Correct at the Tool

Servo and stepper motion Published 6 min read By AutomateDirectUSA engineering team

Short answer

A position-indexed Z correction map removes the repeatable, unloaded sag you measured at the tool; it does not remove deflection that changes with cutting force, and laser feedback in the servo loop corrects only what the beam measures. Treat any correction as static compensation until a residual check under a real cutting load lands inside your target tolerance.

On this page
  1. How a sag map is built
  2. What corrects what
  3. What no compensation map can correct
  4. Laser interferometer feedback in the servo loop
  5. Worked example: MDF mold work against a 10 thou tolerance
  6. Fly-cutting the spoil board
  7. Verify at the tool, then classify
  8. Questions asked

A position-indexed compensation map corrects one thing and one thing only: the repeatable, unloaded geometric error you measured, at the carriage positions where you measured it. Deflection that changes with cutting force, feed direction or tool extension is outside any static map, and a laser interferometer used as axis feedback corrects only what its beam actually sees. The decision rule is simple: classify a correction as static compensation until residual error measured under a real cutting load sits inside your target tolerance. Machining tolerance is set by structural stiffness first and compensation second.

How a sag map is built #

A long gantry beam sags under its own weight and the weight of the carriage, so the vertical error at the tool repeats at the same carriage position on every pass. That repeatability is the whole basis of sag compensation. Build the map with a laser: measure the vertical tool-position error at defined carriage positions across the beam, record the position and error pairs, and enter a table of Z corrections indexed by carriage position. The control interpolates between mapped positions and adds the correction to the Z command. Watch the sign convention: if the measured error is actual minus commanded, the correction is the negative of the measured error.

A 2024 review of geometric error measuring, modeling and compensation for CNC machine tools describes the same three steps for machine tools generally: develop the error model, measure the errors, apply the compensation. A gantry sag map is that process applied to one axis pair and one geometry.

What corrects what #

Three distinct error families get confused under a single accuracy label, and they respond to different fixes.

What you see at the tool What it actually is What corrects it
Vertical error that repeats at the same carriage position Unloaded beam sag Position-indexed Z correction map
Gantry not parallel to the table surface Assembly geometry, bed flatness and unloaded sag at the table plane Fly-cutting the spoil board flat
Error that grows with cut depth, feed or tool extension Load-dependent structural deflection Nothing in software: stiffness

The first two are geometric and repeatable, so software can correct them. The third carries a variable, the cutting force, that the map does not contain.

What no compensation map can correct #

A static map is a curve indexed by position. Cutting deflection is indexed by force, and that force changes with depth of cut, feed rate, tool extension, engagement width and direction of cut. One curve cannot describe a second input dimension, which is why a map that makes an MDF mold look perfect can leave a roughing pass visibly out of tolerance at the same carriage positions.

The fix for load-dependent error is section depth, rail span, Z-column stiffness and the spindle mount, not more table rows. The stiffness budget you start from is exactly what the sizing notes for a DIY CNC 4x4 gantry on stiffness, ball screws and the Z spindle mount work through, and it should be spent before any compensation is planned. The measurement habit matters just as much: read deflection with a dial indicator or a laser during the real cut, the same way you would measure why a robot arm joint flexes under load and how to measure that flex, rather than trusting an encoder value that cannot see the structure.

Laser interferometer feedback in the servo loop #

A second architecture uses the laser as live X and Y position feedback instead of, or alongside, the encoders, so deflection that shows up in the measured axis position is fought by the servo loop itself. On the measurement side, Renishaw documents its XL-80 laser interferometer system for machine calibration as directly measuring geometric errors and providing traceable data that identifies and isolates them.

Two hard limits apply to the feedback architecture. The beam measures along its own path, not at the tool point: deflection that moves the tool without moving the feedback point stays invisible to the loop. And the servo loop corrects only what arrives within its bandwidth and inside what the feedback sees. Update rate, resolution and achievable accuracy are properties of the specific laser system and its integration, so take them from that system's documentation; no general value exists.

Worked example: MDF mold work against a 10 thou tolerance #

Inputs and where each comes from:

  • Target tolerance: 0.010 in (10 thou). MDF mold surface grain hides variation below roughly 5 to 10 thou, so the upper end, 0.010 in, is the tolerance the part actually notices.
  • Example laser readings for this case, illustrative values you would replace with your own laser run: unloaded residual after switching the map on, 0.002 in; residual during a light finishing cut, 0.006 in; residual during a heavy roughing cut, 0.014 in.

The rule in words: the map counts as corrected for a given operation only when the residual measured at the tool during that operation stays at or below the target tolerance.

The arithmetic:

  • Finishing: 0.010 in − 0.006 in = 0.004 in of margin, so the finishing operation passes.
  • Roughing: 0.014 in − 0.010 in = 0.004 in over tolerance, so the roughing operation fails.
  • Load flex component of the roughing residual: 0.014 in − 0.002 in = 0.012 in of deflection the map never sees.

Result: the map reproduces the unloaded geometry to 0.002 in, and roughing adds roughly 0.012 in of force-driven deflection on top of it.

Decision: classify the map as static compensation. At these finishing settings it delivers the tolerance; for roughing it cannot, and the correct fix is a lighter cut or a stiffer machine, not more table points.

Fly-cutting the spoil board #

Running a large-diameter flycutter over the whole spoil board makes the table surface parallel to the gantry's motion path. It corrects the composite of bed flatness and unloaded sag at the table plane and gives a flat datum for vacuum hold-down through the porous board. It removes nothing else: it does not stiffen the beam, does not touch the Z column and has no effect on deflection under load. Surface the spoil board before you measure the sag map, so the map measures on a flat datum instead of absorbing bed error into the beam correction.

Verify at the tool, then classify #

Verification runs in order. Measure vertical error at the tool with a laser or a dial indicator over full travel with the map off. Enable the map and repeat unloaded. Then repeat during the actual cut the workpiece cares about. Encoder position and servo following error are not proof of tool-point accuracy, for the same reason following error cannot verify lead screw pitch: the control compares commanded with measured position at the motor, and neither term sees the structure between the motor and the tool.

The decision for each case:

  • Repeatable vertical error versus carriage position: fit the sag map and label it static compensation.
  • Gantry not parallel to the bed: fly-cut the spoil board flat.
  • Error that scales with cutting load: work on stiffness or lighten the cut; no compensation table corrects it.
  • Laser feedback in the loop: expect correction of what the beam sees only, and still verify at the tool under load.

Keep guards and interlocks live and apply lockout whenever you fit indicators, laser optics or targets to a gantry that other people can start.

Questions asked

How often should a gantry sag map be re-measured?

No documented interval exists. Re-map after anything that changes the structure or its supports: rail or bearing replacement, carriage adjustments, a new spindle or Z column, seasonal temperature shifts, and after surfacing the spoil board. The practical trigger is the loaded verification check: when residual error under a real cut starts eating the tolerance margin you measured at commissioning, re-measure the map.

Can a light gantry router hold tolerances in aluminum with compensation alone?

Reported practice with light gantries is that careful, very small cuts at low feed can manage some aluminum, but machines built for structural metalwork are orders of magnitude heavier for a reason. Compensation removes measured geometry, not compliance; aluminum tolerance is a stiffness question first. Treat any aluminum capability claim as specific to the cut, the tool and the machine.

Does adding more points to the compensation table improve accuracy?

Only up to the quality of the measurement. Interpolation between closely spaced points reproduces the measured curve; beyond the point spacing that captures the error's actual variation, extra rows add measurement noise, not accuracy. Extra points never address load-dependent deflection, because that error varies with cutting force, an input the table does not contain.

Where does this kind of compensation live in a control?

In the control's stored compensation tables, the same family of settings as ball screw pitch error compensation. Names and menu paths differ between controls, so look for pitch, linear or spatial error compensation in the drive or machine parameter documentation for your control. The mechanism is the same: a stored table of corrections indexed by axis position, interpolated between entries.

Keep reading

  • Explainer

    Why an Enabled Servo Axis Corrects Position After the Move

    The correction after a completed move is the enabled position loop removing an error that an external load created. Stop it by removing servo action for that window only, with Motion Servo Off before the sealing jaws close and Motion Servo On before they open, then prove the window with the ServoActionStatus and DriveEnableStatus trends.

    Servo and stepper motion

  • Explainer

    Can Continuous Rotation Servos Position an XY Drawing Gantry

    No, not by themselves: a continuous rotation servo's pulse commands speed and direction, never angle, so drawn shapes do not close. Add feedback — an encoder on the axis, a servo reprogrammed to standard 300-degree mode on a rack (about 199 mm of travel with a 3 in pitch-diameter pinion), or a homed stepper — and the gantry positions.

    Servo and stepper motion

  • How-to

    Changing a servo axis gear ratio at runtime with MC_GearIn

    The load-gear values of an S7-1500 positioning axis are start values, so a write from the user program is rejected. To change the ratio during operation, command a virtual master axis and couple the real axis with MC_GearIn, whose ratio is a runtime parameter; the fallback is WRIT_DBL plus a technology object restart, which costs memory-card life.

    Servo and stepper motion