Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Home XY Using Stall Detection Offset

    Duet Hardware and wiring
    2
    5
    441
    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.
    • ctilley79
      ctilley79 last edited by

      I set up my Duet WiFi to home the X and Y axis using stall detection on my cartesian i3 style printer. My issue is when it homes, it assumes the end stop is in the X maximum position when in fact the X max position should be around -5mm off the end stop. The current behavior allows the nozzle to position itself off the printable surface. How do I set an offset? Additionally, is there a way to adjust the script so it homes off the minimum and not the maximum?

      ; homeall.g
      ; called to home all axes
      ;
      ; generated by RepRapFirmware Configuration Tool on Thu May 31 2018 21:39:25 GMT-0400 (EDT)
      M400                    ; make sure everything has stopped before we make changes
      M574 X2 Y2 S3           ; set endstops to use motor stall
      M913 X60 Y60   		; reduce motor current
      G91                     ; relative positioning
      G1 Z5 F6000 S2          ; lift Z relative to current position
      G1 S1 X270 Y220 F6000   ; move quickly to X and Y axis endstops and stop there (first pass)
      G1 X5 Y-5 F6000         ; go back a few mm
      M400  			; make sure everything has stopped before we make changes
      M913 X100 Y100          ; motor currents back to normal
      M574 X2 Y2 Z2 S1        ; Set End stops back to normal
      G1 Z5 F400 S2		; raise head 4mm to ensure it is above the Z probe trigger height
      G90 			; back to absolute mode
      G1 X100 Y100 S2  F6000	; put head over the centre of the bed, or wherever you want to probe
      G30 			; lower head, stop when probe triggered and set Z to trigger height
      
      1 Reply Last reply Reply Quote 0
      • ctilley79
        ctilley79 last edited by

        Ok i figured out how to switch the homing direction by modifying the M574 command. This also had the unintended result of improving the offset issue, however an offset is still required.

        M574 X1 Y1 S3    ;instead of X2 and Y2
        
        1 Reply Last reply Reply Quote 0
        • Phaedrux
          Phaedrux Moderator last edited by

          How do you have your axis minima and maxima set in your config.g? You can use a negative value to tell it that the endstop is beyond the 0 point. Does that make sense?

          Z-Bot CoreXY Build | Thingiverse Profile

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

            @phaedrux

            ; Axis Limits
            M208 X0 Y0 Z0 S1				; Set axis minima
            M208 X250 Y210 Z320 S0				; Set axis maxima
            

            That's what it is currently. So essentially, now that I've reversed the homing direction, but the endstop is -5mm below zero, my statement would then change to the following?

            ; Axis Limits
            M208 X-5 Y0 Z0 S1				; Set axis minima
            M208 X250 Y210 Z320 S0				; Set axis maxima
            
            1 Reply Last reply Reply Quote 0
            • Phaedrux
              Phaedrux Moderator last edited by

              Yes I believe that should do it.

              Z-Bot CoreXY Build | Thingiverse Profile

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