Y axis with multiple endstops and skew correction
-
I have a printer with a Y axis that has 2 independent motors, each with an endstop at the high end. The endstops aren't perfectly aligned and I want to apply an offset to the two sides when homing to make the x and y axis actually square. Is this the general approach that I want to take?
In config.g define addition axes to allow independent movement/homing of the two motors and apply the skew value to the axis maxima:
M584 ... Y0.6:0.5 ... U0.6 V0.5 M208 ... Y600 ... U600.x V600 ; The .x is the skew correction offset
and then to home Y I would do something like:
G91 G1 H1 Y+650 F1800 ; Coarsely home y to high end G1 H2 Y-5 F6000 ; Back off the endstops G1 H1 U+10 F360 ; Accurately home U (y left) G1 H1 V+10 F360 ; Accurately home V (y right) G90 ; To finish homing Y, move the two independent motors to the same position ; (they will currently be at different positions due to the skew offset) ; and then set Y to that position: G1 U599 V599 F12000 G92 Y599
-
Also, if anyone has done this themselves, are there any suggestions/tips/best practices to accurately measure the offset between the two endstops?
All I was coming up with was printing a large square, measuring it as best I can and then doing some math to get the skew angle and therefore the correction. And then obviously repeat until it seems close enough because all the measurements and printing itself are approximate...
-
Are the endstops on the low or high end of travel?
If you can't move the endstops or add a striker that could take up the gap between them, then you are correct, you would need to use the split axis approach to home them and apply an offset.
You can measure the distance to the endstop with a G1 homing move to get your offset.
First combine the two axis and have it home to the closest switch. Then split the axis and home to the farther switch with a G1 H4 move and compare the resulting positions to get the offset.
-
@crpalmer There is a feature request for offsetting one individual endstop when using dual endstops. https://github.com/Duet3D/RepRapFirmware/issues/627
Ian