Skip to main content
WARNING! From February 2022, these pages are no longer maintained.
Please see the current Duet3D documentation at https://docs.duet3d.com/
Help

Revision to Using mesh bed compensation

David Crocker

Mesh bed compensation works like this:
-* On power up no mesh bed compensation is in use, unless you have G29 S1 in config.g
+* On power up no mesh bed compensation is in use
* You define a grid using the M557 command. Normally you do this in config.g.
* You run G29 S0 (or just G29) to probe the bed at the mesh points. If probing is successful, the bed height map is saved in a file on the SD card and is or can be displayed in Duet Web Control.
Using a small number of points (ie. 9) is akin to using the older style simple planar correction.
+== Establish a Z=0 datum using the Z probe ==
+
+Before you probe the bed using G29 S0, you must establish a Z=0 datum using the Z probe. This must be done at the same temperatures that you use when probing the bed. It's normally best to probe with the bed and extruder at printing temperatures. If you are using a nozzle-contact Z probe and the bed surface might be damaged by a nozzle at full printing temperature, use a slightly lower nozzle temperature instead. So preheat the bed and hot end. Once the bed and nozzle are up to temperature, establish a Z=0 datum by one of the following methods:
+
+* If your printer is set up to home Z using the Z probe, you can just home Z.
+* Otherwise, do one of the following:
+** Move the nozzle over the centre of the bed and do a single G30 probe (G30 without parameters).
+** Alternatively, if the printer is a delta, run auto calibration.
+** Alternatively, if the printer has multiple independent Z leadscrews and you have set up leadscrew bed levelling, run leadscrew bed levelling.
+
+Note, whichever of these techniques you use, you must do exactly the same any time you want to use G29 S1 to reload the height map.
+
== Probe the bed ==
-Home the printer if you haven't already, then use the command G29 (or G29 S0) to run the probing sequence. All points in the mesh that are reachable by the probe will be probed. When probing is complete, a message will be returned indicating whether or not it was successful.
+Use the command G29 (or G29 S0) to run the probing sequence. All points in the mesh that are reachable by the probe will be probed. When probing is complete, a message will be returned indicating whether or not it was successful. if it was successful, the height map will also be saved on the SD card.
== Examine the height map ==
The height map file is normally called '''/sys/heightmap.csv''' but you can specify a different filename in G29, M374 and M375 commands. You can view, edit or download it using the System Editor tab in Duet Web Control.
-== Using mesh bed compensation before printing ==
+== How mesh bed compensation interacts with delta auto calibration and leadscrew bed levelling ==
-* Running G32 to auto calibrate a delta printer will clear the local height map info (but not the copy in heightmap.csv). Therefore, if you wish to use both auto calibration and mesh bed compensation, you must run G32 before you run G29, not after. You can include a G29 command at the end of your bed.g file if you wish.
-* If you don't want to probe the bed every time, you can use command G29 S1 to load the height map from the last time you used G29 to probe the bed.
+Running G32 to auto calibrate a delta printer or to adjust leadscrews to level the bed will clear the local height map info (but not the copy in heightmap.csv). Therefore, if you wish to use both auto calibration/leadscrew bed levelling and mesh bed compensation, you must run G32 '''before''' you run G29, not after. You can include a G29 S0 or G29 S1 command at the end of your bed.g file if you wish.
+
+== Loading a previously saved height map ==
+
+* Preheat the printer and establish the Z=0 datum in exactly the same way that you did before you ran bed probing - see [[#Establish a Z=0 datum using the Z probe]]
+* Then use command G29 S1 to load the height map from the SD card.
+
+Do not use G29 S1 within config.g, because no Z=0 datum has been established at that point. If you wish to load the height map automatically, here are some options:
+
+* If you run delta auto calibration of leadscrew bed levelling between powering on the printer and your first print (or before every print), you can add G29 S1 to the end of your bed.g file.
+* If you home Z using G30 commands in homez.g and homeall.g, you can use G29 S1 in those files, after the G30 command.
== Compensation Taper ==

To undo the changes made by this version, click 'Revert Changes.' This will automatically restore the previous version of this guide.

Revert Changes