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

    Suggestion for change to implementation of baby-steps

    Scheduled Pinned Locked Moved
    General Discussion
    13
    100
    10.0k
    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.
    • dc42undefined
      dc42 administrators @deckingman
      last edited by

      @deckingman said in Suggestion for change to implementation of baby-steps:

      So how can an end user know where the print head is in relation to the bed if the displayed value changes depending on whether the printer was homed prior or after the baby stepping buttons were pressed?

      You make it sounds as though the displayed value for a given actual position depends on whether you home before or after babystepping; but that's not the case. Suppose your Z probe or Z endstop triggers at 5mm. If you home and then apply 1mm babystepping, the head will initially be at 5mm but after you apply the babystepping it will have been raised to 6mm. If you then home Z again, the head will be at 5mm above the bed (not 6mm) but 4mm will be displayed.

      All this ignores the fact that if you have a tool offset applied, or bed compensation applied, the height will be further adjusted.

      Perhaps one option would be for DWC to display the baby stepping offset alongside the Z coordinate.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      deckingmanundefined 1 Reply Last reply Reply Quote 0
      • deckingmanundefined
        deckingman @dc42
        last edited by

        @dc42 said in Suggestion for change to implementation of baby-steps:

        @deckingman said in Suggestion for change to implementation of baby-steps:

        So how can an end user know where the print head is in relation to the bed if the displayed value changes depending on whether the printer was homed prior or after the baby stepping buttons were pressed?

        You make it sounds as though the displayed value for a given actual position depends on whether you home before or after babystepping; but that's not the case. Suppose your Z probe or Z endstop triggers at 5mm. If you home and then apply 1mm babystepping, the head will initially be at 5mm but after you apply the babystepping it will have been raised to 6mm. If you then home Z again, the head will be at 5mm above the bed (not 6mm) but 4mm will be displayed.

        All this ignores the fact that if you have a tool offset applied, or bed compensation applied, the height will be further adjusted.

        Perhaps one option would be for DWC to display the baby stepping offset alongside the Z coordinate.

        Sorry David but it is the case that the displayed value for Z depends on whether you home before or after baby stepping is applied. At least on my machine that's what happens.

        So in your example and in my actual usage case, I home Z at the end of which the head is at 10.00mm above the bed - actual real distance and that's what DWC shows. The trigger height is actually 0.4mm but that's irrelevant.

        Then I apply baby stepping repeatedly - actually 10 times - moving the bed downwards away from the nozzle. The bed moves each time, the current offset increments each time, but the head position for Z does not change. It stays at Z = 10.00mm. After 10 presses of the baby stepping button, the bed has moved 0.5mm further away from the nozzle, the current offset shows this 0.5mm but DWC still shows Z =10.00. At this point, the head position is actually 10.50 mm from the bed.

        So at this point, the displayed value for the actual head position is 10.00mm but the actual head position is 10.50 mm from the bed.

        Now, if I home Z again, without doing anything else - leaving the baby stepping offset at 0.5mm, after the homing sequence finishes, the displayed value of head position is Z=10.50mm.

        So the displayed value of actual head position in Z was 10.00 mm prior to homing, but it changed to 10.50 mm after homing.

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        dc42undefined 1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @deckingman
          last edited by dc42

          @deckingman said in Suggestion for change to implementation of baby-steps:

          Then I apply baby stepping repeatedly - actually 10 times - moving the bed downwards away from the nozzle. The bed moves each time, the current offset increments each time, but the head position for Z does not change. It stays at Z = 10.00mm. After 10 presses of the baby stepping button, the bed has moved 0.5mm further away from the nozzle, the current offset shows this 0.5mm but DWC still shows Z =10.00. At this point, the head position is actually 10.50 mm from the bed.
          So at this point, the displayed value for the actual head position is 10.00mm but the actual head position is 10.50 mm from the bed.

          So far, this is as I expect. The user Z coordinate is 10mm and you have applied +0.5mm babystepping.

          Now, if I home Z again, without doing anything else - leaving the baby stepping offset at 0.5mm, after the homing sequence finishes, the displayed value of head position is Z=10.50mm.
          So the displayed value of actual head position in Z was 10.00 mm prior to homing, but it changed to 10.50 mm after homing.

          Are you sure? That sounds the wrong way round to me. If you apply positive baby stappering, and then you home Z using a Z probe and optionally perform a relative Z move afterwards, then the displayed height after homing should be reduced by the babystepping amount. Which is what happens on my delta. The displayed Z coordinate after homing the second time in your example should be 9.5mm.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          gnydickundefined 1 Reply Last reply Reply Quote 0
          • deckingmanundefined
            deckingman
            last edited by

            Might have got that wrong. As I said, I don't normally use baby stepping. I thought I was lowering the bed when in fact the buttons relate to the tool head so the downward pointing icon actually moves the bed up. Therefore I was applying a negative offset hence 10.50 mm. And after homing with the offset, jogging the axis will only allow me to go to Z=0.5mm and no lower which I guess is to be expected.

            Personally, I find it confusing that the displayed Z value changes depending on whether baby stepping is applied before or after homing but if that's the way it is, then fine. I don't use it so I don't really care.

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/@deckingman

            1 Reply Last reply Reply Quote 0
            • gnydickundefined
              gnydick @dc42
              last edited by

              @dc42 He is correct that the Z indicator doesn't show the actual position. If I baby step 100mm from position 5, it will always display 5.

              I've said this before, but it doesn't seem to have weight with you, there are MANY more workflows than: click, print, finish.

              Follow this...

              0_1550348918887_23ace931-a29a-4818-83a4-03aa5fe25987-image.png

              I expect you to say to add baby step reset to the stop.gcode or to the slicer, but then that would defeat the ability to re-use the value.

              And, since baby-steps impact, but not stored value, are transient between homings, as they are just a value applied, with no impact on the actual z height measure, you have to also reapply them between prints if even you don't reset them.

              If we see a pattern and that we always need -.15 baby-step, you'll say to apply that offset in the config, but that can be filament specific. So you say, that's fine, keep it global, but when you use a differing filament, adjust the baby-step for that print. That only works for one print if you home between prints. So you say remove re-homing between prints. Well, I have a printer in development that may not be reliable, so I need to re-home between prints.

              You see the cycle here? It's like the Three Stooges file cabinet. It's a never ending cycle of work arounds. if the baby-step was part of the z-height register AND remembered to be applied to the offset of the beginning position of a print, all of these situations would be handled without workarounds. Sure, if it seems to be a permanent need, put it in the config. But I don't want to stop what I'm doing, update the config, reset the printer, lose my heat, and start over. Maybe baby-stepping can store to its own file so it persists between reboots.

              Like I said, the Live-Z Marlin feature just never fails, it never complicates things. Homing will always trigger at the same height, but the live-z offset both gets applied to the gcode for printing as well as effects the z-height register.

              dc42undefined 1 Reply Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator
                last edited by

                @gnydick said in Suggestion for change to implementation of baby-steps:

                reset the printer, lose my heat, and start over.

                You're gonna hate me saying this, but you don't have to reset the printer. You can send the updated G31 through the gcode console and it will take effect immediately.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @gnydick
                  last edited by dc42

                  @gnydick said in Suggestion for change to implementation of baby-steps:

                  @dc42 He is correct that the Z indicator doesn't show the actual position. If I baby step 100mm from position 5, it will always display 5.

                  I've said this before, but it doesn't seem to have weight with you, there are MANY more workflows than: click, print, finish.

                  Follow this...

                  0_1550348918887_23ace931-a29a-4818-83a4-03aa5fe25987-image.png

                  I expect you to say to add baby step reset to the stop.gcode or to the slicer, but then that would defeat the ability to re-use the value.

                  And, since baby-steps impact, but not stored value, are transient between homings, as they are just a value applied, with no impact on the actual z height measure, you have to also reapply them between prints if even you don't reset them.

                  If we see a pattern and that we always need -.15 baby-step, you'll say to apply that offset in the config, but that can be filament specific. So you say, that's fine, keep it global, but when you use a differing filament, adjust the baby-step for that print. That only works for one print if you home between prints. So you say remove re-homing between prints. Well, I have a printer in development that may not be reliable, so I need to re-home between prints.

                  You see the cycle here? It's like the Three Stooges file cabinet. It's a never ending cycle of work arounds. if the baby-step was part of the z-height register AND remembered to be applied to the offset of the beginning position of a print, all of these situations would be handled without workarounds. Sure, if it seems to be a permanent need, put it in the config. But I don't want to stop what I'm doing, update the config, reset the printer, lose my heat, and start over. Maybe baby-stepping can store to its own file so it persists between reboots.

                  Like I said, the Live-Z Marlin feature just never fails, it never complicates things. Homing will always trigger at the same height, but the live-z offset both gets applied to the gcode for printing as well as effects the z-height register.

                  You seem to be saying that the baby stepping offset is somehow remembered over homing but not actually applied. I don't believe that is the case; but I'm willing to be persuaded if you can provide a sequence of GCode commands (+ manual checking of nozzle height if needed) to demonstrate it. The other possibility that occurs to me is that you are homing to max Z and your printer is gradually getting hotter and expanding, so that you need increasing amounts of negative babystepping to counter the expansion.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  gnydickundefined 1 Reply Last reply Reply Quote 1
                  • gnydickundefined
                    gnydick @dc42
                    last edited by

                    @dc42 Baby-stepping is remembered after homing. Here's the simple sequence...

                    G28 ; home
                    G1 X150 Y150 Z0 ; roughly middle of the bed with nozzle touching
                    M290 S5
                    G28 Z ; re-home Z
                    G1 Z0 ; bring back the bed to the nozzle
                    M290 R0 S0 ; ***ENJOY THE CRASH***
                    
                    dc42undefined 1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators @gnydick
                      last edited by dc42

                      @gnydick said in Suggestion for change to implementation of baby-steps:

                      @dc42 Baby-stepping is remembered after homing. Here's the simple sequence...

                      G28 ; home
                      G1 X150 Y150 Z0 ; roughly middle of the bed with nozzle touching
                      M290 S5
                      G28 Z ; re-home Z
                      G1 Z0 ; bring back the bed to the nozzle
                      M290 R0 S0 ; ***ENJOY THE CRASH***
                      

                      What should happen is that the G1 Z0 command should leave the head at 0 + 5mm = 5mm above the bed. Then M290 R0 S0 should lower the head to the bed. Is that not what happens? How are you homing Z?

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      deckingmanundefined gnydickundefined 2 Replies Last reply Reply Quote 0
                      • deckingmanundefined
                        deckingman @dc42
                        last edited by deckingman

                        @dc42

                        For info, I just tried this out on my machine. It seems to work as you say with one exception. When I input M290 S5, I only get an offset of 1mm. I'm guessing that there is a 1mm limit on baby stepping? If not, then something is amiss.

                        Anyway, here is what I got......

                        G28; home all - after which....
                        Measured nozzle height =10.00mm (as expected with the commands I use)
                        DWC shows Z= 10.00
                        Baby stepping offset shows 0 mm.

                        G1 Z0 - after which......
                        Measured nozzle height =0mm
                        DWC shows Z= 0.00
                        Baby stepping offset shows 0 mm.

                        M290 S5 - after which....
                        Measured nozzle height =1.0mm
                        DWC shows Z= 0.00
                        Baby stepping offset shows 1 mm.

                        G28 Z - after which
                        Measured nozzle height =10.0mm
                        DWC shows Z= 9.00
                        Baby stepping offset shows 1 mm.

                        G1 Z0 - after which
                        Measured nozzle height =1.0mm
                        DWC shows Z= 0.00
                        Baby stepping offset shows 1 mm.

                        M290 R0 S0 - after which
                        Measured nozzle height =0.0mm
                        DWC shows Z= 0.00
                        Baby stepping offset shows 0 mm.

                        HTH

                        Edit. This is just for your info - I don't use baby stepping myself but I had a few minutes to spare so ran those tests.

                        Ian
                        https://somei3deas.wordpress.com/
                        https://www.youtube.com/@deckingman

                        1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators
                          last edited by

                          @deckingman said in Suggestion for change to implementation of baby-steps:

                          For info, I just tried this out on my machine. It seems to work as you say with one exception. When I input M290 S5, I only get an offset of 1mm. I'm guessing that there is a 1mm limit on baby stepping?

                          Thanks for running this test. There is indeed a limit of 1mm in any babystepping command, unless you use the R0 parameter to specify an absolute babystepping offset.

                          Do you home Z using a homing switch or a Z probe? It might make a difference.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          deckingmanundefined 1 Reply Last reply Reply Quote 0
                          • deckingmanundefined
                            deckingman @dc42
                            last edited by deckingman

                            @dc42 said in Suggestion for change to implementation of baby-steps:

                            Do you home Z using a homing switch or a Z probe? It might make a difference.

                            That depends on your definition. Essentially it's a switch connected to the nozzle mount which can move in Z, so the nozzle is the probe. But because the switch has an LED in series, I have to use it as an analogue switch. I get a reading of about 524 when it isn't triggered and 1000 when it is.

                            Here is relevant line from my config.g
                            G31 P700 X0 Y0 Z-0.4

                            Edit. Ohh and M558 P1 X0 Y0 Z1 F180 T6000 I0 (so yes, a P1 type probe).

                            Ian
                            https://somei3deas.wordpress.com/
                            https://www.youtube.com/@deckingman

                            1 Reply Last reply Reply Quote 0
                            • gnydickundefined
                              gnydick @dc42
                              last edited by gnydick

                              @dc42

                              conditions here are that this is a moving bed with a switch at Z-max.

                              That's not happening at all. When you home, the firmware automatically sets the Z position to the max. If baby-stepping is still on, your bed will indeed be at the correct max position. If you then G1 Z0, you will indeed position the bed at Z0. Then you reset baby-steps, and the bed tries to move opposite to the baby-steps. If it was positive baby-steps, the bed will crash into the nozzle. If it was negative baby-steps, the bed will move away from the nozzle.

                              dc42undefined 1 Reply Last reply Reply Quote 0
                              • deckingmanundefined
                                deckingman
                                last edited by

                                Just trying to get my head around this but wondering if you home to Z max, then do M290 S5, the bed would be constrained by the axis limit as defined in M208 which would prevent it from actually moving any further? But the baby-stepping offset might behave as if the bed had moved?

                                So maybe the problem exists only if you home to Z max?

                                Ian
                                https://somei3deas.wordpress.com/
                                https://www.youtube.com/@deckingman

                                1 Reply Last reply Reply Quote 0
                                • dc42undefined
                                  dc42 administrators @gnydick
                                  last edited by

                                  @gnydick said in Suggestion for change to implementation of baby-steps:

                                  @dc42

                                  conditions here are that this is a moving bed with a switch at Z-max.

                                  That's not happening at all. When you home, the firmware automatically sets the Z position to the max. If baby-stepping is still on, your bed will indeed be at the correct max position. If you then G1 Z0, you will indeed position the bed at Z0. Then you reset baby-steps, and the bed tries to move opposite to the baby-steps. If it was positive baby-steps, the bed will crash into the nozzle. If it was negative baby-steps, the bed will move away from the nozzle.

                                  Please share your homing files.

                                  Duet WiFi hardware designer and firmware engineer
                                  Please do not ask me for Duet support via PM or email, use the forum
                                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                                  gnydickundefined 1 Reply Last reply Reply Quote 0
                                  • gnydickundefined
                                    gnydick @dc42
                                    last edited by

                                    @dc42

                                    homex

                                    ; homex.g
                                    ; called to home the X axis
                                    ;
                                    ; generated by RepRapFirmware Configuration Tool v2 on Fri Feb 08 2019 11:10:07 GMT-0800 (Pacific Standard Time)
                                    G91              ; relative positioning
                                    G1 Y50 S1 ; avoid pulley in corner
                                    ;G1 Z-5 F6000 S2   ; lift Z relative to current position
                                    G1 S1 X293 F1800 ; move quickly to X axis endstop and stop there (first pass)
                                    G1 X-5 F6000     ; go back a few mm
                                    G1 S1 X293 F360  ; move slowly to X axis endstop once more (second pass)
                                    ;G1 Z5 F6000 S2  ; lower Z again
                                    G90              ; absolute positioning
                                    G92 X275
                                    

                                    homey

                                    M913 X40 Y40 ; reduce current
                                    ; generated by RepRapFirmware Configuration Tool v2 on Fri Feb 08 2019 11:05:47 GMT-0800 (Pacific Standard Time)
                                    G91              ; relative positioning
                                    ;G1 Z-5 F6000 S2   ; lift Z relative to current position
                                    G1 S1 Y365 F1800 ; move quickly to Y axis endstop and stop there (first pass)
                                    G1 Y-5 F6000     ; go back a few mm
                                    G1 S1 Y365 F360  ; move slowly to Y axis endstop once more (second pass)
                                    ;G1 Z5 F6000 S2  ; lower Z again
                                    G90              ; absolute positioning
                                    M913 X100 Y100 ; restore current
                                    

                                    homez

                                    G91
                                    G1 Z400  S1 F1500
                                    G1 Z-5 
                                    G1 Z10 S1 F100
                                    G90
                                    
                                    dc42undefined 1 Reply Last reply Reply Quote 0
                                    • dc42undefined
                                      dc42 administrators @gnydick
                                      last edited by dc42

                                      @gnydick, thanks. I've just tested homing to max Z with 5mm of baby stepping applied. Specifically, I did this (from bottom to top):

                                      20/03/2019, 15:36:50 M114
                                      X:0.000 Y:0.000 Z:195.000 E0:0.0 E1:0.0 E2:0.0 E3:0.0 E4:0.0 E5:0.0 E6:0.0 Count 0 0 40000 Machine 0.000 0.000 200.000
                                      20/03/2019, 15:35:28 G1 S1 Z400
                                      20/03/2019, 15:35:13 G91
                                      20/03/2019, 15:35:05 M208 Z200
                                      20/03/2019, 15:34:34 M574 Z2 S1
                                      20/03/2019, 15:34:14 M290
                                      Baby stepping offset is 5.000mm
                                      20/03/2019, 15:34:12 M290 Z1
                                      20/03/2019, 15:34:12 M290 Z1
                                      20/03/2019, 15:34:11 M290 Z1
                                      20/03/2019, 15:34:10 M290 Z1
                                      20/03/2019, 15:34:07 M290 Z1
                                      20/03/2019, 15:33:51 G92 X0 Y0

                                      So I applied +5mm of baby stepping, then I homed to max Z, which I had set to 200 in M208. After this the Z coordinate reported by both DWC and M114 was 195, as expected (i.e. user position +195, plus 5mm baby stepping, gives a machine position of +200).

                                      All this is exactly as expected. When I originally implemented baby stepping, I reset it to zero when you homed Z. but at the request of several users, I changed it to persist across homing. It is still reset to zero at power up.

                                      If you want to reset baby stepping during homing, or at the end of each print, you can do that by adding command M290 R0 Z0 in one or more of homez.g, homeall.g, stop.g and cancel.g.

                                      You might with to do a similar test to mine, i.e. apply +5mm bay stepping, then home Z to max. You said that you have Z max set to 300mm, so you should find the that displayed Z coordinate after homing Z is 295. If you then command the nozzle to Z0, it should be 5mm above the bed.

                                      Duet WiFi hardware designer and firmware engineer
                                      Please do not ask me for Duet support via PM or email, use the forum
                                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                                      gnydickundefined 1 Reply Last reply Reply Quote 0
                                      • gnydickundefined
                                        gnydick @dc42
                                        last edited by gnydick

                                        @dc42 i see what you're saying. I just did that little experiment right now, but in practice it hasn't worked that way. I don't know if having printed changes the internal flow somehow.

                                        1 Reply Last reply Reply Quote 0
                                        • dc42undefined
                                          dc42 administrators
                                          last edited by dc42

                                          Having printed should not change anything, assuming that the print file didn't have any M290 commands in it.

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                                          gnydickundefined 1 Reply Last reply Reply Quote 0
                                          • gnydickundefined
                                            gnydick @dc42
                                            last edited by

                                            @dc42 I did some experimenting, and it looks like it depends on whether you baby step + or -. If you baby step - then the homing routine breaks like I explained.

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