Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: halkintool on January 07, 2009, 05:01:33 PM

Title: Can Home Switch be -- limit switch...
Post by: halkintool on January 07, 2009, 05:01:33 PM
Im currently setting up my limits, the previous control on the machine im retrofitting ran a single limit switch at each end of the machine travel. If i assign the same limit switch input to the Y home and to the Y--, when i home, the machine will shut down. I can run the machine with just a Y++ limit switch and make sure the soft limits are on, but if they're not on, you can crash the head at the Y-- limit.

Do I have to run a separate home switch from my limit or is there a way around? Say, the machine homes, then comes .5" off the home switch and once its homed it treats the switch as a limit?
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 07, 2009, 05:08:34 PM
You just set the pins for your limit and home as the same and when homing Mach will treat it as a home switch and once homed Mach will then treat it as a limit switch.
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 07, 2009, 05:39:10 PM
When i tried this, the axis will home. Then it says "cannot jog when limit switch is active" and i have to disable the limit to jog off.
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 07, 2009, 05:52:11 PM
You mean the SoftLimit button you need to disable? If so then you have your softlimits set wrong.
If not then please try and explain a bit more as I dont think I have ever seen that, where do you see that message? Does your Reset  flash?

Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 07, 2009, 06:12:29 PM
The Y axis travels towards the home/limit switch.

It homes, but because its homed onto the limit switch, it resets and generates a limit switch error. I then go into ports and pins and disable the limit so i can jog off.  We build press brakes here, and when we calibrate our backgauges, it will home then come forward about an inch automatically and the home switch acts as a limit.  If the axis homes and sits on the switch, the limit is triggered.
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 07, 2009, 06:15:59 PM
OK then that is because you have noisy or bouncing switches, set the debounce interval to  2000 and see if that helps, if it does keep lowering until it starts again then notch up slightly again.
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 07, 2009, 06:32:36 PM
What happens when Mach homes it will move to the switch and open it, it will then reverse until the switch closes then it will stop and set that as your home position. If the switch has noise or is bouncy then Mach will see the switch closing before it actually does and will stop, problem is the switch in reality is still open and because Mach is now seeing it as a limit switch you get that error. Shielding your limits wiring properly and only grounding at the control end should help, if not then maybe the switch is just not very good.
 Setting the debounce interval higher makes Mach wait for a longer signal before it acts on it so noise is less likely to trigger the switch.

Oh and another thing just for your reference, you can set AutoLimits override which will allow you to jog off a limit after you have pressed the ReSet button. Its not a cure for your problem but may help in the future if you accidentally hit a limit and need to jog off.
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 07, 2009, 07:02:57 PM
Ill try this tommorrow, thanks.
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 08, 2009, 11:29:10 AM
Where do I adjust debounce intervals?

I finally finished setting up all my limits, the X axis will home and bounce back, but still when I set up the home to the same as the -- limit switch, it shuts down the second it touches the limit.
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 08, 2009, 11:38:07 AM
Config menu then General config, its top right of that page.
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 08, 2009, 05:12:48 PM
I got this to work out, its notable that my 1000ipm job speed pretty much flies over my limits. I think it will be very necesarry to utilize software limits whenever operating machine. The debounce interval fixed the homing problem but amplifieds the high speed jog problem as the machine is over the limit before the limit even comes on.
Title: Re: Can Home Switch be -- limit switch...
Post by: Overloaded on January 08, 2009, 07:32:26 PM
Soft limits will help. And the Slow Zone.
Back to reply #5, did you reduce the debounce to where it JUST corrects the prob. + a little ?
The 2000 is just to pin-point the problem.
May only need to be 50 or so.
If set too high, and the limit is a straight in plunger type, hit it fast and CRUNCH.
RC
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 09, 2009, 10:17:54 AM
Its set to 400 right now, anything less and i get the error on calibration. The limit switch is plunger but it rides along a flat, so you can go right over it without damaging it.
Title: Re: Can Home Switch be -- limit switch...
Post by: Overloaded on January 09, 2009, 03:53:49 PM
Like Hood said in #6, you should check/shield your wires and check that switch. A clean noisless system should run at "0" debounce.
RC
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 09, 2009, 04:11:59 PM
It does the same thing on both axis and i've already replaced the Y axis switch (i jogged passed it and crushed it with the ball nut).

