Homing and Axis issues
-
Hi all,
Im in the process of of upgrading my CNC (workbee) and have experienced an issue when i have moved the locations of my endstops. They are now situated bottom left of the machine, previously top right. I have x and y homing to bottom left but the machine sees them as at axis max. When i move the machine after homing im required to use negative values. if i reverse the motors to give positive values the machine homes away from the endstops, how can i fix this?
M574 X0 P"xstop" ; Set active high X endstop
M574 Y0 P"ystop" ; Set active high Y endstop
M574 Z1 P"zstop" ; Set active high Z endstopM208 X0 Y0 Z0 S1 ; Set axis minima
M208 X740 Y775 Z125 ; Set axis maximaM569 P0 S0 ; Drive 0 goes forwards
M569 P1 S0 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S0 ; Drive 3 goes forwardsHOMEALL.G
G91 ; relative positioning
G21 ; Set units to mm
G1 H1 Z{move.axes[2].max2} F900 ; move quickly to Z axis endstop and stop there (first pass)
G1 H1 X{move.axes[0].max2} F2400 ; move quickly to X axis endstops and stop there (first pass)
G1 H1 Y{move.axes[1].max2} F2400 ; move quickly to Y axis endstops and stop there (first pass)
G92 X{move.axes[0].max} Y{move.axes[1].max} Z{move.axes[2].max} ; Set Home Position
G1 X-3 Y-3 Z-3 F2400 ; go back a few mm
G1 H1 X{move.axes[0].max2} F300 ; move slowly to X axis endstops once more (second pass)
G1 H1 Y{move.axes[1].max2} F300 ; move slowly to Y axis endstops once more (second pass)
G1 H1 Z{move.axes[2].max2} F300 ; move slowly to Z axis endstop once more (second pass)
G92 X{move.axes[0].max} Y{move.axes[1].max} Z{move.axes[2].max} ; Set Home Position
G90 ; absolute positioning -
@daniel-armstrong When I imagine bottom left, if I'm standing in front of the machine, I'm thinking of the X limit switch on my left, and the Y limit switch closest to me. If this is correct, then both X and Y are homing to the low side.
@daniel-armstrong said in Homing and Axis issues:
M574 X0 P"xstop" ; Set active high X endstop
M574 Y0 P"ystop" ; Set active high Y endstop
M574 Z1 P"zstop" ; Set active high Z endstopWhy
X0
andY0
above? If you intend to have them on the low side of each axis, it should beX1
andY1
.
https://docs.duet3d.com/User_manual/Reference/Gcodes/M574 . I would also recomend setting theS
flag as well (unsure if there is a default). Sounds like they should be:M574 X1 P"xstop" S1 ; X axis homes low side, active high M574 Y1 P"ystop" S1 ; Y axis homes low side, active high M574 Z1 P"zstop" S1 ; Z axis homes low side, active high
Unsure on Z, reused what you had.
What I'm imaging based on "bottom left", is this isn't correct, let me know!
If my thoughts above are correct, then in homeall.g you appear to be moving X and Y in the wrong direction. Again, check my notes above for Z. Some questions:
- I see move.axes[0].max2, move.axes[1].max2, move.axes[2].max2 ... is the max2 right? Later you use move.axes[0].max, but I'm not familiar with a max2 in the object model (I'm also not particularly well versed in CNC mode)
- You're using
H1
mode for your homing moves, which is good. I think then that the G92 command is redundant, asH1
is setting position to the limit defined in M208.