Endstops configuration

Hi guys,

 

I’ve completely rebuilt my machine and am now happy to have solved my mechanical problems. My crown looks awesome.

While at it, I have installed 5 endstops. They are microswitches on a small board with a LED that lights up when triggered and work well.

Homing does not work, however. I figure it because the signals are inverted. This is what I get when none of the switches should be triggered:

Send M119
Receive Reporting endstop status
x_min: TRIGGERED
x2_min: TRIGGERED
y_min: TRIGGERED
z_min: open
z2_min: TRIGGERED
ok

As a consequence, homing does not work on any axis: X and Y don’t move at all, as the switches are registered as triggered.

Z homing is particularly bad, as one of the switches is already inverted in the firmware while the other isn’t.

 

Where can I find an option to invert these signals in the firmware? I’m running a modified Marlin-MPCNC_Ramps_T8_16T_LCD_32step_DualEndstop. (Modification is the activation of dual Z setup with dual endstop pins connection to Zmin and Ymax on the RAMPS.)

 

Also: The Z axis on the “open” side moves up instead of down until triggered. Is that intended behavior and can I change it?

 

Thanks!

Hajo

Line 618 in Configuration.h:

[scode]
// Mechanical endstop with COM to ground and NC to Signal uses “false” here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // 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 false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // 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.
[/scode]

Have you confirmed they go to ‘open’ when you trigger them?

3 Likes

Thank you very much! This solved it, behavior is now as intended in all dimensions.

Jeffeb,

You seem to be a pretty smart dude.

just thought i’d throw that out there.

4 Likes