LR3 Dual Endstop - Change Y Homing Direction

I just finished building a LR3 with dual endstops with a SKR Pro. Everything works great except due to how the table is faced, and the orientation of the machine on it, I need to flip the Y Homing Direction.

My 0,0 is still in the bottom left corner of my table, I just need the Y dimension to home to max instead of min.

Going into the firmware config I tried simply updating

#define Y_HOME_DIR +1

However fliping the Y_HOME_DIR from -1 to +1 results in build errors

Marlin/src/module/endstops.h:90:39: error: 'Y_MAX' was not declared in this scope; did you mean 'Z_MAX'?

I tried messing around with random configuration to resolve this. I tried updating

    #define Y2_USE_ENDSTOP    _YMAX_  // Y2 endstop board plug. Don't forget to enable USE_*_PLUG.
    #define Y2_ENDSTOP_ADJUSTMENT  0  // Y2 offset relative to Y endstop

to directly referance the endstop Pin instead of the macro

    #define Y2_USE_ENDSTOP    PE10  // Y2 endstop board plug. Don't forget to enable USE_*_PLUG.
    #define Y2_ENDSTOP_ADJUSTMENT  0  // Y2 offset relative to Y endstop

This change resolved the error preventing the firmware from building but made the secondary Y motor not engage at all during Homing, although Y1 did attempt to Home toward Y_MAX

Any advise would be appreciated.

Hello and welcome!

Have you made sure that _YMAX_ is indeed defined?

I’m definitely not the expert on this, as the only things I know about it are that I was able to reverse the X axis homing direction in my successful efforts to flip X and Y with each other. The reversal part is described here:

LowRider 3 CNC - reversal of homing on short axis (for swapping X & Y axes) FOR PRINTED XZ PLATES (v1.3b)

Maybe… I am starting from the SKRProLR firmware build released on the github page. Stock everything works, it just homes toward the negative which I dont want. All the endstops register and report correctly.

Reverting to a clean unmodified firmware with the only change being the

#define Y_HOME_DIR +1

_YMAX_ is reporting as defined as 0x22 according to my IDE. Which is coming from \Marlin\src\core\macros.h

I don’t know if this helps, but in configuration.h there are these:

#define Y_BED_SIZE [value goes here]

#define Y_MAX_POS Y_BED_SIZE

I’m a bit confused about what you are trying to do here. Let me assume you want to home towards the origin (0,0) of your machine wherever that might be. If you need to flip the Y origin to the other end of the machine, use the default V1 firmware and flip a plug on both Y steppers. This will reverse the direction the steppers move, and this will flip your Y origin from one end of the table to the other. But there is a serious problem. If you flip just Y (no matter how you do it), your coordinated system will be wrong for any CAD/CAM software I’m aware of. Anything you cut will come out mirrored. You must flip both X and Y. Like the two Y steppers, you can reverse the origin for the X stepper by just flipping any one X stepper connection.

1 Like

I attached a picture to better show my problem. I do not want to move the corner of my 0,0.

My problem is that my endstops are facing the MAX side instead of the min, so they must home to max instead of min.

Your definition of the origin is wrong. The origin for this machine should be where you have the emergency shutoff switch in your picture. Just reverse any connection for both Y steppers, and the origin is flipped. If you attempt to leave the origin in the opposite corner, your milling will come out mirrored.

1 Like

Your 100% right, I was trying to force the origin to be in the wrong corner. It should be were the emergency button is. This problem was all in my head. I was confusing the sides.

2 Likes

I was thinking the same thing, but then I also thought about the fact that on a lot of LR3’s, the Z homes to Z max, but then I also thought that Z is not necessarily related to the whole XY coordinate system issue you raised. What you said makes sense to me, and yet I was hesitant to say it myself as I thought maybe someone knows something I don’t, like “setting the Y Max and homing to it, yet somehow also recognizing that’s Y= 2400 and we’ll still have 0,0 at the other end” or some such. But then I also thought, I would hate to home to Y= 2400 only to have to then jog all the way back to Y=0 to start a job!

Glad you have it sorted out! Only thing I would add, is that with the option of flipping which axis is X and which one is Y (swap with each other), combined with the option to reverse which side the (default) X axis homes to (see my offering on Printables for that) one has the power to set the 0,0 origin at any of the four corners of the table. I think without those added options, one has only the option to set the 0,0 origin at two out of the four corners of the table.

@robertbu to the rescue! :slight_smile:

1 Like

There is sort of an added wrinkle. Two corners have the right coordinate system, but, because of where the limit switches are designed to mount (by Ryan), really only one corner is possible. In order to use the second corner, the mounting of the limit switches would need to be reworked. But you could rotate the whole machine (would require moving the rail to the opposite side), to use the opposite corner.

That is what my Printables listing offers: a way to rework which side the default X homes to. Switching which end the default Y homes to is easy: just rotate the gantry and adjust wiring as needed.

For convenience if anyone is interested, here’s the link to that:

https://www.printables.com/model/229940-lowrider-3-cnc-reversal-of-homing-on-short-axis-fo

…And here is a related part that would come into play for those seeking to do the above, while also using printed XZ plates:

https://www.printables.com/model/230531-lowrider-3-cnc-reversal-of-homing-on-short-axis-fo

1 Like

That is an explicit choice. Positive Z still goes the same way (up). But we changed the home direction so you could still use the Z probe. You could change X and Y to home to max, but there is a lot more firmware config changes needed, because homing to max and dual endstops is weird.

1 Like