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

    Z Maximum and Z Position and Homing

    Scheduled Pinned Locked Moved
    General Discussion
    5
    20
    837
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by

      The M291 commands are message boxes. Some have a simple timer and show info, others are blocking and have an OK/Cancel button, or gives you a jog dialog to move the Z axis until it just touches the bed.

      You don't need a probe because you are manually moving the nozzle to touch the bed so it knows where Z0 is. Then it does a special homing move to the Z max endstop to get the exact height that it triggers at and then saves that value to config-override.g which gets loaded again at startup and will have an M208 command with the measured Z height.

      Z-Bot CoreXY Build | Thingiverse Profile

      gbartschundefined 1 Reply Last reply Reply Quote 0
      • gbartschundefined
        gbartsch @Phaedrux
        last edited by

        @Phaedrux Oh my! This is magic. I'll do this right away. Thanks for explaining.

        So I can leave my Z maximum setting in config.g?

        Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

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

          @gbartsch said in Z Maximum and Z Position and Homing:

          So I can leave my Z maximum setting in config.g?

          Yes, it doesn't need to change.

          You would need M501 at the end of config.g to load config-override.g but that're probably already there if you've PID tuned your heaters and used M500 to save them.

          You can then check the config-override.g file to see what it's saved.

          Take care when running this macro. Perhaps it would be wise to reduce motor currents first, just in case. You could add M915 X50 Y50 Z50 after the G28 command to reduce motor currents by 50% and then add M915 X100 Y100 Z100 at the end to return them to normal.

          Z-Bot CoreXY Build | Thingiverse Profile

          gbartschundefined 3 Replies Last reply Reply Quote 0
          • gbartschundefined
            gbartsch @Phaedrux
            last edited by

            @Phaedrux said in Z Maximum and Z Position and Homing:

            You would need M501 at the end of config.g to load config-override.g but that're probably already there if you've PID tuned your heaters and used M500 to save them.

            Thanks. Yes M501 is there; I've run the PID tuning and values were written to config-override.g so everything is working. I'd never used it before the firmware upgrade and it's great.

            Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

            1 Reply Last reply Reply Quote 0
            • gbartschundefined
              gbartsch @Phaedrux
              last edited by

              @Phaedrux said in Z Maximum and Z Position and Homing:

              Take care when running this macro. Perhaps it would be wise to reduce motor currents first, just in case. You could add M915 X50 Y50 Z50 after the G28 command to reduce motor currents by 50% and then add M915 X100 Y100 Z100 at the end to return them to normal.

              Does this look OK?

              ; Automates measuring the Zmax height for mechanical endstop at ~214mm
              ;
              M291 P"This will set Z0 and calibrate Zmax height" R"Proceed?" S3
              M291 P"Homing all axis" T5
              G28			                     ; Home all
              G90			                     ; Absolute positioning
              
              M915 X50 Y50 Z50
              
              G1 X107 Y107 F6000
              M291 P"Adjust nozzle height until it's touching bed" Z1 S3
              G92 Z0 		                   	; set Z0
              M291 P"Z will now move to max and save the height" S3
              G1 H3 Z300 F600
              M500                            ; save m208 value for z axis to config override
              
              M915 X100 Y100 Z100
              

              Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

              1 Reply Last reply Reply Quote 0
              • gbartschundefined
                gbartsch @Phaedrux
                last edited by

                @Phaedrux said in Z Maximum and Z Position and Homing:

                Take care when running this macro.

                So as not to smash the nozzle into the bed?

                Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

                1 Reply Last reply Reply Quote 0
                • gbartschundefined
                  gbartsch
                  last edited by

                  Everything seemed to run perfectly till after the X axis moved to the top and touched the limit switch and an error message popped up saying the process took too long and to see the message in the console:

                  2023-02-04_16h19_58.png

                  Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

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

                    😑

                    I've given you the wrong command for motor current reduction. it should be M913 not M915

                    Z-Bot CoreXY Build | Thingiverse Profile

                    gbartschundefined 1 Reply Last reply Reply Quote 0
                    • gbartschundefined
                      gbartsch @Phaedrux
                      last edited by

                      @Phaedrux No worries! Thank you.

                      Actually the value was written to config-override.g and is, I believe, working.

                      Interestingly the macro says my Z maximum is ~0.25mm more than the Z maximum I've been using so without adjusting my slicer Z Offset the first layer was too squished. This could be due to how I ran the test.

                      I measured a piece of thick-ish paper that was on hand and placed it under the nozzle and dropped the nozzle till I could slide the paper out without too much trouble. Then I dropped the nozzle the thickness of the paper before putting the axis back to the top.

                      I'll run the macro again.

                      Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

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

                        @gbartsch said in Z Maximum and Z Position and Homing:

                        slicer Z Offset

                        With an accurate measurement of the Z0 position you shouldn't need any slicer offset.

                        Which reminds me, that macro should be run at print temps on nozzle and bed to account for thermal expansion.

                        Z-Bot CoreXY Build | Thingiverse Profile

                        gbartschundefined 1 Reply Last reply Reply Quote 0
                        • gbartschundefined
                          gbartsch @Phaedrux
                          last edited by

                          @Phaedrux said in Z Maximum and Z Position and Homing:

                          With an accurate measurement of the Z0 position you shouldn't need any slicer offset.

                          The smallest moves the macro makes are 0.05mm (I'd like to know how to adjust that value) and I don't find 0.05mm fine enough to get a perfect first layer; particularly when printing tiny parts with very little contact area to the bed.

                          My Z leadscrews have an 8mm pitch but even with them 16x micro-stepping gives theoretical Z resolution of 0.02mm. I'm not sure what actual resolution the machine is capable of but I adjust my Z offset in 0.02mm amounts and it makes changes that give me very good first layer control.

                          Maybe I'm missing something with the macro? If I could jog the X axis down by 0.02mm it would be perfect. To avoid trying to see the nozzle touch the bed I'd put a 1mm thick steel ruler under the nozzle and jog down till I could feel the ruler just start to drag on the nozzle and then pull it out. Then I'd lower the nozzle 1mm and then move the axis to the top.

                          That is a really cool macro.

                          Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

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

                            You could manually send the key commands from the macro to do the measuring portion. That way you can position the Z axis however you want.

                            Start by homing, then jog Z down to touch the bed however you need to get it where you want it. Then send G92 Z0 to set Z0. Then send G1 H3 Z300 F600 to measure the distance between Z0 and the Zmax endstop trigger. M500 to save.

                            Z-Bot CoreXY Build | Thingiverse Profile

                            gbartschundefined 1 Reply Last reply Reply Quote 0
                            • gbartschundefined
                              gbartsch @Phaedrux
                              last edited by

                              @Phaedrux said in Z Maximum and Z Position and Homing:

                              That way you can position the Z axis however you want.

                              Thank you! It's so cool what the Duet can do. I'll be trying that for sure at some point.

                              Right now I have my machine set so I don't need any Z offset. Because of my disability I sometimes have to do things in non-conventional ways because I can't do things the normal way. To get the Z height I adjust the Z offset in the slicer and when the print shows a perfect first layer (or skirt thickness) I adjust the machine Z maximum by that amount and the result is 'close enough'.

                              The above assumes the machine Z maximum is already close.

                              I also tram the build plate, when needed, by printing dots in the center and corner of the bed and then adjust as needed. It's messy but at least I can do that without help.

                              Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

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

                                @gbartsch said in Z Maximum and Z Position and Homing:

                                To get the Z height I adjust the Z offset in the slicer and when the print shows a perfect first layer

                                Nothing wrong with that.

                                Z-Bot CoreXY Build | Thingiverse Profile

                                gbartschundefined 1 Reply Last reply Reply Quote 0
                                • gbartschundefined
                                  gbartsch @Phaedrux
                                  last edited by

                                  @Phaedrux said in Z Maximum and Z Position and Homing:

                                  Nothing wrong with that.

                                  😊

                                  Custom cartesian dinosaur machine; it's a tank but just works so I just keep tweaking it. / Duet Ethernet 1.02 or later / RepRapFirmware for Duet 2 WiFi/Ethernet: 3.4.5 / SuperSlicer

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