Making babysteps permanent in gcode

  • So I think I'm over the major hurdles with the Duet 2 Maestro on my Ender 5 Plus (thanks in large part to this community, I cannot thank you all enough). One of the last things I had to tackle was a good first layer. I was struggling with the fact that my nozzle was too close to the print bed. Using some advice and reading I learned how to use the baby steps feature to work to dial it in.

    My question; Once we have that dialed in the way it should be, how do we take that offset number from the baby steps and make it permanent in gcode? I am new to reprap as I was on Marlin with my older makerfarm prusa i3 clone.

    Thanks again in advance for any help you can offer!

  • How are you setting Z? A switch? A bltouch?

    I ask because the answer is "adjust the Z offset in whatever defines Z". But that doesn't tell you specifically enough... so, what defines Z0?

  • @Danal thank you for replying! I use the bltouch that came stock with the printer.

  • Take a look at G31:

    I believe this will do what you want, offset Z. You would put it in your config.g AFTER the M558 that defines the probe.

  • In my config.g I have this command

    M208 X-2:277 Y-5:300 Z-3:285 ; XYZ min/max

    And I apply permanent baby steps by adjusting the Z value in reversed direction. E.g. if baby steps was +0.2mm I substract 0.2mm from the Z value.

    Sometimes I also just set the Z offset in my slicer since optimal baby steps for PETG and PLA are different on my machine, maybe because of the different bed temperature, not sure.

  • @zapta said in Making babysteps permanent in gcode:

    M208 X-2:277 Y-5:300 Z-3:285 ; XYZ min/max

    no as danal said, you use the G31 to adjust the offset of the probe not M208

  • Moderator

    Can you post your full config and homeall? Then we can tell you exactly what needs to be changed. I get the sense that things are more complicated than they should be.

  • @Phaedrux, whose's config file are you asking?

  • Moderator

  • @Phaedrux, just saw your reply. My config files here here and any feedback will be greatly appreciated. This is a HyperCube Evo corexy with BMG direct drive extruder.

    Some notes:

    1. The acceleration/jerk is pretty low I think. I wonder if I can squeeze more from my machine. Construction is on the stiff side of HEVO.

    2. Per the thread here, I am setting baby steps in a non standard way. I also have my slicer set for +0.25mm z offset.

    3. X/Y homing is using stepper stalling. I am using mode_normal.g and mode_stall.h to control setting for normal operation and for stall based homing but would be glad to get rid of it.

    4. I don't use individual x,y,z homing. Just homeall.

    5. Printer has no z switch. I am using BLTouch for z homing, at the center of the 300x300 bed. Bed is heavy 6mm tooling cast aluminum.


  • Moderator


    M566 X300  Y300 Z100 E900    ; Set maximum instantaneous speed changes (mm/min) (Jerk)
    M201 X300  Y300 Z60  E600    ; Set maximum accelerations (mm/s^2)

    Yeah that's very very low. See here for some tuning methods

    Or give these a shot. The HEVO isn't all that different from my Dbot. This is what I use for conservative values.

    M566 X900 Y900
    M201 X700 Y700

    If you used those settings you probably wouldn't need to use the separate mode_stall settings.

    As for the Z height setting. Whatever works for you I guess, but it does seem a bit complicated.

    The homeall looks fine, but I noticed you return the z motor current to normal before doing the final probing. If you're trying to protect against damage in case of a failed probing you might want to move the current return to after.

    M913 Z100         ; Z motors to 100% current
    M558 A5 F100	  ; Set for probing at slow speed, allow multiple trys
    G30               ; Probe and home Z

  • Thanks @Phaedrux, this is very useful.

    1. Regarding the M566, M201, your examples listed only X,Y. Should I omit Z and E or use my existing values?

    2. Regarding the Z current, I think my thinking was that once the BLTouch triggered once successfully, it's safe to use the normal current and make the conditions consistent with real operation.

  • Moderator

    @zapta your z and e settings are pretty conservative too. For z it only needs to be as fast as needed to keep it from causing problems with mesh compensation or delays at layer change causing blobs.

    For E it would be a matter of tuning along with retraction and pressure advance. The extruder isn't moving a lot of mass around so it can be very quick without problems. My values are an order of magnitude higher than yours for direct drive for instance. 3000-4000 should be enough to let pressure advance do its thing without slipping or skipping. Does not apply to remote direct drive or very high gear ratio drives.

Log in to reply