Compensation

No machine is perfect. Beds aren't truly flat, spindles have a bit of runout, and guide rails have microscopic imperfections. Compensation measures these errors and corrects for them in real time — so your parts come out right even when the machine isn't.

The FluidBoard supports two types of compensation, each targeting a different problem.

2D bed leveling (routers and mills)

Your spoilboard isn't flat. Neither is your bed. Over a 500mm work area, even half a millimeter of variation means inconsistent depth of cut — which shows up as uneven pockets, through-cuts that don't go through, and engravings that fade out in one corner.

2D compensation maps the actual surface as a grid of Z corrections, then adjusts the tool path on the fly.

How it works

You measure the height of the surface at a number of points laid out in a grid. During a job, the controller looks at the current X and Y position, works out the expected surface height at that spot from the surrounding grid points, and shifts Z by that amount. Your G-code doesn't change; the correction is applied underneath it, in machine coordinates, so the map stays valid when you change your work offset.

Outside the grid, the controller uses the value of the nearest edge of the grid. Make the grid cover the full area you cut in.

When to use it

For a spoilboard that is out of flat, surfacing it with a large flat cutter is usually the better fix: it removes the error instead of working around it. Compensation earns its keep where surfacing isn't an option:

  • Engraving and V-carving, where a few tenths of a millimeter change the width of every line
  • PCB isolation milling on a board that isn't perfectly flat
  • Work on a fixture or vise that you can't machine flat
  • A bed that you don't want to cut into, such as an aluminium table

How to use it

  1. Probe a grid of points across your bed with a touch probe
  2. Enter the measured Z error at each grid point. The value is added to Z: if the surface is 0.05 mm high at a point, enter 0.05 and the tool is lifted by that amount there
  3. During cutting, the controller adjusts Z automatically based on XY position

The FluidBoard uses bicubic interpolation between grid points, so the correction is smooth — no sudden steps or witness marks at grid boundaries.

Probing for a good map

The map is only as good as the measurements that go into it.

  • Clean the surface. A single chip under the probe tip ends up in your map as a bump.
  • Probe slowly and consistently. Use the same probe feed rate for every point. See probing for why a slow approach matters.
  • Check repeatability first. Probe the same point three or four times. If the readings differ by more than the error you're trying to correct, fix the probe setup before mapping.
  • Cover the whole work area, and use a finer grid on a badly warped surface.
  • Re-map after changes. Moving a fixture, re-clamping a vise, or swapping the spoilboard invalidates the map.

Commands

Command What it does
$C2 Show the current compensation grid
$C2P=5,3,0.05 Set the Z offset of grid point 5,3 to 0.05 mm
$C2C Clear all compensation data

$C2P takes grid indices, not positions: $C2P=ix,iy,z_offset, where ix runs from 0 to x_count−1 and iy from 0 to y_count−1. Point 0,0 is at x_min,y_min. With the example configuration below (0–200 mm, 10 points), the points are 200/9 ≈ 22.2 mm apart, so point 5,3 is at X≈111.1, Y≈66.7. Every change is saved to the file straight away.

Configuration

kinematics:
  Compensated2D:
    x_min: 0
    x_max: 200
    y_min: 0
    y_max: 200
    x_count: 10
    y_count: 10
    file: /localfs/comp2d.yaml
    Cartesian: {}
  • x_min, x_max, y_min, y_max — the area the grid covers
  • x_count, y_count — how many grid points in each direction (2 to 100), including the points on the edges
  • file — where the measured values are stored on the board, so the map survives a restart
  • Cartesian: {} — the normal kinematics underneath; compensation is applied on top of it

A wrong value in the grid moves the tool in Z without warning. After entering a new map, run the job once with Z raised well above the work, or air-cut the first pass, and check that the tool follows the surface the way you expect.

1D runout correction (lathes)

On a lathe, the diameter you cut can vary along the length of the part even though the program asks for a constant diameter. On long parts, this shows up as a taper or barrel shape that shouldn't be there. Common causes are a headstock that isn't perfectly aligned with the bed, wear on the bed ways near the chuck, and guide rails that aren't perfectly straight.

1D compensation maps this error and corrects the X position as a function of Z. The result: more consistent diameters along the entire length of the workpiece.

Because the correction depends only on Z, it fixes errors that repeat at the same Z position every time. Runout that rotates with the spindle, such as a bent part or a chuck that doesn't run true, changes during every revolution and can't be corrected this way. Check that with a dial indicator on the chuck or stock first.

How to use it

  1. Take a test cut at a constant diameter along the full Z travel
  2. Measure the actual diameter at several Z positions
  3. Enter the correction at each point. The value is added to X, so if a spot comes out too large, enter a negative value there
  4. The controller corrects X automatically during future cuts. Between your points the correction is interpolated linearly; outside the range you measured, the nearest end value is used

Some practical points:

  • Use a sharp tool and a light finishing cut, and support long parts with the tailstock. Deflection changes from part to part, so it doesn't belong in the map.
  • Measure with a micrometer, not calipers.
  • A diameter error is twice the radial error. Make sure you enter the error in the same terms your X axis uses.
  • After entering the values, cut a second test piece and measure again.

Commands

Command What it does
$C1 Show the current compensation table
$C1P=-100,0.02 Add 0.02 mm to X at Z=-100
$C1C Clear all compensation data

Configuration

kinematics:
  Compensated1D:
    z_min: -500
    z_max: 500
    granularity: 0.1
    file: /localfs/comp1d.yaml
    Cartesian: {}
  • z_min, z_max — the Z range the table covers
  • granularity — the spacing in mm of the internal correction table. You only enter a few measured points with $C1P=z,x_offset (Z as a position in mm); the controller interpolates between them into a table with this spacing
  • file and Cartesian: {} — as for 2D compensation above

What compensation can't fix

Compensation corrects position errors that are repeatable and depend only on where the machine is. It does not fix:

  • Backlash. Play in screws or nuts depends on direction of travel, not position.
  • A machine that isn't square. If X and Y aren't at 90°, a circle comes out as an ellipse no matter how flat the bed is.
  • Spindle tram. A spindle that isn't perpendicular to the table leaves a stepped pattern when surfacing with a wide cutter.
  • Flex and loose mechanics. Deflection, loose gibs, couplings or bearings make errors that don't repeat.

Fix these mechanically first, then use compensation for what's left.

Copyright (c) 2024 by NubiloSoft, all rights reserved.
Accepted payment methods