Welcome! Log In Create A New Profile

Advanced

Marlin - Offseting the position of axis after hitting end stop

Posted by TheHackerArtist 
Marlin - Offseting the position of axis after hitting end stop
May 25, 2015 12:07PM
Hi,

I am currently building a new printer and left traveling space beyond the print bed in the X and Y direction before hitting the end stops. I am trying to figure out how to have Marlin simply go back the gap distance after hitting the end stop ( Moving back to the print bed) and then register that as the (0,0) X Y positions. After several years of development I'm certain this feature has been implemented by the community but I can't seems to find the documentation to guide me in implementing tha firmware change.

I know the option is available in repetier firmware under endstop options. The folowing is copied from the repetier firmware, but I want to use Marlin.

#define ENDSTOP_X_BACK_ON_HOME 1
#define ENDSTOP_Y_BACK_ON_HOME 20
#define ENDSTOP_Z_BACK_ON_HOME 0

That snipet of code, for example, would allow for a gap of 20mm beyond the true Y axis bed limit before the Y carriage hits the Y endstop. The carriage would move back 20mm before registering the 0 position in software.

Thanks!
Re: Marlin - Offseting the position of axis after hitting end stop
May 25, 2015 12:34PM
My x axis endstop is 20mm left of the bed so I changed this section of code in configuratio.h

// Travel limits after homing
#define X_MAX_POS 200
#define X_MIN_POS -20 // 20 mm left
#define Y_MAX_POS 180
#define Y_MIN_POS 0
#define Z_MAX_POS 180
#define Z_MIN_POS 0
Re: Marlin - Offseting the position of axis after hitting end stop
May 26, 2015 01:54AM
Alright, thanks for the reply George.

I will give that a try and keep you posted.
Re: Marlin - Offseting the position of axis after hitting end stop
May 26, 2015 07:35AM
#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.

What about this line? Does it has to be set "false" then?
-Olaf
Re: Marlin - Offseting the position of axis after hitting end stop
May 26, 2015 09:42AM
Mine still has min_software_endstops = true
Min software position is -20 so will not move past -20
Re: Marlin - Offseting the position of axis after hitting end stop
May 26, 2015 02:18PM
Hmm, that doesnt provide th solution I'm looking for...

The behavior I would like to implement is that right when one axis hits the end stop it moves back physically by the offset amount specified in the firware before registering home and before atempting to home another axis.

Any thoughts on where that can be changed? Guess it will require some heavier code investigation and modifications...but I'm sure this has been done before...

Edited 1 time(s). Last edit at 05/26/2015 02:19PM by TheHackerArtist.
Sorry, only registered users may post in this forum.

Click here to login