Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: RChadwick on July 29, 2008, 10:24:47 PM

Title: Limit Switch annoyance
Post by: RChadwick on July 29, 2008, 10:24:47 PM
Perhaps someone knows a workaround for this...

When I'm jogging an axis, if it hits a limit switch, it stops (As it should!), but I can't get it to go back. If I hit reset, it just triggers again. The only way I've found to get out of this is to power down my stepper motor electronics, and manually move the axis until it's no longer triggering the limit switch. I'm glad at least I have handwheels on the ends of my motors!

Title: Re: Limit Switch annoyance
Post by: Chaoticone on July 29, 2008, 11:38:27 PM
RChadwick, try this. Go to the settings page and enable auto limits override. Should give you a green led beside the Button.

Hope this helps.

Brett
Title: Re: Limit Switch annoyance
Post by: RChadwick on July 30, 2008, 01:06:33 AM
That did it! The only weirdness is that when I hit the limit switch, it backs up very slow (Which I'm sure is a good feature) until the switch opens back up. Then, instead of speeding up, it stops! I have to hit the reset switch again. It's a minor issue, just odd. I thought it was a timing thing (Goes slow for 1/2 second, switch doesn't open in that time), but I found all 3 axis's were slow permanently when a limit switch is closed, and it stops when the switch is opened again.

Thanks again!
Title: Re: Limit Switch annoyance
Post by: Chaoticone on July 30, 2008, 01:32:39 AM
Hmmmmmmm, I'm not seeing it stop here when backing off of the switch. What version you running? It should jog at the speed set in homeing speed in homeing/limits in Config. All axis will jog at this speed until Mach sees it is clear of the limit switch causing the fault. Mach is that smart.  :) This is a good feature.   ;)

Brett
Title: Re: Limit Switch annoyance
Post by: RChadwick on July 31, 2008, 10:55:52 PM
Well, I have to say, from my perspective as a newbie, this is one of the most helpful forums I've seen. I think Mach3 is the type of program that just changes the field. The more I play with it, the more I'm impressed. However, by it's very nature, it's going to need a little hand-holding to get it running. I've been getting my hand held so much I'm not sure I'm not going steady with someone :).

As for the weirdness I mentioned, I'm running 2.63. I've noticed it 'feels' easy to trigger it so you need to reset. If i happen to just hit the reset button when I don't have to, it triggers an 'alert', and I have to hit the reset button again. My next step is to see if I can configure the limit switches as home switches too. Maybe this might fix it?
Title: Re: Limit Switch annoyance
Post by: Hood on August 01, 2008, 03:03:31 AM
The Reset button is a kind of software E-Stop, it will kill all.
 Not really sure what you are meaning to be honest :(

Hood
Title: Re: Limit Switch annoyance
Post by: jimpinder on August 01, 2008, 04:23:32 AM
I think we got a bit pushed off you post - so - The way the switches are programmed varies, whether the computer is using them as limit switches or homing switches.

As a limit switch, the carriage hits the switch, opens it, and the machine stops dead, and the reset button starts to flash. We never did get you over your problems with this - so

Your problem is that, when you hit the RESET button to start again, the limit switch is still open, so immediately triggers the STOP again.
If you go to the Settings Page (Page 5) left hand column, Special Functions, you will see the Auto Limits Overide button. If you press that, the machine will allow you to back off the switch if you hit it.
A further problem is noisy switches - that is where the movement of the switch is so jerky, that it doesn't make a clean on/off contact, but stutters. Mach 3 is so fast, it can pick up this, and although the switches closes, if it opens again a fraction of a second later, Mach sees this as the Limit switch being hit again, and stops the machine.

To counteract this, go to Config/General Config and on the top right hand corner, increase the debounce to say 50 units - a bit on the top side, but you can reduce it later when you get set up.

This should set up your Limit Switches. A word, though - these switches are what they say -  LIMITS of the system - and your machine should not hit them. As Hood has said, elsewhere I think - you can set soft limits on your machine so that the machine will not hit the limit switches - which are there to stop it to prevent a major catastrophy - not just an emergency.

When the same switches are used as a home switch, the operation is different. The carriage hits the switch and opens it, stops, reverses until the switch closes again, then stops. In theory this is more accurate than just hitting the switch, because the speed at which the machine backs off can be controlled. Mine are accurate to less than one thou (although I use lasers instead of mechanical switches).
If on your Config/Homing you have Auto Zero ticked, the Machine Co-ordinate DROs will go to zero.

Again the same problem with noisy switches may occur, so debounce is even more important here.

This sets up your Machine Co-ordinates - your machine knows where it is, and controls its movement using these - but they are probably *** all use from a prgrammers point of view. For this you need to place your cutting tool at the 0,0,0 point of the program you are cutting, so that (as in your other post) the entire cut is within the parameters of your table. This can take some doing if it is a big cut on a small table.

If you come out of Machine Co-ordinates and go to Program Co-ordinates - this now equates to your program Place the cutter where your 0.0.0 position is and press the zero button beside each DRO - they will go to zero
If you check Machine Co-ordinates you will see that has not changed, and if you check in Config/Fixtures, you will see that G54 has in the set of figures shown on your Machine Co-ordinates. This is the offset the machine requires to convert your program co-ordinates to machines co-ordinates for it to cut in the correct place. There are about 255 offsets available in the offset table - and so when you get really going, each program can have its own offset, so the machine always runs from the same, correct starting place.

Hope this helps explain a bit and starts you thinking why your machine is doing what it is doing.

The is a video tutorial worth looking at - Co-ordinate systems -  which will help explain it and may make the above a bit more transparent.





Title: Re: Limit Switch annoyance
Post by: RChadwick on August 01, 2008, 12:35:44 PM
Thanks a great deal for the help. I'm not in front of the machine at the moment, but I think it makes a lot of sense it's switch bounce. I'm just surprised my 800MHz VIA is fast enough :). Does anyone use other techniques, such as low value capacitors at the switches? Or can/should it be done all in software?
Title: Re: Limit Switch annoyance
Post by: Hood on August 01, 2008, 01:33:44 PM
Much better to have hardware fix rather than software, to test for noise issues increase your debounce to 2000 and see if it helps, if it does then you can try and lower to see how far you get before the problem returns.
 However there is no substitute for having hardware that works properly so proper shielding and quality switches are preferred.
Hood
Title: Re: Limit Switch annoyance
Post by: RChadwick on August 01, 2008, 03:14:48 PM
What switches are preferred? When I think of microswitches, I always thought of Cherry, which is what I used. I used shielded wire. When I put together my CNC, I really didn't (Still Don't :) have much knowledge as to what's commonly used. I'd also be curious what's used for precision triggering for home switches.
Title: Re: Limit Switch annoyance
Post by: Hood on August 01, 2008, 04:25:46 PM
I use HoneyWell limit switches on the Lathe and the Beaver mill, mainly because they were there already but on the Bridgeport I have optical switches, both the Honeywell and the Opticals are very accurate. The Honeywell switches are expensive and the opticals cheap, problem with the opticals is if you have any chance of coolant or dirt getting on the lens they are no use. That is unless you house them in a case of some sort and have a sprung rod protruding out either side and a flag attached to the rod so it blocks the optical in rest position and unblocks in activated.
Pic of my Z Axis optical on the Bridgeport and a link to the Honeywell switches I have, and thanks to you I just got a bargain of it as I did a search and saw it ;)
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=160267044708

Hood
Title: Re: Limit Switch annoyance
Post by: RChadwick on August 05, 2008, 01:09:39 PM
Glad I could help :). I appreciate the advice. The more I play, the more I realize these Cherry microswitches are close to worthless. While milling, they trigger an event if the mill vibrates too much. After experimenting, I found I can trigger one of them with a slight tap with a screwdriver! Unfortunately, my Sherline doesn't really have room for the big limit switches. Are there microswitch-sized limit switches available? If not, is there a different brand that might be better? Or perhaps something external I can do, like surrounding the switch in rubber or sorbothane?
Title: Re: Limit Switch annoyance
Post by: Hood on August 05, 2008, 01:32:07 PM
I use these on my Lathe for the Turret and Front Toolpost positioning, they certainly dont trigger with vibration and seem fairly accurate. I have 24V running through them and in fact all of my limit switches on the lathe have 24V supplies, I then put them through relays to change to 5V for the control (Mach)
 Not sure how good they would be for limit switches on an axis but they certainly work well for my lathes turret/toolpost.

http://www.rapidonline.com/Electronic-Components/Switches/Microswitches/IP67-Microswitch/74548/kw/limit%20switch
Hood