As far as noise, what noise are you refering to? The limits are wired to the control through an opto-iso board so i can see the relevance? What exactly is mach doing when the axis homes?
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 09, 2009, 04:44:41 PM
If  you get electrical noise in the cable from the switch it can look to Mach as if there has been a signal, it doesnt matter whether it is opto isolated or not .
 5v is very prone to noise as the difference between High and Low is fairly close in voltage terms, that is the reason industrial controls use mostly 24V for their I/0, as the difference between high and low is much greater. I use 24v on my lathe and Beaver mill and then just use relays or opto board to convert to 5v prior to passing to the BOB, this makes it almost impossible for noise to be an issue.
 Having shielded cables and having the shielding grounded at one single point in the control cabinet can make 5v work well enough, my Bridgeport has that and debounce is zero, but if I was re-doing the Bridgeport I would have 24v I/O.

Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: Overloaded on January 09, 2009, 04:59:59 PM
When Mach "Homes" to a snap action limit switch, the plunger compresses until the switch "snaps" the contacts OPEN. Then the axis reverses direction until the switch SNAPS again closing the contacts. This distance varies between different mfg. of switches but lets say about .030". Now if you go to the HOME pos., you would be .030" from tripping the switch.

Edit: Provided you do not have a HOME OFF set
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 09, 2009, 05:56:08 PM
Home offset is zero.

The cable im using for my limits is shielded until the bridge where it splits to the various limits. Im running all the limits off 24V. The BOB is rated for 10-30V. I can't see it being possible for the wires to pick up 10V of interference from the shielded servo cables. ?

When the axis homes I get a "limit switch" error immediately when it touches the limit switch, no delay.
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 09, 2009, 06:07:45 PM
Well if you are using 24V then noise should not be an issue unless it is being picked up in the BOB.
So you are  ok with the debounce set to 400?
Would be interesting to see where the problem is, if you set the debounce back to zero and do a home move and trigger the switch with your finger and keep it pressed to see if the axis reverses for a bit before you release that would let you know if its noise in the BOB or just very twitchy switches. If it doesnt reverse then I suppose  it could still be the switch but it would have to be fairly bad switches but to be sure if you could take the wires off the switch and touch them together, do the home and open them and see if it reverses, if it does then its the switch, if not its noise at the BOB.
 Do you have a scope? If so would be fairly easy to see if there is noise from the BOB.
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 09, 2009, 06:23:18 PM
I can get a scope.

One thing i noted from what you just said, would it matter if the switches were NO or NC? I have them wired NO.  The switches are OEM parts off our press brakes, good quality. I dont think the switch would be the issue.

I tried pushing the limit switch in while the machine was homing and i get the "limit trigger switch error"
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 09, 2009, 06:28:47 PM
Its best to have NC switches just from a safety point of view, if a cable breaks or gets cut on a sysytem with limit switches that are NO then Mach will not see that, where if they were NC then it would.
 So your test above you say if you start homing then close the switch and keep it closed and Mach doesnt reverse but just triggers a limit error? Is this with debounce set to zero? If so it certainly sounds like the BOB is the problem but a scope would certainly verify that.
Hood


Edited to say closed instead of open just to make clearer as you are using N0 switches
Title: Re: Can Home Switch be -- limit switch...
Post by: Chip on January 09, 2009, 08:08:30 PM
Hi, Halkintool

If your statement is, (I tried pushing the limit switch in while the machine was homing and i get the "limit trigger switch error").

Then your Home Switch's Setting are Incorrect, On the Diagnostic Screen you can test them, The Home Led's  should turn On & Off with the same axis Limit Switch.

Let us now what you see on the diag. screen Hear are some Pic's.

Edit: Enabled, Actives should be the same for Limit's & Home SW's And none should be Emulated 

Thanks, Chip
Title: Re: Can Home Switch be -- limit switch...
Post by: Chip on January 10, 2009, 01:35:07 PM
Hi, Halkintool

Did you get it to work ?

Chip
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 10, 2009, 01:58:03 PM
Chip
 from what he said I think  setting the debounce to 400 worked fine but as he has 24v through his switches  and shielded cables there should be no need for debounce so I am guessing that the problem is in the BOB itself where it gets changed to 5v.
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: Chip on January 10, 2009, 02:02:13 PM
Hi, Hood

It just seemed unclear to me with his last post.

