Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: rrc1962 on December 02, 2009, 09:48:54 PM

Title: Home switch override
Post by: rrc1962 on December 02, 2009, 09:48:54 PM
When the machine homes and hits the switches, it backs off a little as to deactivate the switch.  Is there a way to increase the amount it backs off or is that hard coded into Mach.  I haven't noticed a setting for that anywhere.

Thanks
Title: Re: Home switch override
Post by: Hood on December 03, 2009, 03:10:26 AM
Mach does not back off a set distance, so no it is not hard coded. What Mach does is moves to the switch and when it is broken it reverses until the switch again closes and then stops.
 If you are having problems with the switch seemingly closing before Mach has backed fully off of it then it would seem you either have bouncy contacts or electrical noise. It is best to get rid of these problems by either having good quality switches (for the bounce) or shielding and properly grounding the wires to the switches (electrical noise) You can however increase the Debounce Interval which is on the General Config page and this may help, although it is still in my opinion best to get things sorted properly.

Hood
Title: Re: Home switch override
Post by: rrc1962 on December 03, 2009, 04:35:58 AM
I'm not really having a problem. I just wanted another 1/8" or so if it was possible. No reason other than a little distance between the switch and ramp.
Title: Re: Home switch override
Post by: Greolt on December 03, 2009, 04:54:07 AM
If you really want a back off distance you can do it by adding some moves to the homing macro and using the "Home Off" distance.

Here is a "For Instance" to make the X axis home to a distance 1/8" off the home switch.

Put a value of -0.125 in the X "Home Off." column, under "Homing and Limits"

And use this code in the homing macro.

DoOEMButton (1022)  "home X axis
While IsMoving ()
Wend
Code "G53 X0"  'move X axis to machine coordinate 0

Greg