How to set Z-Offset in Octoprint

This has been updated so that anyone that had my issues can see what I did.

Hi Guys,

New to all of this so please eleaberate if you could on what to do little more than you noramly would please. Dont just say load this code or that code, also say where and with what app or interface. etc.

My Setup

  • Ender 3 Pro
  • SKR mIni E3 - Marlein 2.0.0 with BLTouch - Marlin branch below (otherwise just use default)
  • Octoprint - latest
  • BLTouch
  • Usb Cable error with Pi (TMC Connection error) - Fix --> Pi setup serial exceptions still
  • Plugin to set Z offset from OctoPrint - Auto bed leveling expert

Ok, so my issue is, the BLTouch is about 15mm to high and I need to set the z-offset from octoprint. Which I have no idea how to do.

Please help, thanks

Why don't you set the offset in your printers settings?

It crashes the firmware im using :frowning:

You should report that to bigtreetech

My suggestion would be to test setting it up via terminal with the M851 gcode and hope it doesn't crash that way.

Other solutions would be the following:

In Ultimaker Cura : Open the plugin manager ("Toolbox"->"Browse packages...") and install "Z Offset Setting", a new parameter will be available in the "Build Plate Adhesion" settings menu called "Z Offset".

In G-code :

By adding the following lines to your start G-code (see e.g. this answer) using the G92 G-code command:

G0 Z0.2 ; Move the head to 0.2 mm
G92 Z0  ; Call this Z = 0

or when you are able to connect to the printer over USB using a printer terminal (e.g. Pronterface, Repetier or OctoPrint) using the M206 G-code command:

M206 Z-0.2 ; Will raise the Z height by 0.2 mm
M500       ; Stores the offset in memory


Thanks for the reply, ill try digest that and get back to you

Ok, the BLTouch is too high, what's about the nozzle?

Homing the Z access, BLTouch probe fully extended – on the way down

Probe having retracked after touching the base

Homed possession - centre of print surface with ruler for context - BLTouch

Homed possession - centre of print services with ruler for context - shroud

Printing with current z axis - the Bain of my existence. See how high it is from the print service.

So I add this and no joy :frowning:

This one has my vote, I use it myself when printing PETG. It's pretty much as easy as it gets and you can easily test different settings.

Although I urge you to try fix the settings in the hardware, keeping it as such will cause you problem for the rest of your time. Sorry for the harsh words.

You need to change the Z value in the G0 command
The G92 command saves it afterwards as new Z 0 hight

1 Like

G92 Z15.3 mean a offest of -15.3mm? Well this is what i O the Z at and still it makes no diffrence.
FGS, this motherboard is a pain

For what it's worth, you can take a standard piece of paper, cut a rectangle of that. Put it in the middle of your bed.

  • Make sure that you're in absolute mode for the motors.
  • Use G0 X60 Y60 Z120 # or whatever command would move to the center
  • Use G0 Z100 # to move it down 20mm
  • Alternately, use the OctoPrint -> Control -> jog buttons for Z (making sure to set the increment)

So move things together until the nozzle is just barely pinching the paper. Tug on the paper a little and it should move but not easily. Once you're at this point issue your G92 Z to save the zero position for the Z.

Remove any autolevel and G92 Z commands from all your gcode and try a simple cube print job. If this works then you can feel good for a bit because you've made a success and you understand a little more how the process works.

Hey @OutsourcedGuru

And by issue, what and where do you mean?

Did that and then made sure all four corners where set the same (manually) and then sent the commad. Lets see what happens.


So, the BLTouch seems to change the hight each time I start a new print. It does its 2x touch before each print. How do I stop this?

So, none of the above has work, I think something is overriding any settings I’m put in.

What I did get to work was this plugin to set the Z Axis offset,

The only issue is my X and Y are so off when i print, (Solved: Homing the X and Y resolved this before each print)

The odd thing is, when I use the Home button on the Z access in OctoPrint it moves to front left and then moves to the middle to do the BLTouch test in the centre, so I don’t get why when it prints it’s so off.

Remember this part? You need to turn off the gcode commands that tell the leveling thing to do its routine. All that will overwrite the Z home you just did.

For the X/Y, before printing it's good to use the OctoPrint Control tab to home the X/Y first. If it goes to the middle of the bed then go back into Settings -> Printer and change that from center to left/back.

So I removed a few plugins that may or may not have messed with my settings and only left one "Auto bed leveling expert". I then homed the printer X0 Y0 and then saw that the Z10 or 10mm+ from zero, I then move to 0 and calculated the difference from there to get a paper sheet to just grab and did this for all for corners making sure they all matched, which was -5.6mm and that’s what I put in the plugin for the Z offset. Boom The_Calibration_Cat half printed as I got a PLA jam, but f%^k me what flustering weekend. Tomorrow Ill clean the clogged head but at least I’m printing.

Alright, that's usually because:

  • the z-offset is too close (by maybe 0.2mm - 0.4mm or so)
  • the filament is too cold (I run my PLA between about 190C and 194C)
  • the extrusion rate is too high

It's likely just the first one.

Here's a blog entry of mine for a modification which I did on my own Robo 3D printer. Since the design of the printer was a little amateurish at times, this was necessary to turn it into a functional printer. I used one of the print bed leveling plugins initially but the real test is to print a huge raft and then tweak it in realtime while that first layer is printing.

You'll get this. Print a line down the left end of the print bed. Stop. Pull up the line with your fingers and examine it. It should be a thin/flat rectangle rather than rounded at the top or u-shaped. Ultimately, this is how you dial in the z-offset or at least how we did things before these IR- and touch-based tools.

The temperature of the bed is also part of this. Since I have an unheated bed, I try to manage the heat of the bed itself with a hair dryer and enclosing the print volume in foam.

And then, I'll add another Raspberry Pi 3B inside with the Pi Sense Hat which is running an animation on the screen and reporting the temperature. It adds heat to the print volume area and keeps it about 90F which is perfect for my setup. It then minimizes curling on large bases.

But all this pays off eventually. Look how beautiful this part turned out. It's just perfection, in my humble opinion. And this is on the lowest quality setting in Cura for my printer.