# Marlin bed autoleveling confusion

I've just added a Z-Probe sensor to my custom printer (Arduino - RAMPS 1.4 - Marlin 2 default disabled EEPROM) but now I'm confused. Printer seems to work but I cannot configure the right nozzle height.

I use Pronterface and before start printing I send G29 code. Printer succesfully ends bed calibration. At this point I start printing but the printer seems to ignore the calibration (no bed compensation).

Do I need to run other commands to tell printer to use the previous calibration?

• G29 activates the M420 to enable the grid. A G28 after will reset this. Did you set the correct trigger point to nozzle offset with M851? Please do elaborate on seems to ignore the calibration: is it incorrect distance setup or is it ignoring the complete grid? – 0scar Mar 8 at 21:57
• G29 returns all the grid values (Ex.: +0.03 +0.01 -0.01 ...) and in my mind I expect Z-axis will compensate those values moving the nozzle high or low during layer print. The Z-axis instead never moves. – danyolgiax Mar 9 at 8:29
• What slicer do you use then? You can use either Slic3r, Ultimaker Cura, or any other program to generate the G-code files. You can run these G-code files through Pronterface to print the object. If you slice from within Pronterface, you can export the G-code files. I think that in your process to print the object G28 is called after G29, this disables bed leveling. – 0scar Mar 9 at 17:54
• You are right! At the beginning of the generated file there is a G28! Do I need to remove it? Or I need to add a G29 after G28? – danyolgiax Mar 9 at 18:57
• Do you have any place in your software to edit the start and end G-Code for each print you do? If so, you can add a G29 after a G28 to calibrate the print. I use that in my Ender 3 before every print to make sure everything is right. – Darlan Alves Mar 9 at 20:05

When the printer ignores the scanned topology (grid) of the bed this means that the levelling is not active. G29 activates the M420 to enable the grid. A G28 after scanning the bed will reset this.
You need to make sure that the start G-code (this is an optional script that is pasted before the sliced object) contains both the G28 and the G29, where the G28 is placed above the G29 on separate lines.