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

    Easier way to test if homed?

    Scheduled Pinned Locked Moved
    Gcode meta commands
    8
    29
    1.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 @theolodian
      last edited by dc42

      @theolodian said in Easier way to test if homed?:

      @stephen6309 I was hoping that after the first G28 everything else would pass the test?

      Yes, that should be the case.

      Here's another way (not tested!):

      var allHomed=true
      while iterations < #move.axes & move.axes[iterations].visible
        if !move.axes[iterations].homed
          set var.allHomed=false
          break
      if !var.allHomed
        G28
      

      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

      Stephen6309undefined OwenDundefined 2 Replies Last reply Reply Quote 1
      • Stephen6309undefined
        Stephen6309 @theolodian
        last edited by

        @theolodian You're right, I didn't think it all the way through. My addition would make it home each one at a time.

        1 Reply Last reply Reply Quote 1
        • Stephen6309undefined
          Stephen6309 @dc42
          last edited by Stephen6309

          @dc42 Doesn't work. Printer not homed, run macro, allHome is set to false, but it's true after exiting the loop. 3.4.0.rc1

          The allHomed needs to be changed to var.allHomed in line 4 and 6, or you get an error.

          Change line 4 to G28, remove 1, 6 and 7, and it works.

          zaptaundefined dc42undefined 2 Replies Last reply Reply Quote 0
          • zaptaundefined
            zapta @Stephen6309
            last edited by zapta

            @stephen6309 said in Easier way to test if homed?:

            The allHomed needs to be changed to var.allHomed in line 4 and 6, or you get an error.

            Or just drop allHome all together?

            while iterations < #move.axes & move.axes[iterations].visible
              if !move.axes[iterations].homed
                G28
                break
            
            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @Stephen6309
              last edited by

              @stephen6309 said in Easier way to test if homed?:

              @dc42 Doesn't work. Printer not homed, run macro, allHome is set to false, but it's true after exiting the loop. 3.4.0.rc1

              The allHomed needs to be changed to var.allHomed in line 4 and 6, or you get an error.

              Change line 4 to G28, remove 1, 6 and 7, and it works.

              Thanks, I have made some corrections to that post.

              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
              • OwenDundefined
                OwenD @dc42
                last edited by OwenD

                @dc42
                Out of curiosity, what are the rules with regards to hiding axes?
                Your macro would break out of the loop upon the first hidden axis (without necessarily having homed)
                So presumably if you had axes 0..12, you can't hide say 6 & 7 and leave 8 through 12 visible?
                Or should the macro loop contain something like

                if !move.axes[iterations].visible
                     continue
                

                prior to G28?

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

                  @owend the M584 command allows you to make the first P axes visible and hide all higher numbered axes.

                  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

                  theolodianundefined 1 Reply Last reply Reply Quote 0
                  • theolodianundefined
                    theolodian @dc42
                    last edited by

                    @dc42 said in Easier way to test if homed?:

                    @owend the M584 command allows you to make the first P axes visible and hide all higher numbered axes.

                    The inference being that if you have hidden axes then you probably don't care to home them, say extruders, etc.? Thanks.

                    zaptaundefined OwenDundefined 2 Replies Last reply Reply Quote 0
                    • zaptaundefined
                      zapta @theolodian
                      last edited by zapta

                      @theolodian said in Easier way to test if homed?:

                      The inference being that if you have hidden axes then you probably don't care to home them, say extruders, etc.? Thanks.

                      When I open the object model in DWC, it shows in the move section only x,y,z. Is E is also there in the move section of the object model but is hidden by DWC?

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

                        @zapta the axes are described in move.axes and the extruders in move.extruders.

                        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
                        • OwenDundefined
                          OwenD @theolodian
                          last edited by OwenD

                          @theolodian said in Easier way to test if homed?:

                          @dc42 said in Easier way to test if homed?:

                          @owend the M584 command allows you to make the first P axes visible and hide all higher numbered axes.

                          The inference being that if you have hidden axes then you probably don't care to home them, say extruders, etc.? Thanks.

                          Well not extruders, but you may have defined axes to allow you to perform certain tasks at startup which are then hidden during normal running.
                          My question was just whether those hidden axes numbers could fall in the middle of a range.
                          Since it doesn't appear that this is possible, it is safe to cease testing axes for their homed state once a hidden axes is found in the array.

                          1 Reply Last reply Reply Quote 1
                          • theolodianundefined
                            theolodian @OwenD
                            last edited by theolodian

                            @owend Ugh, different problem. Homing always comes back as failed when using these lower case letters for axes. 🙄

                            It does work fine if everything is already homed.

                            ; If the bed hasn't been homed, home it
                            ; Iterative loop across all defined move axes
                            while iterations < #move.axes
                            	if !move.axes[iterations].homed
                            			G28
                            			if result != 0
                            				abort "Homing failed"
                            			break
                            
                            OwenDundefined 1 Reply Last reply Reply Quote 0
                            • OwenDundefined
                              OwenD @theolodian
                              last edited by

                              @theolodian
                              I don't know why the axis letters would matter.
                              Are any axes hidden?
                              May be a question for @dc42

                              theolodianundefined 1 Reply Last reply Reply Quote 0
                              • theolodianundefined
                                theolodian @OwenD
                                last edited by

                                @owend It has never worked correctly, there are still a variety of issues with using lower case letters for axes. Thanks.

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

                                  @theolodian said in Easier way to test if homed?:

                                  @owend It has never worked correctly, there are still a variety of issues with using lower case letters for axes. Thanks.

                                  If you don't tell us what these issues are, we can't fix them.

                                  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

                                  theolodianundefined 1 Reply Last reply Reply Quote 0
                                  • zaptaundefined
                                    zapta @theolodian
                                    last edited by

                                    @theolodian, are you referring to the various scripts here that test for homing? The all seem to use axis indexes rather than axis letters.

                                    theolodianundefined 1 Reply Last reply Reply Quote 0
                                    • theolodianundefined
                                      theolodian @zapta
                                      last edited by

                                      @zapta said in Easier way to test if homed?:

                                      @theolodian, are you referring to the various scripts here that test for homing? The all seem to use axis indexes rather than axis letters.

                                      No, I am using lower case axis letters and homing always returns errors even though it works.

                                      1 Reply Last reply Reply Quote 0
                                      • theolodianundefined
                                        theolodian @dc42
                                        last edited by

                                        @dc42 Are lower case axis letters supposed to work in SBC mode now? Should I try it again? We have just been using standalone mode.

                                        chrishammundefined 1 Reply Last reply Reply Quote 0
                                        • chrishammundefined
                                          chrishamm administrators @theolodian
                                          last edited by

                                          @theolodian Lowercase letters are supported in the latest RC.

                                          Duet software engineer

                                          theolodianundefined 1 Reply Last reply Reply Quote 0
                                          • theolodianundefined
                                            theolodian @chrishamm
                                            last edited by theolodian

                                            @chrishamm I was going to say no, but I rebooted everything one more time to be sure - and yes RC2 seems to work in SBC mode! 😮 👍

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