Dual endstops for X and Y
I've seen reference to using dual endstops to drive each Z motor (on separate drivers of course) to their own endstop, to level out a long axis.
On an MPCNC (popular CNC project using RAMPS), I'm running X and Y with second motors on E0 and E1 using FEATURE_TWO_XSTEPPER and FEATURE_TWO_YSTEPPER, works great and happy to see this in the FW, looked for it in vain on Marlin (or at least not done as simply).
Is there a way to use 2 X and Y endstops like the Z to square off the unit? On longer runs it's not uncommon to see the carriages at each end find their way to being up to a couple centimeters out of alignment after some usage.
Comments
I'm comparing now dual motor configuration.h for X and for Y, I let U know in few minutes
Also do you have 2 endstops or one for x?
loaded in online configuration the working configuration.h, make changes to configure two motor on X axis, homing driving only X and not mirror to X2, same with movement over X from repetier host X move X2 not.
relevant diff changes after axis swapping working/not working
#define MIN_HARDWARE_ENDSTOP_X2 false/true
#define X2_MIN_PIN -1/ORIG_X_MAX_PIN
#define FEATURE_TWO_XSTEPPER 0/1
#define FEATURE_TWO_YSTEPPER 1/0
the changes seems are OK
#define MIN_HARDWARE_ENDSTOP_Y2 true (not swapped to false)
#define Y2_MIN_PIN ORIG_X_MAX_PIN (not swapped to -1)
Now I will try to edit by hand and test
The endstops working, also the home cycle is active; when I homing X I see x axis homing to endstop and start to wait forever for x2 endstop, when I manually move the x2 axes to endstop the x move to x_back_on_home and finish the homing.
So just the driver doesn't receive the pulses, like mirror function is ignored (all the test made without touching wires, just properly assigned axes/endstop to different physical axis, in both cases 2nd motor is connected to E1 out so no any change in configuration.h for this section)
I can't understand where I'm wrong
Yes off course two indipendent endstop; and everything working perfectly if I set in the configuration that this physical axis is the Y
1. DUAL_X_AXIS 0 right?
2. M119 returns signal for X2 correctly?
3. What happens if you try to move? Does the motor turn on so it is blocked or nothing?
4. What DRIVE_SYSTEM have you set. Each type has parts differently, so different parts to check here.
5. If ALWAYS_CHECK_EDSTOPS 0 does x2 move?
For all tests also try with MOVE_X_WHEN_HOMED 0 so it should also move if you did not home before to test that as well.
Hopefully that will show me the section where the error happens.
2. m119 return the correct status for x and x2
3. the x motor move the x2 motor not and it's locked so EN is ok, with m84 unlock
4. drive system 0
5. already set ALWAYS_CHECK_EDSTOPS 0
also MOVE_X_WHEN_HOMED 0
same configuration file with X2 endstop disabled work obviously no multi home
with this configuration work X2 motor move togheter with X but X2 endstop is disabled so multihoming is disabled
https://drive.google.com/open?id=0B1hn4VshjrDkNmcxN1NJWi1XXzQ
same file just enabled X2 endstop the x2 motor doesn't move
https://drive.google.com/open?id=0B1hn4VshjrDkLXNKR19nYUtlQXc
here the configuration with dual motor axis declared as X (not working)
https://drive.google.com/open?id=0B1hn4VshjrDkWTBocF9yVGJTZTA
and the working one with the same physical axis declared as Y
https://drive.google.com/open?id=0B1hn4VshjrDkR0txYWlHMUljTm8
#else // DUAL_X_AXIS
#if MULTI_XENDSTOP_HOMING
if(Printer::multiXHomeFlags & 1) {
WRITE(X_STEP_PIN, START_STEP_WITH_HIGH);
}
#if FEATURE_TWO_XSTEPPER
above is correct version, the error was that the last line was
#if FEATURE_TWO_ZSTEPPER
So change that line and it should work as expected. Have to add invert direction config before I can publish the update, which I will do soon. So do not forget to look for the extra options when I did.