Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Kev on April 15, 2017, 06:12:20 PM

Title: Home switches
Post by: Kev on April 15, 2017, 06:12:20 PM
Hi there, How can I get the axis to step off the home switches so they are clear by about 5mm ?
Kev
Title: Re: Home switches
Post by: Davek0974 on April 17, 2017, 02:12:00 PM
AFIK there is no setting for this, if the axis is not stepping back or only just stepping back it is likely switch bounce - try adding some de-bounce and try again, might need deifferent switches.
Title: Re: Home switches
Post by: rhtuttle on April 17, 2017, 03:11:19 PM
If I understand you correctly you want to ref an axis which goes to the limit switch and then backs off until the switch is inactive and then proceed another 5mm.  If that is correct then choose operater->edit button script and then click on the ref all home button. 

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 ) c
Depending on what axis you want to move off from change to:

DoButton( 24 ) ; ref Z
Code("G1 Z5")
DoButton( 23 ) ; ref Y
code("G1 Y5")
DoButton( 22 ) ; ref X
code("G1 X5")
DoButton( 25 ) ; ref A

HTH

RT