MKS GEN L DUAL endstops Z problem

Hi Everyone,

Sorry by advance my english is no good, i from Belgium natural language is french.

I have follow this topic before post: mks-gen-l-dual-endstops/11210
Marlin firmware: MPCNC_Ramps_T8_16T_LCD_32step_DualEndstop

All motor work correctly, but, only endstop Z right not work, i have tested M119 see result, i have signal

x_min: open
y_min: open
y2_min: open
z_min: open
z2_min: open
z_max: TRIGGERED  <--- this is my endstop right Z
>>> M119
SENDING:M119
Reporting endstop status
x_min: open
y_min: open
y2_min: open
z_min: open
z2_min: open
z_max: open

My file configuration_adv and config is modified based on Teaching Tech
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
#define USE_XMAX_PLUG
#define USE_YMAX_PLUG
#define USE_ZMAX_PLUG

// Enable pullup for all endstops to prevent a floating state
#define ENDSTOPPULLUPS
#if DISABLED(ENDSTOPPULLUPS)
// Disable ENDSTOPPULLUPS to set pullups individually
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
//#define ENDSTOPPULLUP_ZMIN_PROBE
#endif

// Enable pulldown for all endstops to prevent a floating state
//#define ENDSTOPPULLDOWNS
#if DISABLED(ENDSTOPPULLDOWNS)
// Disable ENDSTOPPULLDOWNS to set pulldowns individually
//#define ENDSTOPPULLDOWN_XMAX
//#define ENDSTOPPULLDOWN_YMAX
//#define ENDSTOPPULLDOWN_ZMAX
//#define ENDSTOPPULLDOWN_XMIN
//#define ENDSTOPPULLDOWN_YMIN
//#define ENDSTOPPULLDOWN_ZMIN
//#define ENDSTOPPULLDOWN_ZMIN_PROBE
#endif

// Mechanical endstop with COM to ground and NC to Signal uses ā€œfalseā€ here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.

//#define X_DUAL_STEPPER_DRIVERS
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
#define INVERT_X2_VS_X_DIR true // Set ā€˜trueā€™ if X motors should rotate in opposite directions
#define X_DUAL_ENDSTOPS
#if ENABLED(X_DUAL_ENDSTOPS)
#define X2_USE_ENDSTOP XMAX
#define X_DUAL_ENDSTOPS_ADJUSTMENT 0
#endif
#endif

#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#define INVERT_Y2_VS_Y_DIR true // Set ā€˜trueā€™ if Y motors should rotate in opposite directions
#define Y_DUAL_ENDSTOPS
#if ENABLED(Y_DUAL_ENDSTOPS)
#define Y2_USE_ENDSTOP YMAX
#define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
#endif
#endif

#define Z_DUAL_STEPPER_DRIVERS
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
#define Z_DUAL_ENDSTOPS
#if ENABLED(Z_DUAL_ENDSTOPS)
#define Z2_USE_ENDSTOP XMAX
#define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
#endif
#endif

//#define Z_TRIPLE_STEPPER_DRIVERS
#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
//#define Z_TRIPLE_ENDSTOPS
#if ENABLED(Z_TRIPLE_ENDSTOPS)
#define Z2_USE_ENDSTOP XMAX
#define Z3_USE_ENDSTOP YMAX
#define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0
#define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0
#endif
#endif

I have prepared shema for my board

mks

i not found my error Can you help me please?

Thank you

1 Like

Make sure the actual endstop is wired correctly.

1 Like

Hello Barry, thanks for reply yes is correctly connected after test push is : z_max: TRIGGERED and no push is: z_max: open

Are they on the right side? If you home Z and trigger the other one, does that side stop?

I reverse the connection from left to right for the test and it works

1 Like

after a lot of testing i changed this section to the original one provided in the firmware, I also changed the endstop with a new one

i tested each endstop pronterface:

result:

All endstop not push
Recv: x_min: TRIGGERED
Recv: y_min: TRIGGERED
Recv: y2_min: TRIGGERED
Recv: z_min: open
Recv: z2_min: TRIGGERED
Recv: z_max: TRIGGERED

Push on Z left
Recv: x_min: TRIGGERED
Recv: y_min: TRIGGERED
Recv: y2_min: TRIGGERED
Recv: z_min: TRIGGERED
Recv: z2_min: TRIGGERED
Recv: z_max: TRIGGERED

Push on Y left
Recv: x_min: TRIGGERED
Recv: y_min: TRIGGERED
Recv: y2_min: open
Recv: z_min: open
Recv: z2_min: TRIGGERED
Recv: z_max: TRIGGERED

Push on Y2 right
Recv: x_min: TRIGGERED
Recv: y_min: open
Recv: y2_min: TRIGGERED
Recv: z_min: open
Recv: z2_min: TRIGGERED
Recv: z_max: TRIGGERED

Push on Z2 right (replaced by new)
Recv: x_min: TRIGGERED
Recv: y_min: TRIGGERED
Recv: y2_min: TRIGGERED
Recv: z_min: open
Recv: z2_min: TRIGGERED
Recv: z_max: open

and finally Push on X
Recv: x_min: open
Recv: y_min: TRIGGERED
Recv: y2_min: TRIGGERED
Recv: z_min: open
Recv: z2_min: TRIGGERED
Recv: z_max: TRIGGERED

I think Iā€™m almost there but a detail must escape me, if for someone it seems obvious thank you in advance for providing me a little help :slight_smile:

The good news is, they are changing. I see two problems here:

  1. Most of the endstopā€™s logic is inverted. X_MIN , Y_MIN, Y_MAX, Z_MAX are all backward. There are two ways to fix that. Either change the related X_MIN_ENDSTOP_INVERTING, etc. to ā€œtrueā€ or wire the endstops the other way.

  2. Z2 isnā€™t registering on the zmax pin. In Configuration_adv.h, in you can set Z2_USE_ENDSTOP ZMAX. Or else, connect that endstop to the xmax port.

Both problems have a wiring or software solution. The difference is minimal.

1 Like

Many thanks Jeff,

I modified the line in configuration_adv

#define Z2_USE_ENDSTOP XMAX

Through

#define Z2_USE_ENDSTOP ZMAX

and in configuration

// Mechanical endstop with COM to ground and NC to Signal uses ā€œfalseā€ here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.

everything works perfectly

thanks again !

2 Likes