Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Saving Baby Steps Macro

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    2
    10
    496
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sunToxxundefined
      sunToxx
      last edited by

      Can anyone explain to me why this macro has movement commands included? What purpose do they serve?

      And can anyone see a reason why the macro checks for a print in progress, other than because of the movement mentioned above?

      If there weren't any movement instructions in this macro, wouldn't it be possible to pause a print eg in first layer or infill, use the save baby steps macro and then resume the print?

      ; =========================================================================================================
      ;
      ; This macro displays the current z-trigger, babysteps, and the difference between
      ; the new numbers which represents the new trigger height.
      ;
      ; It clears the current baby-stepping and then rehomes the machine to make the new
      ; z-offset effective.
      ;
      ; If this is for a specific nozzle / sheet combination it is recommended to save the
      ; value like G31 0.234, where 0.234 repesents the display number into the nozzle / sheet
      ; config files under 0:/macros/02-Print_Surface_Handling or 0:/macros/02-Nozzle_Handling
      ; (depending on what z-probe you are using). Whenever this combination chnages execute
      ; the corresponding macros for the combination.
      
      ; If this is for a specific filament type, recommend placing this yielded information in
      ; the filament's config.g -
      ;
      ; Ensure M501 exists in 0:/sys/config.g !!!
      ;
      ; =========================================================================================================
      ;
      if state.status != "processing"                                      ; printer is not currently printing!
      
         if move.axes[2].babystep !=0                                      ; if no babysteps are currently adjusted - exit routine
            M291 R{"z-Trigger Height"} P{"Current: " ^ sensors.probes[0].triggerHeight ^ ", Babysteps:" ^ move.axes[2].babystep ^ ", New: " ^ sensors.probes[0].triggerHeight - move.axes[2].babystep} S2
            M291 P{"Press OK to continue or CANCEL to abort."} R{"Setting z-probe offset to " ^ sensors.probes[0].triggerHeight - move.axes[2].babystep ^ "?"}  S3
            M400                                                           ; finish all current moves / clear the buffer
            G31 Z{sensors.probes[0].triggerHeight - move.axes[2].babystep} ; set G31 Z offset to corrected
            M500 P10:31                                                    ; save settings to config-overide.g - G31 P31 saves trigger height
            M290 R0 S0                                                     ; set babystep to 0mm absolute
            G28
         else
            M291 P"Babysteps are 0.000. z-trigger height will not be changed." S1
      else
         M291 S2 P"z-Trigger height cannot be changed during an ongoing print. Please run this macro when the print is finished, and the bed is clear and ready!" R"WARNING!"
      ;
      ; =========================================================================================================
      ;
      
      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @sunToxx
        last edited by

        @suntoxx are you talking about the homing command?
        its changing the z probe offset according to how much its been adjusted and then removing it and rehoming the machine to set the new offset.
        You could remove that and set it mid print but I don't see why you'd want to

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        sunToxxundefined 2 Replies Last reply Reply Quote 0
        • sunToxxundefined
          sunToxx @jay_s_uk
          last edited by

          @jay_s_uk well, I keep forgetting to do it after the print and already started a couple without the new value. So unless there is a good reason for this, it would be a quality of life improvement to be able to save at any time.

          What purpose does the movement serve exactly? I am new to printing, Duet etc.

          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
          • sunToxxundefined
            sunToxx @jay_s_uk
            last edited by

            @jay_s_uk the manufacturer of my printer also kind of moaned about it, so I suppose it is not a total newb problem 😅

            1 Reply Last reply Reply Quote 0
            • jay_s_ukundefined
              jay_s_uk @sunToxx
              last edited by

              @suntoxx the general thought process is if you have your machine setup correctly, you shouldn't need to adjust the babystepping. Or if you do, it should be on a per print basis and shouldn't become a permanent change.

              The G28 just rehomes all the axis and uses the updated z probe offset to set the nozzle position.

              What printer do you have?

              Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

              sunToxxundefined 1 Reply Last reply Reply Quote 0
              • sunToxxundefined
                sunToxx @jay_s_uk
                last edited by sunToxx

                @jay_s_uk a CaribouDuet LGX Mosquito. It does not save the Z axis in config.g at all, it only saves it in config-override.g ( not sure I spelled that one right. Not at home atm).

                So the movement simply shows the print head position at the new value? So there is no obvious reason not to split this macro into 2 macros? One for the movement, if you want to see it and one for the actual saving?

                Would saving without pausing the print potentially cause a hiccup?

                jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                • jay_s_ukundefined
                  jay_s_uk @sunToxx
                  last edited by

                  @suntoxx yes, its saved in config-override as theres a built in command for saving the updated z offsets (Thats the M500 P10:31).
                  Theres no reason why it couldn't be done in 2 macros.
                  Theres also no reason why you couldn't call just the saving part without pausing the print

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  sunToxxundefined 1 Reply Last reply Reply Quote 0
                  • sunToxxundefined
                    sunToxx @jay_s_uk
                    last edited by

                    @jay_s_uk what I meant was, the assembled and calibrated printer does not have the z value set in config.g. So I assume it is intended to be exclusively handled via the save macro. Which seems to make sense to quickly change between nozzle/sheet combos or so.

                    That is great news, thanks. I will make 2 macros based on this one when I get back home and try it out.

                    jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                    • jay_s_ukundefined
                      jay_s_uk @sunToxx
                      last edited by

                      @suntoxx you must have some sort of G31 setting to set the X and Y offsets, as they aren't handled by that macro

                      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                      sunToxxundefined 1 Reply Last reply Reply Quote 0
                      • sunToxxundefined
                        sunToxx @jay_s_uk
                        last edited by

                        @jay_s_uk yes, those 2 are in the config.g. Something like
                        G31 X-xx.x Y-xx.x

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA