Home XY Using Stall Detection Offset
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
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
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?
; 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
Yes I believe that should do it.