Jump to content

Voron 0 modify BED_SCREWS_ADJUST klipper macro


Recommended Posts

Hi, quick question here.

Googling around doesn't seem to work for me here. I am trying to see if there's a way to modify the BED_SCREWS_ADJUST macro so that the bed will move away from the head after I'm done. I have to manually move the bed away after I finish the screw adjustments every time, so it would be nice if that happened automagically when I finished.

Any ideas? I can't find any existing macros for BED_SCREWS_ADJUST and/or how to add code that runs AFTER I hit the "finish" button on my KlipperScreen.

Link to comment
Share on other sites

I did read through:

https://klipperscreen.readthedocs.io/en/latest/Panels/Screws/

But didn't see much in the way of post-leveling macros or a way to initiate commands like bed moves.

One option might be for me to make a macro to move things to where I'd like them to be and somehow see if I can add a "quick-access" button on the left side of the Klipperscreen for easy access.

  • Like 1
Link to comment
Share on other sites

2 hours ago, DennisM said:

One option might be for me to make a macro to move things to where I'd like them to be and somehow see if I can add a "quick-access" button on the left side of the Klipperscreen for easy access.

Sounds like it might be worth a try. 

TBH, the whole klipperscreen thing is cool and all my printers have them, but it would be a lot better if we had a less convoluted way to edit its functionality. Or maybe there is, and I don't know.

Link to comment
Share on other sites

This is easy, make a new macro called "my_new_improved_bed_leveler".  it has only two lines: (1) BED_SCREWS_ADJUST and (2) a "G0" command to move the print head.

 

It is odd that you did not find out how to move the bed.  It is the first "g code", g-zero.

Link to comment
Share on other sites

Posted (edited)

Hi, thanks. Of course I know how to move the bed and nozzle via G0/G1 commands, that wasn't the question.

But I like the idea of the new macro, replacing the original. Here's a draft of what I'll tinker with:

[gcode_macro BED_SCREWS_ADJUST]
description: Bed screws adjustment then move bed away from nozzle
rename_existing: BED_SCREWS_ADJUST_ORIGINAL
gcode:
    BED_SCREWS_ADJUST_ORIGINAL
    G90                    ; absolute positioning
    G0 X60 Y110 Z8 F2000   ; move nozzle to back center and lower bed

 

Edited by DennisM
Link to comment
Share on other sites

Nope, that attempt didn't work. The printer function operated exactly the same with no movement afterwards.

Back to the drawing board.

My next attempt will be to try creating a new macro that does this and then invoking it from the macros menu. Not a preferred solution but I'll see if it works at all.

Link to comment
Share on other sites

18 hours ago, Penatr8tor said:

but it would be a lot better if we had a less convoluted way to edit its functionality. Or maybe there is, and I don't know.

I have to give a +1 on this. There are so many great tools but they are too hidden away from the user. I've had other features that I would like to customize but I can't find any documentation on how they are actually implemented and I don't want to have to rely on Discord just to find out if it's even possible.

  • Like 1
Link to comment
Share on other sites

1 hour ago, DennisM said:

Nope, that attempt didn't work. The printer function operated exactly the same with no movement afterwards.

Back to the drawing board.

 

The problem is that you have attempted to redefine BED_SCREWS_ADJUST.     You can do this but the LAST definition of the macro is what has an effect.     I bet you defined your new macro BEFORE the original one was defined.

 

This is why I suggested calling your new macro by a new name as there would be no chance of this happening You could define it anyplace, order is unimportant

Try this...

 

[gcode_macro MY_NEW_BED_SCREWS_ADJUST]
description: Bed screws adjustment then move bed away from nozzle
gcode:
    BED_SCREWS_ADJUST
    G90                    ; absolute positioning
    G0 X60 Y110 Z8 F2000   ; move nozzle to back center and lower bed

 

 

Link to comment
Share on other sites

Hmm, interestingly when I make a custom macro as discussed, I get an unexpected result:

  1. Select macros on the menu
  2. Pick the new macro name to run it
  3. KlipperScreen shows a popup yellow box with "BED_SCREWS_ADJUST" in it and doesn't do anything at all.

Interesting... I'll dig a bit deeper.

Link to comment
Share on other sites

OK, so here's what's happening now and I don't think there's an easy way to fix this.

With a new custom macro, I can pick it from the menu and run it. But here's what it does:

1) The nozzle and bed move like they are going to let me start the adjustment process

2) Once the nozzle and bed are done moving, it then moves to my final position as defined in the custom gcode.

It's like the call to BED_SCREWS_ADJUST doesn't actually let it run for me, instead it just assumes it's done and then finishes the macro.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...