Back to the Gcode Dictionary
G29: Mesh bed probe
This command uses a probe to measure the bed height at 4 or more points to determine its tilt and overall flatness. It then enables mesh compensation so that the nozzle will remain parallel to the bed. The printer must be homed with G28 before using this command.
- G29 S0
- G29 S1 [P"filename"]
- G29 S2
- G29 S3 P"filename"
- S0 Probe the bed, save the height map in a file on the SD card, and activate bed compensation. The height map is stored in file is /sys/heightmap.csv.
- S1 Load the height map from file and activate bed compensation. The default filename is as for S0 but a different filename can be specified using the P parameter.
- S2 Clear height map
- S3 Save height map (supported in RepRapFirmware 2.04 and later)
- P"file.csv" Optional file name for bed height map file to save with S3 or load with S1.
- Kn (supported in RRF 3.01-RC5 and later only, default 0) Z probe number
If G29 is commanded with no S parameter, then file sys/mesh.g is run if it exists, and in RRF 3.3 and later any parameters present are passed to mesh.g. If sys/mesh.g is not present then the command behaves like G29 S0.
G29 S0 ; Probe the bed, save height map to heightmap.csv and enable compensation
G29 S3 P"usual.csv" ; Save the current height map to file usual.csv
G29 S2 ; clear bed height map (disables bed compensation)
G29 S1 P"usual.csv" ; Load height map file usual.csv and enable compensation
To define the probe grid, see M557.
You can define a height to taper off the compensation using M376
You can find more detailed information about setting up Mesh Compensation here.