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

    Babystepping by g-code macro?

    Scheduled Pinned Locked Moved
    General Discussion
    4
    11
    5.6k
    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
      last edited by

      I answered this yesterday or the day before in another thread, but as I can't find that thread I'll answer it again. If you only want to adjust the height while printing the first layer, and you always use the same first layer height, then you can do it. For example if the first layer height is 0.2mm and you want to drop the Z=0 plane by 0.05mm, just send G92 Z0.25. To raise the Z=0 plane by 0.05mm, send G92 Z0.15.

      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

      1 Reply Last reply Reply Quote 0
      • DjDemonDundefined
        DjDemonD
        last edited by

        Thanks David, this will work for me, I did see your reply yesterday in passing, but I couldn't find it either to have a proper look. I use the same layer height each time for any given nozzle so I'll try this. If I send this gcode whilst printing a brim/skirt I presume the firmware executes whatever gcodes are ahead of this in the buffer before this one, so the effect will take a few moves to become apparent?

        Simon. Precision Piezo Z-Probe Technology
        www.precisionpiezo.co.uk
        PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

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

          Yes, it will take a few moves before it executes, but in theory no more than 2 seconds worth of moves + 2 more moves.

          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

          1 Reply Last reply Reply Quote 0
          • botundefined
            bot
            last edited by

            If the last move in the lookahead queue is a z lift move, is there a danger that the g92 would cause a nozzle crash? I guess it would simply cause the nozzle to be printing much too high. No real danger. I shall use this next print! I've been cancelling and restarting prints forever, this will save time.

            *not actually a robot

            1 Reply Last reply Reply Quote 0
            • DjDemonDundefined
              DjDemonD
              last edited by

              So a calibration object (or small second object included in the slicer printed sequentially) for this approach would have lots of small lines. We can count how many times we send the adjustment while printing it then apply this with m206 afterwards.

              Simon. Precision Piezo Z-Probe Technology
              www.precisionpiezo.co.uk
              PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

              1 Reply Last reply Reply Quote 0
              • DjDemonDundefined
                DjDemonD
                last edited by

                Had no luck with this - head crashes - but I think it's because I've set a z-offset in slicer of -0.28mm so any attempt to move down crashes the nozzle. I'll try again later without the z-offset in slicer.

                Simon. Precision Piezo Z-Probe Technology
                www.precisionpiezo.co.uk
                PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

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

                  @bot:

                  If the last move in the lookahead queue is a z lift move, is there a danger that the g92 would cause a nozzle crash? I guess it would simply cause the nozzle to be printing much too high. No real danger. I shall use this next print! I've been cancelling and restarting prints forever, this will save time.

                  If you have lift Z on travel moves enabled in your slicer then there is a risk that the G92 command will be executed when the nozzle is at the lifted height. That would cause the print to continue with the nozzle much too high.

                  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

                  1 Reply Last reply Reply Quote 0
                  • DjDemonDundefined
                    DjDemonD
                    last edited by

                    So now this works for me I removed the slicer offset and remeasured the probe offset and entered it properly into the config.g.

                    Now using the G92 macros I can pseudo-babystep up/down as long as the first layer height is 0.4 in this case.

                    Thank you.

                    Simon. Precision Piezo Z-Probe Technology
                    www.precisionpiezo.co.uk
                    PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

                    1 Reply Last reply Reply Quote 0
                    • ScotYundefined
                      ScotY
                      last edited by

                      @DjDemonD:

                      So now this works for me I removed the slicer offset and remeasured the probe offset and entered it properly into the config.g.

                      Now using the G92 macros I can pseudo-babystep up/down as long as the first layer height is 0.4 in this case.

                      Thank you.

                      Hello Dj,
                      Can you explain how you implemented this? And why does the first layer have to be 0.4?
                      Thanks!

                      1 Reply Last reply Reply Quote 0
                      • DjDemonDundefined
                        DjDemonD
                        last edited by

                        So all you are doing is sending (during printing the first layer) a G92 command to change the absolute Z coordinate. So if you are printing a 0.4mm first layer and you send G92 Z0.425 you've just told the printer that the current level is not 0.4 anymore its 0.425mm. You haven't physically moved anything. It takes the printer a few seconds to get to this command as there is a buffer, it lowers the nozzle by 0.025 on the next gcode command because this next command will ask it to be at Z0.4 and it thinks its now at z0.425.

                        Likewise if you send G92 Z0.375 the printer thinks its too low and at the next line of gcode it raises the nozzle 0.025.

                        I created two macros one for each command, so I can press lower or raise from the paneldue screen, but you can do it from the web interface instead. Or if using a host like pronterface create some buttons with these commands.

                        If you want to print 0.3 first layers, your lower nozzle macro would be G92 Z0.325 and raise would be G92 Z0.275

                        There are three reasons why this is a functional workaround but not very satisfying are that its not instant, the firmware has to process the commands in the buffer before it changes z level, so its hard to see if you need to press it once, twice etc… If you press to lower 10 times you might get a head crash. (A good reason to use 0.025 rather than 0.05). The other reason is that if you're printing a cube the brim or whatever you print first won't have that many moves in it, therefore you don't get a lot of time to make the adjustment unless you set your print speed to 10% as you begin. Also you have to use the same first layer height each time, or your need two macros for each first layer height you routinely print with.

                        My solution to this to make an object, one layer thick, with lots of short zigzags or similar, you place it next to the object you're printing in your slicer, make sure you've set plenty of skirt and brim to give you extra moves in which to have time (and moves) enough to adjust the z height and then leave it to print the object.

                        Marlin's babystepping which I helped (a little) to test with them just sends extra step pulses to the z motor as you turn the encoder wheel and does not alter the coordinate system. So on the plus side its instant, you can set it very quickly and you can do it with any layer height and at any point during the print (though why you would want to do it at any other point than the first layer I could not imagine). They eventually implemented a readout on the lcd which summed the extra steps and divided them by your z steps/mm and which shows how much in millimeters you moved, so at the next print you could enter a z-offset either in firmware or slicer, so provided your printer's reproducibility is good the next print just starts at the optimised Z height.

                        I've actually given up using this as its now so well calibrated if I measure the nozzle to zprobe trigger point accurately, then calibrate the nozzle is 0.1mm above the bed everywhere and I can just print. Possibly adding an offset in slic3r for the next print if it was fractionally too squashed or too high.

                        Simon. Precision Piezo Z-Probe Technology
                        www.precisionpiezo.co.uk
                        PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

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