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

    Homeall.g fails when homing all axes

    Scheduled Pinned Locked Moved Unsolved
    General Discussion
    8
    53
    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.
    • developeralgo222undefined
      developeralgo222 @developeralgo222
      last edited by developeralgo222

      @developeralgo222
      i went back to try and individually home all Axes that have their end stops corrected i.e

      X-Axis ---- End stop works fine now and triggers correctly
      Y-Axis ---- End stop works fine now and triggers correctly
      W, A, B, C, D, k ---- End stop works fine now and triggers correctly

      Homing fails on all of them. e.g. homing X-axis, this is what i have in the file ( very simple, nothing complicated ). It completes the movements in homing X-axis fine with no issues but DWC reports that Homing X failed e.g

      ; Home X-Axis 
      G91                     ; relative positioning
      G1 H2 X0             ; set axes position explicitly to Zero i.e move X and Y-axis Minimum Homing endstop and stop there
      G1 H2 X40 F10000     ; move quickly to X and Y axis endstops and stop there (first pass)
      G1 H2 X-40  F10000   ; go back a few mm
      G1 H2 X0             ; move X and Y-axis Minimum Homing endstop and stop there (first pass)
      G90                  ; absolute positioning
      

      Homing_n_Endstops.png

      It affects me in that i can't use Input Shaping with Accelerometer from the DWC to help tune and optimize my PNP machine Speed and acceleration . Input Shaping from DWC is using HomeAll button . Not sure if its failing bacause of Z, U, V that have endstop issues

      Input_Shaping.png

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

        ; Home X-Axis 
        G91                     ; relative positioning
        G1 H2 X0             ; set axes position explicitly to Zero i.e move X and Y-axis Minimum Homing endstop and stop there
        G1 H2 X40 F10000     ; move quickly to X and Y axis endstops and stop there (first pass)
        G1 H2 X-40  F10000   ; go back a few mm
        G1 H2 X0             ; move X and Y-axis Minimum Homing endstop and stop there (first pass)
        G90                  ; absolute positioning
        

        G1 H2 doesn't do what you think it does here.

        G1 H2 X0 means to do a zero movement move regardless if the axis is homed or not. G1 H2 moves are meant to leat you move the axis away from an endstop slightly before a homing move, or to raise the z axis before making an X Y move to prevent scraping.

        An actual homing move is done with a G1 H1 movement which needs to be long enough to strike the endstop even from the farthest opposing position. It also must be in the direction of the endstop.

        Z-Bot CoreXY Build | Thingiverse Profile

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

          @developeralgo222

          You are using H2 instead of H1.

          You posted that the X endstop is at the low end.

          I don't know how long the X axis is but you need something like...

          G91
          G1 H1 X-999 F5000 ; use a value large enough to move the entire length of the X axis
          G1 X10
          G1 H1 X-15 F500
          

          ...then based on what the physical position is when stopped by the endstop being triggered

          G1 Xnnn  ; move to some known position on the axis - note this is a relative move still
          G92 Xppp ; set the X axis logical position to match the physical position
          

          Frederick

          Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

          developeralgo222undefined 1 Reply Last reply Reply Quote 0
          • developeralgo222undefined
            developeralgo222 @fcwilt
            last edited by

            @fcwilt
            X-axis = 340 mm and Y-axis = 447mm.

            I think i only have extra additional of -2.0516mm on X-axis on the low end and -4.0244mm on Y-axis

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

              @developeralgo222 said in Homeall.g fails when homing all axes:

              @fcwilt
              X-axis = 340 mm and Y-axis = 447mm.

              I think i only have extra additional of -2.0516mm on X-axis on the low end and -4.0244mm on Y-axis

              OK then your first G1 H1 move would be

              G1 H1 X-345 F5000
              

              You can pick a speed (the F parameter) that works best for you - it's not critical but you can go too fast.

              At what position does the X endstop trigger? Are you treating that as X=0?

              Frederick

              Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

              developeralgo222undefined 1 Reply Last reply Reply Quote 0
              • developeralgo222undefined
                developeralgo222 @fcwilt
                last edited by developeralgo222

                @fcwilt said in Homeall.g fails when homing all axes:

                At what position does the X endstop trigger? Are you treating that as X=0?

                Yes at X=0. Do i need to test this on the command console or just put them in a homing file and test on DWC ?

                something like this on homex.g ?

                G91
                G1 H1 X-345 F5000 ; use a value large enough to move the entire length of the X axis
                G1 X10
                G1 H1 X-15 F500
                G1 X0 
                G92 X0 
                G90
                
                fcwiltundefined 1 Reply Last reply Reply Quote 0
                • fcwiltundefined
                  fcwilt @developeralgo222
                  last edited by fcwilt

                  @developeralgo222 said in Homeall.g fails when homing all axes:

                  As I mentioned if the endstop triggers at the end of the axis travel and you are treating that as X=0 then you don't need the following:

                  G1 Xnnn
                  G92 Xppp
                  

                  They are ONLY needed when the endstop is not triggering at X=0

                  In your case this should work for you:

                  G91
                  G1 H1 X-345 F5000
                  G1 X10
                  G1 H1 X-15 F500
                  

                  Now if you have specified your X axis with M208 -170:170, meaning X=0 is at the center of the axis you could add the following:

                  G90
                  G1 X0 F5000
                  

                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                  developeralgo222undefined 1 Reply Last reply Reply Quote 0
                  • developeralgo222undefined
                    developeralgo222 @fcwilt
                    last edited by

                    @fcwilt said in Homeall.g fails when homing all axes:

                    Now if you have specified your X axis with M208 -170:170, meaning X=0 is at the center of the axis you could add the following:

                    i have M208 X0:340 Y0:447

                    developeralgo222undefined fcwiltundefined 2 Replies Last reply Reply Quote 0
                    • developeralgo222undefined
                      developeralgo222 @developeralgo222
                      last edited by

                      @developeralgo222

                      Attached is my config

                      config.g

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

                        @developeralgo222 said in Homeall.g fails when homing all axes:

                        i have M208 X0:340 Y0:447

                        That is fine - you don't have to have X=0 at the center of the bed. Some folks just prefer it that way - I am one of them.

                        Frederick

                        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                        developeralgo222undefined 1 Reply Last reply Reply Quote 0
                        • developeralgo222undefined
                          developeralgo222 @fcwilt
                          last edited by developeralgo222

                          @fcwilt
                          That worked for X &Y and Z , i am going through all the axes one-by-one following your insights .

                          How do you configure the endstops of a shared z-axis cam based

                          Nozzle_Pair_Shared_Z-axis.png

                          i have to configure endstops for 6-Nozzles ( 2 Nozzles share a single Z-axis based Stepper motor ) so that they trigger correctly

                          i.e 3 Stepper Motors for Z, U, V axis but each axis shared with 2 nozzles each with a Z-axis type.

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

                            @developeralgo222 said in Homeall.g fails when homing all axes:

                            How do you configure the endstops of a shared z-axis cam based

                            Nozzle_Pair_Shared_Z-axis.png

                            i have to configure endstops for 6-Nozzles ( 2 Nozzles share a single Z-axis based Stepper motor ) so that they trigger correctly

                            i.e 3 Stepper Motors for Z, U, V axis but each axis shared with 2 nozzles each with a Z-axis type.

                            That is not a setup I have seen or heard of.

                            Does the "Z stepper" turn the cam to raise/lower the nozzle?

                            Does each nozzle have it's own endstop sensor?

                            Frederick

                            Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                            developeralgo222undefined 1 Reply Last reply Reply Quote 0
                            • developeralgo222undefined
                              developeralgo222 @fcwilt
                              last edited by developeralgo222

                              @fcwilt said in Homeall.g fails when homing all axes:

                              Does each nozzle have it's own endstop sensor?

                              Yes, Each Nozzle has its own endstop . With CAM kind of shared axis when it moves down 1 nozzle the other stays at zero or is lifted back to zero point by the spring to where there is a stopper to prevent it from flying over.

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

                                @developeralgo222 said in Homeall.g fails when homing all axes:

                                Does each nozzle have it's own endstop sensor?

                                Yes, Each Nozzle has its own endstop . With CAM kind of shared axis when it moves down 1 nozzle the other stays at zero or is lifted back to zero point by the spring to where there is a stopper to prevent it from flying over.

                                OK.

                                Since you are using NPN sensors the outputs pull the inputs they are connected to to ground (GND)

                                I'm assuming only one of the sensors has the beam of light blocked when the nozzle is down.

                                If I am reading the spec sheet correctly the white wire is pulled to ground when the beam is blocked.

                                If so, you would want to connect both of the white wires to the Duet input and use the ! prefix character to treat the low input signal as active.

                                As before you would have a G1 H1 move in the direction of the sensor.

                                Are these nozzles simply up or down OR do they move over a range of vertical travel?

                                Frederick

                                Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                                developeralgo222undefined 1 Reply Last reply Reply Quote 0
                                • developeralgo222undefined
                                  developeralgo222 @fcwilt
                                  last edited by developeralgo222

                                  @fcwilt said in Homeall.g fails when homing all axes:

                                  Are these nozzles simply up or down OR do they move over a range of vertical travel?

                                  They move over a vertical range of travel actually from 0 to -/+ 70 before they trigger the endstop . all have a range of -90:90 but technically
                                  so
                                  (1) On Z-Axis Motor , Z1 has a move range from 0 to -90 and Z2 has a move range from 0 to +90. When one is down , then other is always at zero
                                  (2) On U-Axis Motor , Z3 has a move range from 0 to -90 and Z4 has a move range from 0 to +90. When one is down , then other is always at zero
                                  (3) On V-Axis Motor , Z5 has a move range from 0 to -90 and Z6 has a move range from 0 to +90. When one is down , then other is always at zero

                                  IMG_3501.jpg

                                  IMG_3500.jpg

                                  IMG_3502.jpg

                                  fcwiltundefined droftartsundefined 2 Replies Last reply Reply Quote 0
                                  • fcwiltundefined
                                    fcwilt @developeralgo222
                                    last edited by

                                    @developeralgo222

                                    Thanks, that makes things more clear.

                                    The homing code should be pretty much the same as before, though I don't actually know how the firmware handles two endstops.

                                    How do you convert stepper position to nozzle position?

                                    Frederick

                                    Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                                    developeralgo222undefined 1 Reply Last reply Reply Quote 0
                                    • developeralgo222undefined
                                      developeralgo222 @fcwilt
                                      last edited by developeralgo222

                                      @fcwilt said in Homeall.g fails when homing all axes:

                                      How do you convert stepper position to nozzle position?

                                      its just Z-axis as any other , no difference .The CAM on the motor just moves or rotates clockwise or counterclockwise to move the nozzles on the Z-based axes up or down

                                      1 Reply Last reply Reply Quote 0
                                      • droftartsundefined
                                        droftarts administrators @developeralgo222
                                        last edited by droftarts

                                        @developeralgo222 As each endstop is triggered at the end of movement for each nozzle, I would think you are best off redefining the endstop when a different tool is requested, followed by a move to trigger that endstop. eg something like

                                        ; home Z1
                                        M574 Z1 S1 P"1.io0.in"  ; configure active high endstop switch for low end on Z via pin 1.io0.in
                                        G91                     ; Use relative positioning
                                        G1 H1 Z-180             ; go to endstop
                                        G90                     ; Use absolute positioning
                                        
                                        ; home Z2
                                        M574 Z2 S1 P"1.io1.in"             ; configure active high endstop switch for High end on Z via pin 1.io1.in
                                        G91                     ; Use relative positioning
                                        G1 H1 Z180              ; go to endstop
                                        G90                     ; Use absolute positioning
                                        

                                        I'm not sure how this would interact with OpenPNP, though.

                                        Ian

                                        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                        developeralgo222undefined 2 Replies Last reply Reply Quote 0
                                        • developeralgo222undefined
                                          developeralgo222 @droftarts
                                          last edited by

                                          @droftarts said in Homeall.g fails when homing all axes:

                                          I'm not sure how this would interact with OpenPNP, though.

                                          this is where i am also having doubts how that would work with OpenPNP

                                          droftartsundefined T3P3Tonyundefined 2 Replies Last reply Reply Quote 0
                                          • droftartsundefined
                                            droftarts administrators @developeralgo222
                                            last edited by

                                            @developeralgo222 How does OpenPNP enable a tool? If it uses tool commands, eg T0, T1, T2 etc, then you can put the above code in the tpre#.g tool change macro. See https://docs.duet3d.com/en/User_manual/Tuning/Tool_changing

                                            Ian

                                            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

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