Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make custom babystepping GCode more configurable #1213

Closed
Whitehawk2000 opened this issue Nov 25, 2020 · 11 comments
Closed

Make custom babystepping GCode more configurable #1213

Whitehawk2000 opened this issue Nov 25, 2020 · 11 comments
Labels
enhancement New feature or request
Projects

Comments

@Whitehawk2000
Copy link

Whitehawk2000 commented Nov 25, 2020

Hi!

just tried to use Babystepping, but the only thing that is changing, are the numbers on the display. The Z-Axis does not move.
When using Babystepping with the integrated display and the knob, it is working without a problem.
Is it possible, that the Babystepping-function does not work when using Klipper as the firmware?

@UnchartedBull
Copy link
Owner

You might need to change the babystepping command that is being used, the standard doesn't work with Klipper AFAIK: https://github.com/UnchartedBull/OctoDash/wiki/Setup-&-Settings#manually-adjusting-the-settings. zBabystepGCode is the one you're looking for. The actual number will be appended directly after the command.

@UnchartedBull UnchartedBull added the support Something isn't working with the users setup label Nov 30, 2020
@Whitehawk2000
Copy link
Author

Great to hear, but sadly Klipper obviously won't be compatible to Babystepping with Octodash.
Klipper need the command: "SET_GCODE_OFFSET Z= MOVE=1".
Without the "MOVE=1"-command at the end, the Z-height would not be adjusted immediately, but instead at the next layer-change,

@UnchartedBull
Copy link
Owner

Mhhh ok and SET_GCODE_OFFSET MOVE=1 Z= doesn't work I presume? I'll have a look at that and probably change the command to be something like SET_GCODE_OFFSET Z=<zDistance> MOVE=1, where would get replaced by OctoDash this would work for both cases then I guess, since Marlin would be M290 Z<zDistance>. Until then you can maybe create a macro in OctoDash to map M290 to the Klipper alternative.

@UnchartedBull UnchartedBull added enhancement New feature or request and removed support Something isn't working with the users setup labels Dec 1, 2020
@UnchartedBull UnchartedBull added this to To do in v3 Release via automation Dec 1, 2020
@UnchartedBull UnchartedBull moved this from To do to In progress in v3 Release Dec 1, 2020
@UnchartedBull UnchartedBull changed the title Babystepping not working with Klipper? Make custom babystepping GCode more configurable Dec 1, 2020
@Whitehawk2000
Copy link
Author

Hmm, now thats strange... I tried your suggestion and "SET_GCODE_OFFSET MOVE=1 Z=" only works from the Terminal in Octoprint. A change in the config.json has no effect.
Your hint with the Macro in Octodash made me finally find the recent issues with Babystepping in Klipper. Later i will look at how to write a Macro and if i can sove this problem now by myself. :-)

@UnchartedBull
Copy link
Owner

Could you maybe have a look at the OctoPrint Terminal while adjusting the Z-Height and check what commands are received from OctoDash? If it works in the terminal it should work form OctoDash as well. Did you reboot / restart OctoDash after adjusting the config?

@Whitehawk2000
Copy link
Author

Yes, rebooted the whole Pi after every config change. If i am remembering it right, i didn't see anything in the terminal while adjusting. But i can be wrong because the model was relatively complex and the terminal was scrolling through the gcode very fast. Now my printer is occupied. So tomorrow, i will be slicing a simple model and checking it again.

@Whitehawk2000
Copy link
Author

So, now i figured out what happens.
Everytime i push the button octodash sends the following command:
SET_GCODE_OFFSET MOVE=1 Z=0.02
SET_GCODE_OFFSET MOVE=1 Z=0.02
.
.
.
But Klipper needs absolut values and not relative ones. So it is staying at 0.02mm all the time. I think Marlin and other firmwares also need absolut values, so i wonder if or why its working with them.

@whoim2
Copy link

whoim2 commented Dec 8, 2020

SET_GCODE_OFFSET usually used for adjust after nozzle change in slicer start gcode. For babystep need to use SET_GCODE_OFFSET_AJUST command. But this not need zDistance value, only send command +0.05 or -0.05 (example) for each button, up and down.

Also, maybe use encoder?)
http://www.ozeki.hu/p_3054-how-to-setup-a-rotary-encoder-on-raspberry-pi.html

@UnchartedBull
Copy link
Owner

Thanks @whoim2. According to their docs the mm isn't needed for either command: https://github.com/KevinOConnor/klipper/blob/master/docs/G-Codes.md#extended-g-code-commands. Could you try setting the config parameter in OctoDash SET_GCODE_OFFSET MOVE=1 Z_ADJUST= (OctoDash will send relative values here, not absolute). Maybe that'll work :)

@Whitehawk2000
Copy link
Author

Oh, that sounds promising. :-) Going to test is it in a few minutes. I wonder why i missed this command , when studying the klipper pages.

Also, maybe use encoder?)
http://www.ozeki.hu/p_3054-how-to-setup-a-rotary-encoder-on-raspberry-pi.html

Sounds like a nice idea. Maybe it would be better to make an independent plugin for Octoprint instead of implementing it into Octodash???

@Whitehawk2000
Copy link
Author

Oh, yes! It now works like a charm and as its considered to work.
So for everyone else having this problem in Klipper here is a quick summary:

You might need to change the babystepping command that is being used, the standard doesn't work with Klipper AFAIK: https://github.com/UnchartedBull/OctoDash/wiki/Setup-&-Settings#manually-adjusting-the-settings. zBabystepGCode is the one you're looking for. The actual number will be appended directly after the command.

And there you have to change the code to following:
SET_GCODE_OFFSET MOVE=1 Z_ADJUST=

Thank you very much for your help!

v3 Release automation moved this from In progress to Done Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
v3 Release
  
Done
Development

No branches or pull requests

3 participants