Build Sheet Manager & "Adjust Live Z"

make sure the LCD button issues a true adjust z command:

  • Anything thats not a true “Adjust Live Z” call wont change the sheet’s z-offset value. You need to set MOVE=1 and ADJUST_Z= in your call to SET_GCODE_OFFSET. This is how Fluidd, Mainsail & Klipper Screen etc do it. All other call patterns wont change the sheet offset.

I wish I could, but cannot locate where this is being setup (standard config, but no idea in which file I need to look at!)

By the way I found another usage to your macro: between PETG and ABS/ASA, I always need some adjustments. So I created some bed sheet coupling sheet type and material.
Something like: textured/PETG …

1 Like

Hi,
I noticed there is this command “_BUILD_SHEETS__SET_GCODE_OFFSET”, but it is not recognized. What is this command?
Thanks

Hello @giuspo

Where did you find that?

Thats what the original SET_GCODE_OFFSET gcode is renamed to when its overridden.

Okay, I understand what you’re saying.
Thanks :slight_smile:

Sorry to revive this, but is this solution still working on the latest version of klipper? I am new to Klipper with a custom printer, coming from the prusa environment i really miss the ease of adjusting Z offset and saving multiple sheets, but being new to klipper it is also tricky to understand all this code at once.

It should work. If you run in to trouble let me know.

(I haven’t been using it for the past ~6 months because my klipper printer is running some load cell probing experiments that makes this unecessary)

Sweet, ill give it a shot and report back. Load cell experiments? Nextruder integration?? :eyes:

Yes: https://youtu.be/ATdIHIhHrec?si=My8IpuL_E5MXvYzs

I am trying to set this up and need alittle help. I am new to klipper so im struggling a little with this part.

  • Last but most important: Your PRINT_START macro must set your Z Offset. You can do this with a plugin like CALIBRATE_Z . Or, you can add a line to your PRINT_START to reset the Z offset to the correct value for your printer: SET_GCODE_OFFSET Z=0.0. This macro doesn’t try to keep track of the state of the z offset, that’s on you. If you don’t do this the APPLY_BUILD_SHEET_ADJUSTMENT call will apply the same adjustment multiple times and you will crash your printer.

Do i add that exact line to my start gcode? Is the idea here to zero the offset before each print so it applies the APPLY_BUILD_SHEET_ADJUSTMENT from zero?

The crashing part, does this refer to if you dont zero the offset, it will add it twice?

EDIT2: Ok, i think i got it working. Did several print restarts and the one sheet i set up seems to save and remember for next print. I set it by doing it while printing, and it saves automatically.

What other ways of setting the offset other than during print are there?

And last question, is there a way to delete build sheets? I accidentally added more than i need. When using show build sheets, i get quite a few. I accidentally created too many.

1 Like

Glad you got it working!

If your printer has an offset value that’s stored in the config you can set that. It’s really very different how printers use the offset. But yes, the danger is the adjustment being added multiple times and crashing the toolhead.

You can use the SET_BUILD_SHEET_OFFSET macro to set an arbitrary offset for a sheet. So maybe you know that a sheet is thicker, maybe you want to start with a large offset.

You can delete build sheets from the save variables file.

1 Like

Thanks for all your help. Been using this for a couple of weeks without any issues. It totally helps with the offset, if youre new to klipper and are used to how Prusa manages the offset and build sheets. It makes it convenient not have to remember offset for multiple sheets, easy to change and easy to know where you stand. All of the macros i took from your config worked, everything else also worked first try without issues after copying the right lines in the .cfg and macro files. Again, thanks a lot! truly helpful.

1 Like

Man, I’m having a really hard time wrapping my head around this entire idea and I can’t seem to get it to work right. Sorry if I’m missing something obvious, I’m just having a really hard time following this guide.

First of all, I use Klipper Adaptive Meshing, and when I have Build Sheet Manager set up, it does a bed mesh level, but upon printing, the bed mesh isn’t actually used. So are these two compatible? I think it has something to do with the Save Variables command because while I have Build Sheet Manager configured, it does the whole bed mesh level routine but it doesn’t actually use it when printing.

Second of all, Are you even supposed to use PROBE_CALIB with this? I’m really confused. So PROBE_CALIB updates my Z-offset in my printer.cfg. I have Save_Variables set up, yet PROBE_CALIB always updates my printer.cfg z-offset. And even putting SET_GCODE_OFFSET Z=0.0 in my start gcode, doesn’t change the Z Offset in the printer.cfg to 0. Is it supposed to?

