Inverting Y direction swaps X and Y
-
Hi,
I did try to search for my issue with no luck, however I'm sure it was answered before...
I'm in the process of building a core xy printer with duet wifi2, rrf3.4.1. Everything is perfect however i did not notice my models are mirrored. I was printing a ton of benchy on other calibration files that are symmetric so I did not notice the issue.
I did figure out that indeed the Y should go away from me when I'm moving it to + direction which is not the case. Ok, no issue just change it to S1 from S0, endstop location to high and call it a day, right? I thought so...
So when I set M569 P1 S1 suddenly my X axis and Y axis swaps (when I move X, Y moves and vica versa). But if I set M569 P1 S0 my axes are OK. I cannot wrap my head around this, I just don't understand why it happens. I did not change the mapping.
Here is my before and after config:BEFORE:
; Drives M569 P0 S0 ; X drive 0 goes forwards M569 P1 S0 ; Y drive 1 goes forwards M569 P2 S0 ; Z1 drive 2 goes forwards M569 P3 S0 ; E0 drive 1 goes backwards M569 P4 S0 ; Z1 drive 2 goes forwards M584 X0 Y1 Z2:4 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation M92 X204.0816 Y204.0816 Z1612.9032 E690 ; Set steps per mm for each axes M566 X600 Y600 Z24 E300 ; Set maximum instantaneous speed changes (Jerk) (mm/min) M203 X20000 Y20000 Z600 E7200 ; Set maximum speeds (mm/min) M201 X3000 Y3000 Z100 E3000 ; Set accelerations (mm/s^2) M906 X1600 Y1600 Z1600 E850 I30 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X-171 Y-182 Z0 S1 ; set axis minima M208 X175 Y175 Z300 S0 ; set axis maxima ; Endstops M574 X1 S1 P"xstop" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop M574 Y1 S1 P"ystop" ; configure switch-type (e.g. microswitch) endstop for high end on Y via pin ystop M574 Z1 S2 ; configure Z-probe endstop for low end on Z M591 D0 P1 C"zstop" S1 ; set filament sensor switch for extruder 0
AFTER:
; Drives M569 P0 S0 ; X drive 0 goes forwards M569 P1 S1 ; Y drive 1 goes backwards M569 P2 S0 ; Z1 drive 2 goes forwards M569 P3 S0 ; E0 drive 1 goes backwards M569 P4 S0 ; Z1 drive 2 goes forwards M584 X0 Y1 Z2:4 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation M92 X204.0816 Y204.0816 Z1612.9032 E690 ; Set steps per mm for each axes M566 X600 Y600 Z24 E300 ; Set maximum instantaneous speed changes (Jerk) (mm/min) M203 X20000 Y20000 Z600 E7200 ; Set maximum speeds (mm/min) M201 X3000 Y3000 Z100 E3000 ; Set accelerations (mm/s^2) M906 X1600 Y1600 Z1600 E850 I30 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X-171 Y-175 Z0 S1 ; set axis minima M208 X175 Y182 Z300 S0 ; set axis maxima ; Endstops M574 X1 S1 P"xstop" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop M574 Y2 S1 P"ystop" ; configure switch-type (e.g. microswitch) endstop for high end on Y via pin ystop M574 Z1 S2 ; configure Z-probe endstop for low end on Z M591 D0 P1 C"zstop" S1 ; set filament sensor switch for extruder 0
So what is happening here?
-
@daninet that is fundamentally how a corexy mechanism works. Both motors move in a pure x or pure y movement. You have just swapped which way one of those motors moves, not which way the gantry moves.
It can take a bit of getting you're head around to get the right combination. The CoreXY guide explains it pretty well, particularly the section on testing motor movements
https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_coreXY
Though I'll admit I just did mine by trial and error... -
@engikeneer thanks, now i understand the issue but still don't have the solution
So when I go the original way:
M569 P0 S0
M569 P1 S0
+X moves to the right -OK
+Y moves forward - not OKM569 P0 S0
M569 P1 S1
axes are invertedM569 P0 S1
M569 P1 S1
+X moves to the left - not OK
+Y moves backwards - OKM569 P0 S1
M569 P1 S0
axes are invertedso... Do i need to invert the wiring in one of the motors?
-
@daninet no, you need to either swap the X and Y motor connections to the Duet, or swap X and Y driver numbers in the M584 command.
-
@dc42 Thank you, I had to swap the motor connectors.
-
-
-
The X,Y drivers should actually be called A,B, to avoid confusion with Cartesian kinematic.