Page 1 of 1
Z-Axis G-Code Offset
Posted: Sat Feb 28, 2015 8:34 pm
by Amphagory
Hello,
I was wondering what the Z-Axis G-Code Offset in S3D actually does? Will the software make the the gap between the bed and the extruder nozzle "smaller" and ignore the Z stop limit switch? Using the JPEG as an example, from my understanding it will add 0.5mm to all the z-axis measurements in the G-code, therefore will it raise the bed closer to the extruder nozzle and go beyond the z stop limit switch.
This would be helpful as I would just have to be fairly close to the gap I want between the extruder nozzle and fine tune the final distance in the software.
I would worry that I might damage the switch if I would have it compressed more than it was designed for.
Mike
Re: Z-Axis G-Code Offset
Posted: Sun Mar 01, 2015 7:46 am
by JoeJ
Yes, a value of -0.5mm will move the nozzle 0.5mm closer to your build surface. However, if this actually happens in real life depends on your z-axis limit switch and firmware software endstops.
PS - if you rollover that z-axis offset option with your mouse, it will display a popup that tells you the same thing. They have this for every option
Re: Z-Axis G-Code Offset
Posted: Sun Mar 01, 2015 2:53 pm
by Amphagory
Thanks for the reply JoeJ,
I just want to clarify your statement for myself...
1) In the jog controls, I can "by pass" Z-axis limit switch and get the bed closer to the nozzle. In the G-Code offsets, the Z-axis limit switch will trumps any settings that surpasses the physical switch?
2) I'll need to look up the firmware settings to see what my limits are on my Makergear M2.
thanks for you help!
Re: Z-Axis G-Code Offset
Posted: Sun Mar 01, 2015 4:43 pm
by KC_703
I've been wondering about this setting as well. ABS and PLA adhere so well to PEI that it would be nice to fine-tune the initial Z to increase / decrease the initial layer squash... and therefore adhesion of the print.
Using the Z-axis Offset parameter seems to allow for that fine-tuning of squash. Positive would reduce squash by raising head, and Negative would increase squash by lowering head.
I think a properly level bed and Z0 must still be performed before using this, but it could be used used for entire setup of squash as long as all the S3D profiles reflect the off-set. Of course, just be careful you don't go crashing into the print bed.
Re: Z-Axis G-Code Offset
Posted: Sun Mar 08, 2015 11:23 am
by JoeJ
@Amphagory - I was talking about the firmware software endstops, not the hardware endstops. You can NEVER bypass the hardware endtops (otherwise, what would be the point of them?!)
The reason the firmware software endstops are important is because some firmwares won't allow you to move outside of the virtual software endstop range. For example, if the min software endstops are enabled, it's pretty likely the firmware will prevent your machine from moving to a Z-coordinate that is less than zero. If you were trying to print a 0.1mm layer and your bed was 0.2mm too low, you can see why this would be an issue. You would want to put in -0.2mm for the Z-axis gcode offset in S3D, but the firmware would see the Z-0.1 command and with min software endstops enabled in the firmware, it would clamp the movement to Z0.
So in summary, yes, everything you guys are saying about how to use Z-axis offset in S3D is correct, just keep in mind that if the bed is very badly calibrated, the hardware or firmware endstops may step in. As long as you use the S3D offset for small adjustments, you will be fine.
Re: Z-Axis G-Code Offset
Posted: Tue Apr 12, 2016 5:40 pm
by GloomySpark
Hi,
Will this input do a M851 and erase the z-offset firmware value?
Thanks
Re: Z-Axis G-Code Offset
Posted: Wed Apr 13, 2016 5:04 am
by CompoundCarl
No, it doesn't send that command at all and it won't change the value that's in the firmware. It just shifts the coordinates in the gcode file.
Re: Z-Axis G-Code Offset
Posted: Sat Sep 22, 2018 1:25 pm
by RickTee
Seems this option does not do what the tool tip suggests, tool tip says a negative value will move the head down towards the build platform and it may do that (untested here) but that implies a positive value will move the head away from the build platform but nope I put .08 in and it berried the extruder in the bed.

Re: Z-Axis G-Code Offset
Posted: Mon Sep 24, 2018 6:51 am
by wirlybird
Works fine for me. I generally add .1 to .15 for additional gap for ABS on mine versus my PLA settings.
Take a look to see if the Z values are inverted for your particular machine.
Re: Z-Axis G-Code Offset
Posted: Sat May 08, 2021 12:21 pm
by jbenfield
I know that this is an old thread, but I thought I'd share for the people who may come across it in searches.
I use adhesive build surfaces on removable metal plates with an inductive z-sensor. Nozzle above the metal plate is my real hardware endstop (Z=0) and stored in the firmware. Then I can just measure the thickness of whatever stick-on surface I'm using and plug the number in here. My profiles all have surface/build plate combos in them and swapping surfaces is as easy as changing filaments.