Are there two Z-Offsets I’m supposed to keep track of now using this? The overarching one in printer.cfg and then the micro-adjustments in the save_variables file?

And then finding the z-offset and setting it. Does adjusting it live automatically save it to the selected sheet in save_variables, or do you have to take note of the Z-offset then plug it into “Set build sheet offset” every time? Or is there a way to save it without saving the adjustment to the printer.cfg with the “Save Config” option that pops up every time you make adjustments? Am I supposed to ignore the Save Config now?

That’s a lot of questions…

Yes, that’s the way it works. Only “live” adjustments are saved, meaning SET_GCODE_OFFSET MOVE=1. this is often called ‘babystepping’.

No. SET_GCODE_OFFSET doesn’t update the config, only PROBE_CALIBRATE does. Any changes you make are normally lost between restarts. Build Sheets captures ‘Baby Stepping’ adjustments (SET_GCODE_OFFSET MOVE=1) and saves them to the sheet in save_variables, so that’s why you are being nagged to save the config.

You can store your [save_variables] in a separate file:
https://www.klipper3d.org/Config_Reference.html?h=macro#save_variables
I believe this will stop your GUI from bugging you to save printer.cfg when you make Build Sheet adjustments.

There are 2 ways to do this: the klipper way and the Prusa way. What you do depends on your printer and what you prefer:

The klipper way would be to use PROBE_CALIBRATE and store the z_offset in the config. When using Build Sheets you need to set your gcode offset to whatever this value is in the start gcode, not 0. That can be fetched from the config in a macro: SET_GCODE_OFFSET z={printer.configfile.settings.probe.z_offset} (best to double check that, I didn’t test it). The the build sheet offset is added to this when the print starts.

The ‘Prusa’ way is to set the config offset to 0 and store the entire offset in the sheet. But be careful that when the offset is 0 the nozzle cannot hit the bed. Their offset is always about 1mm. If this isn’t the case for your printer/probe it might be wiser to go the klipper way.

You want to start with an initial condition that’s a bit high and then dial in the offset via the sheet & babystepping.

The two things do work together. How do you know the bed mesh wasn’t used?

I am a bit confused as well, but think I got it working :slight_smile:
Maybe I overlooked it, but what would be the correct way to automate the build sheet management in ORCASLICER?
Under printer properties I can check, that the printer uses multiple surfaces, but how can I let the printer know which one to use? Without manually selecting them before printing?
Thanks!

You could call a macro in your print start and ossify the required sheet name from orca slicer. In that macro you can look up the name of the installed sheet and see if they match.

Ideally if they don’t match you could prompt the user to install the right sheet. When the user says “ok” you can then switch to the correct sheet in the macro.

This is amazing! First of I want to thank you @garethky for sharing this great set of macros.

It just works and it fully replaces the manual routine of pre-print adjustments. Bye bye Z-offset spreadsheet😊.

To take things further I have written a set macros that gives me easy to use menus/prompts in Mainsail that lets me choose the installed material + sheet and surface and combine those values before calling INSTALL_BUILD_SHEET.
I´m also combing this concept with separate prompts for other variables that controls choice of sub routines in my print_start and end macros for different usecases. Pre-print setup has never been easier! (work in progress at the moment)

1 Like

I have a filaments plugin that can keep filament specific variables so you can do your pre-heating based on that info. It also remembers what filament is in the machine between restarts: GitHub - garethky/filaments-klipper-extra: A Klipper plugin that does basic filament management for extruders in the printer

When kevin ships the plugin interface for klipper (hopefully) I’ll be able to package both of these up as plugins.

I really like that prompts feature in Mainsail. I wish it was in Fluidd and KlipperScreen too.

I’ve just come across this macro after wanting to do something like this for a while, so thanks for putting this together. I have managed to setup some sheets and set the offset for them correctly and can see them reported when I use the SHOW_BULID_SHEETS macro. When I start a print everything progresses as normal and I can see the offset value get applied in the Mainsail GUI under z-offset, but right after this I get and error and the print aborts. I have only managed to get 1 print to work successfully and I’m not sure how I did it now. I am sure I have missed something simple I just can’t find where I have gone wrong. Can you provide any help of the error.

Error evaluating ‘gcode_macro SET_GCODE_OFFSET:gcode’: jinja2.exceptions.UndefinedError: ‘dict object’ has no attribute ‘MOVE’

Thanks