Thanks, Chip
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 10, 2009, 02:09:39 PM
Chip
 think that is referring to the tests I was suggesting, basically do a homing move and activate the switch manually  and keep it pressed for a bit to see if it triggers the error. Seems like it was,  so basically what is happening is start home, hit switch, Mach sees switch again and sets home and then sees switch again and triggers the limit error. It seems like the noise must be very consistent as from what I gather the motors dont even get a chance to reverse before Mach sees the switch de-activating.

Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 12, 2009, 10:56:12 AM
If im getting noise, why would the X-axis for example travel 100" without noise and develop all kinds of noise once its homing? You would assume if noise was the problem, it would constantly home when i send it to home.

Ill make a few movies and see if i it becomes more clear.


What should the homing settings look like?

I have my software min set to .100" and home offset set to .100" are these ok distances, should they be higher?
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 12, 2009, 11:04:58 AM
If im getting noise, why would the X-axis for example travel 100" without noise and develop all kinds of noise once its homing? You would assume if noise was the problem, it would constantly home when i send it to home.

Ill make a few movies and see if i it becomes more clear.
Look forward to the vid.
As to why on the noise, I am asuming it is just when your switches close that you get the noise issue, it may well be a different story if you had NC switches.
 Just to clear things up, does the debounce to 400 stop your issues?
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 12, 2009, 11:06:55 AM
Yes and no, when debouce is 400, and software limits are off, the machine will fly right over the limits.
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 12, 2009, 11:11:53 AM
(http://img.photobucket.com/albums/v133/black240sx/th_100_4766.jpg) (http://smg.photobucket.com/albums/v133/black240sx/?action=view&current=100_4766.flv)

Check it out and tell me what you think.

I can wire the limits NC, but take a look first and let me know if you think it would help.
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 12, 2009, 11:26:51 AM
OK you seem to have Pin Zero set for the X Home and X++ Limit, thats not right. Also your Y-- is a different pin number than Y++ and Y Home, that could be correct but depends on how you have them connected.

Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: zarzul on January 12, 2009, 12:48:34 PM
If the only time you experience the problem of the limit switch tripping is when doing a homing routine,  it is probably true switch contact bounce,  that is where they came up with the term debounce. 

If I were you I would probably try to wire it up Normally closed,  you would probably not get a bounce when opening the switch.

Or look for better switches, maybe a non-mechanical type, optical, capacitive or inductive switch.

With a scope you could examine the single as it closes, or as it opens and see if you are getting a bounce but this would probably be redundant since you have pretty much nailed down the problem anyway.

Arnie
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 12, 2009, 02:15:09 PM
OK you seem to have Pin Zero set for the X Home and X++ Limit, thats not right. Also your Y-- is a different pin number than Y++ and Y Home, that could be correct but depends on how you have them connected.

Hood

The Y++ and Y-- are separate limit switches.

And why can't i use pin 0 for the X home?
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 12, 2009, 02:37:43 PM
Where do you get Pin 0 for on Port 1?
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: Chip on January 12, 2009, 02:42:15 PM
Hi, Halkintool

There is NO, Pin "0", You can use separate limit switches, Just set the Pin numbers properly.

You need to set the pin inputs to proper pin numbers, Until you do that the Homing will not work.

Hears a pic with the proper settings for NO type sw's, You just need to put/change the Pin Numbers.

You can and need to see the Led's light up "on & off" on the Diagnostic screen before the Homing will WORK !!

Chip
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 12, 2009, 02:47:20 PM
OK I just viewed the video again at home this time on a clearer monitor and I see you have external pulsing, so what device are you using as obviously its not the parallel port. Also should have noticed that you were using pins 2 and 3 for the inputs on port 1 and that cant be done with the PP so I should have worked that out as well.
Please give as much info about your hardware as you can as it may save lots of replies with no progress.
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 12, 2009, 03:33:57 PM
Im running the vital systems dspMC motion control with their opto isolate breakout board.
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 12, 2009, 03:38:23 PM
Ok you better talk to Ruffi (sp?) as I have no idea whether the plugin for that can handle dual limit/homing.
Hood
Title: Re: Can Home Switch be -- limit switch...
Post by: halkintool on January 12, 2009, 03:51:01 PM
It all makes sense now. It probably coulda helped if i had said something earlier.  :-\
Title: Re: Can Home Switch be -- limit switch...
Post by: Hood on January 12, 2009, 03:57:45 PM
no probablys about it LOL but from what I have seen/heard  Ruffi's support is excellent so you should be sorted in no time :)

Hood