# How to apply Z Probe value automatically?

I have a custom built HBot printer, running Klipper.

Also have a custom built Z-probe, that uses the nozzle tip to touch the bed, and measures deflection above it. The Z-offset between the nozzle tip and "virtual" probe tip is -0.4 mm (probe is, in effect, above the nozzle).

Assumptions: assume the bed is perfectly level and flat, for the purpose of this question. Also, Z-homing moves the bed away from the nozzle for safety, Z-endstop is at Z=350 mm.

Question is simple: "How to I automate the probing?"

Currently, I do this "manually":

• Run the PROBE command. Let's say this returns a probe position of Z=3.0
• Then include the offset, manually calculating the nozzle tip would be at Z=3.4 mm
• I then apply this offset manually with SET_GCODE_OFFSET Z=3.4

And everything works great. If I run a G0 Z0 then the bed just touches the Nozzle.

Question: How to automate this process? I am sure I am missing something here.

I would like to have this just run automatically each time I start a print job.

• In Marlin, Repetier, etc. you would use G29, I don't see why this would not work for you too – 0scar Sep 10 at 21:54