Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: moonlightmedia on February 11, 2007, 04:16:05 PM

Title: Limit Switch Problems - BAFFLING!
Post by: moonlightmedia on February 11, 2007, 04:16:05 PM
I have my limit switches (3 sets 2-x,2-y,and 1-z) wired in series. All are set to be
normally closed and therefore return a ground to their respective parallel port pins.
The measured voltage at the controller is 2.5 millivolts closed and
4.5 volts when active (open) for each of the three signals. The diagnostics panel
sees these activations and responds with the appropriate LEDs lit when switches
are activated. The switches are lever activated microswitches so there is no external
voltage or active circuitry present, just pull up resistors to +5 and ground.

My problem is that when the pins are set up in MACH3, it tells me that there
is a limit switch active and refuses to reset. The odd thing about all this is that
if I make all the switches normally open, this works. Obviously I had to change
the sense of the switches in Mach 3 to make this happen. I really don't
want to run this in a normally open switch configuration. Can anyone offer
a little light on this problem?

I wouldn't be so perplexed if the darn diagnostic panel didn't say one thing while
the main page said something else ( i.e. limit switch activated.
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Chip on February 11, 2007, 05:59:27 PM
Hi, moonlightmedia

Have you changed the state of "Active Low" in Config, Ports and Pins, Inputs, for your switch inputs.

This will change the way Mach looks at the switch "NO" "NC",  click on the X or Check mark it will change state, then Apply.

Hope this Helps, Chip
Title: Re: Limit Switch Problems - BAFFLING!
Post by: skaha on February 11, 2007, 07:14:12 PM
Hi, I have exactly the same setup on my machine, works well, have you checked for a  faulty switch with an ohm meter, sounds like one is not opening to complete the circuit.
Terry
Title: Re: Limit Switch Problems - BAFFLING!
Post by: moonlightmedia on February 13, 2007, 10:07:52 AM
I know the set up and switches are working because the Diagnostic Panel Lights go on and off
correctly when the switches are tripped. No lights on and I can't reset.
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Scott on February 13, 2007, 10:55:43 AM
It still sound like the switches are set backwards in Config/Ports and Pins/Input Signals.  I think you should have a red X in the 'Active Low' column.

Also check the settings page for 'Manual Override Limits' or 'Auto Override'.  If on, then you should be able to reset and move off the switches.
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Brian Barker on February 13, 2007, 11:00:56 AM
Also add a bit of debounce and see if that helps... 2000 should help if it is a noise problem
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Tarak on February 17, 2007, 06:09:22 AM
Hi Brian, I'm having a similar problem, I'm wondering if the Debounce will fix my problem, which field should I enter a value into DEBOUNCE INTERVAL or INDEX DEBOUNCE?
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Hood on February 17, 2007, 12:51:19 PM
Debounce Interval is the one you need to use for limits etc. The Index Debounce is for the spindle speed sensor if you have such a thing fitted.
Hood
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Tarak on February 17, 2007, 03:03:45 PM
Thanks, I'll give it a try.
Title: Re: Limit Switch Problems - BAFFLING!
Post by: moonlightmedia on February 18, 2007, 04:24:15 PM
This has still got me stumped. I tried to set up a simpler scenario so I could troubleshoot this problem.
I took everything down to just one switch which is normally close. All switches are disabled with the
exception of this one switch on pin 10 of the parallel port and set to active high. The meter agrees
at .6 ohms across the contacts with the closure being to ground. Mach 3 is set to be active high.

1- Nothing is moving and the switch is STATIC at ground.
2- Switches that are not being switched, don't bounce in my humble opinion.
3- Mach 3 diagnostic panel shows NO LIGHTS ON. In effect this means
   that Mach 3 agrees that it also sees a ground from the port.
4- The main page in Mach 3 will not do a reset and reports that a limit switch is tripped.

Steps one thru four are in CONFLICT. Mach 3 sees a ground (no limit switch active) and yet
reports a limit switch is tripped. This is the part that I don't get !!!!!

What I am beginning to suspect is that the Diagnostic Panel and the operational structure of
Mach 3 are looking at two different places - This is the only way I can explain why it might act
this way.

I'm not looking to criticize Mach 3, I love the software. I just want to figure out whats going on
so my router will run correctly.


Even more bizarre is that if you set the switch (resolder) to be normally open and the
corresponding signal on pin 10 to be active low, this all works ! Unfortunately this is not
the best way to wire this (active low) since a broken connection will give no indication.
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Hood on February 18, 2007, 04:30:02 PM
Did you try increasing the debounce? Maybe the contacts are fluttering slightly.
Hood
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Chip on February 18, 2007, 09:56:25 PM
Hi, moonlightmedia

Change the state of "Active Low" in Config, Ports and Pins, Inputs, for your switch inputs, turn off "Active Low" "X", " Emulated" "X" .

This will change the way Mach looks at the switch "NO" "NC",  click on the X or Check mark it will change state, then Apply.

See Att. Set them this way.

Hope this Helps, Chip
Title: Re: Limit Switch Problems - BAFFLING!
Post by: moonlightmedia on February 19, 2007, 08:49:51 AM
Reply to afn09556

Chip,

I clearly see the settings you are showing and understand why they are like that. Just for reference, I have
been a Digital/Analog Engineer for thirty years and I do understand the signaling process that is being done here.
If you re-read my previous post, you will see that I set the controls for "Active High". This is exactly what you
have shown. Active High is the same as placing an "X" in the active low field. In essence it says NOT active low.

The problem that no one seems perplexed by is that Mach 3 Sees the signal correctly and then responds by telling
me the signal is wrong !
. If the diagnostic panel says "There is no limit switch active", why does the main page insist
that there is ?

I can make this all go away by setting the switches for active low and making the switches normally open but I would
really rather have an answer to the problem. I sent along an Email directly to the people who make Mach 3 but so
far I don't have a response.

Thanks for your response and patience
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Hood on February 19, 2007, 01:12:52 PM
The problem that no one seems perplexed by is that Mach 3 Sees the signal correctly and then responds by telling
me the signal is wrong !
. If the diagnostic panel says "There is no limit switch active", why does the main page insist
that there is ?
I am not perplexed because mach will pick up the slightest state change and I would think that the graphics wont be as responsive to such a short change in this state. I know this to be the case from personal experience, when I was fitting limits to my first conversion, the LEDs would not show the state change as it was too fast, but that Mach itself saw the momentary change and gave a tripped limit warning. My problem was that I had forgotten to connect some of the pins to ground on the OR gate that I was using, so I was getting noise.
 Anyway  I will ask again just in case you missed it before ;) Have you tried increasing the debounce?
 Also are your limits wires shielded and only grounded at the one end?

