Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Instance on January 17, 2007, 08:05:57 PM

Title: Homing to a switch -- what's the right G-code?
Post by: Instance on January 17, 2007, 08:05:57 PM
I'm a bit confused about how to home an axis to a mechanical switch (and then have Mach reset the DRO to zero when it gets there).  I installed an active low switch and configured it properly in the inputs to Home X.  I tried the following G-codes;

G28 X0
G28.1 X0
G30 X0

My expectation was that the X-axis would travel to the switch, then stop when the switch activated, and finally reset the DRO to zero.  However, it just keeps stepping right past the switch.  I'm *positive* its connected  properly from an electrical standpoint (I watched pin 12 go low on a scope).  Any help appreciated ....
Title: Re: Homing to a switch -- what's the right G-code?
Post by: Chaoticone on January 17, 2007, 08:31:22 PM
I have to step out for a while but can you post your xml? Someone will help.


Brett
Title: Re: Homing to a switch -- what's the right G-code?
Post by: Instance on January 17, 2007, 10:48:54 PM
Hello Brett -

Please see my xml file attached.  Thanks in advance for any help ...
Title: Re: Homing to a switch -- what's the right G-code?
Post by: rcrabb on January 17, 2007, 11:14:19 PM
It doesn't seem you have your inputs configured. Look at the pic I posted.
Title: Re: Homing to a switch -- what's the right G-code?
Post by: rcrabb on January 17, 2007, 11:17:25 PM
Use that automated setup of inputs buttom. It work great.
Title: Re: Homing to a switch -- what's the right G-code?
Post by: Instance on January 18, 2007, 12:32:09 AM
Hmmm ... I'm actually using Mach2, so the input screen is different, but it shows Home X enabled (a check mark).  The xml file that I posted also has the tag;

<HomeX>1</HomeX>

With '1' meaning enabled.  I was suprised to see it disabled in your screen shot.  Maybe there's another setting I'm missing in Mach2?  Perhaps I'll load Mach3 tonight and try the input wizard ... thx for the response!
Title: Re: Homing to a switch -- what's the right G-code?
Post by: Chaoticone on January 18, 2007, 05:49:11 AM
Hey Instance,
     I'm sorry, I didn't catch that you were running Mach 2. Yes, please load the latest version of Mach 3. I will send you my xml for refrence if you would like.



Brett