Welcome! Log In Create A New Profile

Advanced

Telling Marlin Where the End Stop Switches Are

Posted by Garry Bartsch 
Telling Marlin Where the End Stop Switches Are
September 15, 2014 07:27PM
On my Mendel90 based printer design-in-progress I have the end stop switch operating positions set at 102.5mm for X and 102.6mm for Y. To make sure I am explaining it properly, I mean that when the X carriage moves 102.5mm left from the point when the nozzle is dead center on the print bed it will trigger the X end stop switch. And similarly, when the Y carriage moves 102.6mm forward from the point when the nozzle is dead center on the print bed it will trigger the Y end stop switch. Phew, sorry for that ...

Firstly, I want to know how to tell Marlin the operating position of the end stops. Is it '// Travel limits after homing' in configuration.h?

// Travel limits after homing
#define X_MIN_POS -100
#define X_MAX_POS 100
#define Y_MIN_POS -100
#define Y_MAX_POS 100

And if so, in my case I would do this?:

// Travel limits after homing
#define X_MIN_POS -100
#define X_MAX_POS 102.5
#define Y_MIN_POS -100
#define Y_MAX_POS 102.6

Second, if the above is on the right track, should I be setting the end stop operating position exactly 100mm from the nozzle dead center point rather than my 102.5mm and 102.6mm? I can easily alter my design but I thought having a we bit of spare room on the limits would be a good idea??

Thanks in advance for any advice.
Re: Telling Marlin Where the End Stop Switches Are
September 16, 2014 04:44AM
The MIN and MAX positions set the soft limits, i.e. the active area of the bed that the nozzle cannot move outside of after homing.

The home positions are set like this:

#define X_HOME_POS (X_MIN_POS - 1)
#define Y_HOME_POS (Y_MIN_POS - 1)

and can be outside of the build area so that the limit switches are never struck after homing.


[www.hydraraptor.blogspot.com]
Re: Telling Marlin Where the End Stop Switches Are
September 16, 2014 02:48PM
Ah, that makes sense; daft me. Thank you Chris.

So I would set the variables as follows:

#define X_HOME_POS (X_MIN_POS - 2.5)
#define Y_HOME_POS (Y_MIN_POS - 2.6)
Sorry, only registered users may post in this forum.

Click here to login