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

    Difference between G28 and M98"homeall.g"?

    Scheduled Pinned Locked Moved Solved
    General Discussion
    3
    20
    743
    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.
    • gloomyandyundefined
      gloomyandy @o_lampe
      last edited by

      @o_lampe One other thought adding a few M574 commands (with no parameters) which outputs what endstops are set, may provide more idea as to what is going on!

      1 Reply Last reply Reply Quote 1
      • fcwiltundefined
        fcwilt @o_lampe
        last edited by

        @o_lampe said in Difference between G28 and M98"homeall.g"?:

        Q: Is there a difference in sending G28 from the console or starting the homeall.g macro directly?

        One significant difference is that G28 marks the axis/axes as un-homed before executing the code associated with the given axis/axes.

        This can cause code that works with M98 to fail with G28 if the code is trying to move an un-homed axis.

        Frederick

        1 Reply Last reply Reply Quote 2
        • o_lampeundefined
          o_lampe @gloomyandy
          last edited by

          @gloomyandy said in Difference between G28 and M98"homeall.g"?:

          I'm not sure that what you are doing to clear an endstop is correct. It looks like:
          M574 U0

          Which sets the endstop for that axis to none, may be the correct way to do this.

          I think you are right, I'll test it first thing. I thought I had to free the formerly used pin.

          PS: do you know if someone published a mounting case (for 2020 extrusion) for the F407ZG? I couldn't find a drawing which shows the mounting hole pattern...

          o_lampeundefined gloomyandyundefined 2 Replies Last reply Reply Quote 0
          • o_lampeundefined
            o_lampe @o_lampe
            last edited by

            @o_lampe
            PSS: Where can I find more info on the "Z3" endstop, how to attach three switches and such?

            gloomyandyundefined 1 Reply Last reply Reply Quote 0
            • gloomyandyundefined
              gloomyandy @o_lampe
              last edited by

              @o_lampe Sorry no idea about a case (i just have mine on my test bench!), @jay_s_uk may have some suggestions.

              Freeing things in RRF is a bit messy. This example in the gcode listing:

              M574 Z0 P"nil" ; no Z endstop switch, free up Z endstop input
              

              seems to show that both the type 0 and nil pin are required, but looking at the code I'm not sure that is the case. I'd try just setting it to type 0 and see if that does what you want (I need to check again but I seem to remember that a P parameter may take it down a different code path!).

              1 Reply Last reply Reply Quote 0
              • gloomyandyundefined
                gloomyandy @o_lampe
                last edited by

                @o_lampe I didn't know there was a Z3 option, are you sure that is correct, there is the option to specify multiple endstops to match multiple Z motors via separate pins with something like:

                M574 Z1 S1 P"io2.in+io3.in" ; Z axis with two motors, individual min endstops, active high
                

                That is covered a little in the RRF GCode docs.

                o_lampeundefined 1 Reply Last reply Reply Quote 0
                • o_lampeundefined
                  o_lampe @gloomyandy
                  last edited by

                  @gloomyandy Hmm, there's Zmin, Zmax and Z3, maybe I have to use them all in the way you described.

                  gloomyandyundefined 1 Reply Last reply Reply Quote 0
                  • gloomyandyundefined
                    gloomyandy @o_lampe
                    last edited by

                    @o_lampe Where have you seen a reference to Z3? I don't see one in the gcode guide and the source code does not seem to have any idea of it, it only has...

                    	noEndStop = 0,
                    	lowEndStop = 1,
                    	highEndStop = 2,
                    
                    o_lampeundefined 1 Reply Last reply Reply Quote 0
                    • o_lampeundefined
                      o_lampe @gloomyandy
                      last edited by

                      @gloomyandy said in Difference between G28 and M98"homeall.g"?:

                      Where have you seen a reference to Z3?

                      That's weird,

                      • I saw it mentioned on mellow fly aliexpress page
                      • there's a Z3 socket onboard
                      • teamgloomys github page mentions it on the pin names page
                      Supports dual Z-axis printers and three Z-axis printers (the motherboard has a dedicated Z3 limit switch interface).
                      

                      z3-pinnames.jpg

                      1 Reply Last reply Reply Quote 0
                      • o_lampeundefined
                        o_lampe
                        last edited by

                        ...back to subject. I found out what caused the error message when calling G28 alone:

                        1. G28 automatically tries to home X,Y and Z even when homeZ is not mentioned in homeall.g.
                          I currently have no Z axis, so there's no endstop defined for Z...
                          I could probably delete or move homez.g or add M574 Z0 in config.g to supress the error message

                        2. deleting an endstop only works with e.g. M574 X0.
                          Adding P"nil" is wrong

                        o_lampeundefined fcwiltundefined 2 Replies Last reply Reply Quote 1
                        • o_lampeundefined
                          o_lampe @o_lampe
                          last edited by

                          @o_lampe said in Difference between G28 and M98"homeall.g"?:

                          I could probably delete or move homez.g or add M574 Z0 in config.g to supress the error message

                          removing/renaming homeZ only led to another error: can't find homeZ.g
                          So I wrote homeZ with these lines:

                          M574 Z0
                          G92 Z0
                          

                          and no error popped up 😁

                          Thanks all who tried to help 👍

                          1 Reply Last reply Reply Quote 1
                          • fcwiltundefined
                            fcwilt @o_lampe
                            last edited by fcwilt

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