Hello Guest it is March 28, 2024, 03:09:36 PM

Author Topic: Homing to a switch -- what's the right G-code?  (Read 4279 times)

0 Members and 1 Guest are viewing this topic.

Homing to a switch -- what's the right G-code?
« 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 ....

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Homing to a switch -- what's the right G-code?
« Reply #1 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
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Homing to a switch -- what's the right G-code?
« Reply #2 on: January 17, 2007, 10:48:54 PM »
Hello Brett -

Please see my xml file attached.  Thanks in advance for any help ...

Offline rcrabb

*
  •  146 146
    • View Profile
Re: Homing to a switch -- what's the right G-code?
« Reply #3 on: January 17, 2007, 11:14:19 PM »
It doesn't seem you have your inputs configured. Look at the pic I posted.
Ryan

Offline rcrabb

*
  •  146 146
    • View Profile
Re: Homing to a switch -- what's the right G-code?
« Reply #4 on: January 17, 2007, 11:17:25 PM »
Use that automated setup of inputs buttom. It work great.
Ryan
Re: Homing to a switch -- what's the right G-code?
« Reply #5 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!

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Homing to a switch -- what's the right G-code?
« Reply #6 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
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!