Hood
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Hood on February 19, 2007, 01:17:16 PM
Another thought, I am  not sure if you have mentioned your hardware but do you use a breakout board? If not have you checked to make sure your parallel port is putting out a healthy 5V rather than the lower voltage that some do?
Hood
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Chip on February 19, 2007, 11:17:46 PM
Hi, moonlightmedia

The view I posted is using NC switch's, it resets the green-red Reset just fine on all screen's hear.

Check all your Input's / All pin Assignments and state's bet you have one of your home/limit pins sharing two functions.

PM me your Phone # Ill give you a call, if in USA.

Thanks, Chip
Florida

Title: Re: Limit Switch Problems - BAFFLING!
Post by: moonlightmedia on February 20, 2007, 08:47:00 AM
Reply to HOOD

Yes, I have changed the debounce settings but upon reflection, perhaps not enough. Is this
setting in milliseconds ? It doesn't show units. I have it set to ten but if that is milliseconds,
it probably should be more like 100.











i
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Chaoticone on February 20, 2007, 08:50:53 AM
Quote
Also add a bit of debounce and see if that helps... 2000 should help if it is a noise problem
This is a quote from Brian in an earlier post to this thread.

Brett
Title: Re: Limit Switch Problems - BAFFLING!
Post by: moonlightmedia on February 20, 2007, 08:55:24 AM
Reply To HOOD

The voltage swing is from .6 millivolts closed to 4.6 volts open. I do not use a breakout board since
the controller is from CNC Hobbies and comes with the appropriate connector structure. I do realize
that this is not a signal isolated interface. If I were designing a controller (I'm trying hard not to) I would
have made these levels with different drivers and receivers and now seeing what is happening, a bit
of hysteresis wouldn't hurt.
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Chip on February 20, 2007, 12:26:38 PM
Hi, Moonlightmedia

Give this XML file a try, maybe there is a problem with your XML.

Copy it to your Mach3 folder, C:\Mach3 is the default location, load it on mach3 startup.

Pins are set as above for X Y Z, limit's and home, need to change motor pins to your's .

Thanks Chip
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Yodawill2000 on February 20, 2007, 05:43:50 PM
I had the same issue and as Hood said raising the debounce fixed it right up !!
Title: Re: Limit Switch Problems - BAFFLING!
Post by: moonlightmedia on February 21, 2007, 09:43:00 AM
At this point, I have several things I want to try and I have some strong suspicions based on what you all
have told me. I will try a higher debounce but my best suspect lies in the noise area. After evaluating my
wiring, I suspect that noise from the motor lines may be creeping in. I can't look at this until the weekend but
I will let you all know how it comes out. Thanks for the suggestions.
Title: Re: Limit Switch Problems - BAFFLING!
Post by: Yodawill2000 on February 21, 2007, 10:45:03 AM
put 1100 in there and I bet ya a donut your problem is solved   ;D

I have shielded everything and a earth ground to everthing and I still had to make that tweak.