MKS GEN L dual endstops

So I’ve been using the MKS GEN L board for a while now. I have decided to go with dual endstops, so i uploaded the the Ramps dual endstop FW onto my Gen L board, wired all the steppers separately and mounted and wired the endstops.

Results so far:

X moves fine.

Y moves fine

Z I can only get one side to work.

None of my endstops are working. I have them connected to (signal) and (-) in a NO configuration.


So I’m pretty sure my issue with the steppers is because the firmware is designed for the MPCNC which has 2 Y and 2 X axis and only one Z.

I know there are people that have done Dual endstops on the LR2, like this one

For the life of me I can’t upload the firmware he has linked.

Does anyone know what’s involved in changing Ryans dual endstop firmware for the LR2?

I have no idea why none of my endstops are working either.

Any help would be very appreciated


I’m assuming you have one Y motor? In configuration_adv.h, you need to disable dual Y and enable dual Z. I would expect with the stock mpcnc firmware that your second Z would move with Y.

On thr endstops, try M119 before you try homing. All the endstops should make sense to you before you try to home. Then home only one axis at a time. Y shouldn’t give you any trouble, since it’s single endstop. If you get the X and the X2 switched, then you’ll see one end crash into the switch and still go. The other end will stop short. If you’re careful, the X and Z motors plugged into E0 and E1 will be the ones associated with the X2 amd Z2 endstops.

Hey Jeffe,

I’ve got the LR2 so I have 2 Y steppers, 2 Z and 1 X as you know. As the firmware is written (or modified) for the MPCNC which has 2 X, 2 Y and 1 Z, it would need to be changed I’m guessing.

I’m thinking maybe hire someone to do it, as I don’t have that kind of knowledge

It’s just a couple of lines in configuration_adv.h, assuming you’re still homing to min.

I’m not trying to make it seem simpler than it is. It was an attempt to tell you “you can do it”.

I’m still homing to min. I would love to know what the 2 lines are that I need to change. As I said, I don’t know how to do it.


You need to remove the option of dual Y by adding “//” to the beginning of that line and you need to remove the “//” from the dual z option. You can turn other options on or off by using this throughout the configuration and adv files.

Looks alot easier than I imagined. Will give it a go today.

Thank you for your help

So I had a go and connected the board with the said changes as Jeffe said, and my steppers are now all moving in the correct direction and that’s awesome.

As for the endstops however, it’s all over the place, hardly anything works. First I’ll explain how I’ve connected them

X- = X axis

Y- = Y left

Z- = Z left

Y+ = Y right

Z+ = Z right


The results: I home just Z, and Z homes (Both sides) only when it hits the left endstop. So the right endstop does nothing. When the left one is hit, then both Z sides will stop as if I only had one endstop connected for both steppers.

Homing X&Y, the only thing I get is that Y moves in a positive direction about 10mm and stops. Does not hit and endstop. X does not even attempt to home.

I’m going to have another look at the firmware in config.adv to see if there’s anything under endstops that I can change, though not sure what I’m looking for



You’re close. Two things for you:

  1. Use M119 from a computer to determine if your endstops are working. You can do this in repetier host, pronterface, or with octoprint/cnc.js. It should print which endstops it’s expecting to read, and what their state is. My guess is that they are going to say that they are both “TRIGGERED” even when you’re not pushing them.

You can flip the expected state in Configuration.h:

It looks like the default firmware flips X and Y and not Z. You can undo that if it’s wrong.

Or, if you have the endstops connected between common and Normally Open (NO), you can switch the wiring to common and Normally Connected (NC).

There’s more detail here, which is basically that if your endstop becomes disconnected, how do you want it to fail. If you chose NO, you wouldn’t know until it was homing, and it would just never stop. If you chose NC, and it became disconnected, the homing sequence would immediately stop as soon as you started to home.

  1. You probably don’t have dual z endstops enabled. In that same block of code where you enabled the dual z motors, you need to enable dual z endstops:

should be

Thanks Jeffe,

Will try this out today and let you know how I went with it.

I got it all going Jeffe, thank you.

Quick question though. My table is longer in the Y than a 2400mm sheet. Right now my Y homes 71mm past the length of the sheet. So my job needs to start at least 71mm past the home position. I did all this dual endstop for repeatability more than squaring the axis. What’s the best way to do this? Do I have to move my Y endstops up 71mm to where the beginning of the sheet is? Or do I (in Estlcam) adjust my starting point accordingly, which means I would have to increase my work area by 71mm because I usually cut end to end.

I do like having my Y extending out further, as it makes it easier for me on tool changes, but if I had to, then I would.

I’m not really sure. I haven’t had dual endstops set up here.

That’s OK, I’ll dig around and see what I find out.


Thanks again for your help me. Time to clean up all the wiring now lol.