Octoprint zoffset

Not sure if when using Octoprint that the SM2 will still apply the same zoffset we see in the keypad/touchscreen menu ?

Yes, it does
(and I need 20 characters)

OK thanks for confirming. I figured that it did as my adhesion was fine. Only problem is that we lost that ability to change it on the fly using the touchscreen when drawing/monitoring the skirt. Is there a way to change it in Octoprint and will the change be remembered by the SM2?

Not sure. Not out of the box at least.

I haven’t tried it myself, but there is this thing called babystepping to have live z-adjustments. but I haven’t even tried to get it working. Don’t know if the SM firmware actually has this feature compiled in or not:

Standard advice on octoprint forums is that you should use your printers touch screen, but that just doesn’t work on the SM unfortunately. (I even have start gcode that turns the screen off when I run a print through Octoprint so I don’t accidentally touch it and mess up the print.

I believe it might be doable based on this post I found below:

If that " Touchscreen Z offset M421 Q command M206 G1029 D which is a secret undocumented gcode Snapmaker added" is true then we should be able to read that value and change it on the fly.

G1029 D will adjust the mesh offset and only works when you aren’t printing. It can not be used to replicate baby stepping, which is being able to apply a micro offset during a live print.

Thanks for your reply nivekmai. How does the touchscreen on the SM2 adjust the Zoffset on the fly and then keep that setting? Is there a gcode to make a live zoffset?

Unfortunately the touch screen’s firmware is not open source and as such is kind of a black box for how it works. However, my understanding is that it does it’s own on the fly processing but does not do so using gcode commands.

Yes, the baby stepping you can do on the touchscreen is the “live z offset” in the firmware:

Unfortunately, the only way to trigger this codepath is through the system event handler:

Which can only be triggered by events sent from the touchscreen (aka “HMI”):

That being said, I don’t think it should be super complicated to change the firmware to allow you to send the babystep gcode, and have it just call the BedLevelService to update (and then also apply) the live z offset.


Replace this function with that reference to levelservice.UpdateLiveZOffset(val) and that’s pretty simple.

thermalManager.babystep?? Is that just a straight up bug?

Also, going by the documentation for M290, we should also adjust the mesh (like G1029), right?

As a workaround, I use Cura for that.
Cura has a plugin for z-leveling that adds an offset to the z values in the gcode.
I have a file that is just a skirt with a few lines.
I slice the file and I send it to Octoprint.
I print it.
I check adherence and appearance of the lines.
If I am not satisfied, I set an offset on Cura, slice again, send to octoprint and print.
Usually with 1-2 iterations you get the nice point.

Maybe it seems a bit convoluted but it takes a few minutes and I don’t need to z-level every day either.

Just to add to my mail, I have used code (1029 etc) on Octoprint terminal with no results.

Also tried the Octoprint z-offset pluging. I think it doesn’t work with the Snapmaker . This plugin sends the offset to the Snapmaker but can not read it so you don’t know where you are so, lacking a micrometer, I didn’t want to take too many chances.