Hello Guest it is March 28, 2024, 06:07:03 AM

Author Topic: Limit Switch Request  (Read 7038 times)

0 Members and 1 Guest are viewing this topic.

Limit Switch Request
« on: October 31, 2006, 10:53:44 AM »
I recently installed limit switches on my table. They seemed to work just fine until I included them as a part of the homing limits. One of them keeps tripping during a job (according to the status report), well away from the limits. It is usually unrelated to large or particularly fast motion, so it is probably noise. I bumped up the debounce from 1 to 2 milliseconds, and it still trips about as often. I could probably safely go to 10ms on the debounce, but I wonder if that will help. I installed 0.1 UF caps on them but have not tested them yet.

Program change suggestion:
It would be nice if the program status indicated which limit switch tripped, so I had a starting place to look, or if there was any consistency involved.
It would also be nice if the reports indicated which line of G-Code was being executed when it tripped.

Any ideas?
Thanks.
Bill
Pixel Tamer

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Limit Switch Request
« Reply #1 on: October 31, 2006, 11:22:08 AM »
Hello Bill,
    What kind of switches are you using? Are they mechanical contacts, proximity, etc.? Can you give us a screen shot of you ports and pins, and Homeing/Limits?

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: Limit Switch Request
« Reply #2 on: October 31, 2006, 11:23:09 AM »
Hi wvancura....  I had a similar problem that you are having, and  I placed .047uF caps across all my limit switch inputs to eliminate noise from the steppers. This worked just fine for me.

How were you able to change the debounce delay? Is that function in MACH?

Thanks!
Some people are like a Slinky -- not much good for anything, but it brings a smile to your face when you shove it down a flight of stairs.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Limit Switch Request
« Reply #3 on: October 31, 2006, 11:46:24 AM »
You can change the debounce in Mach. It depends on the version you are running as to where it is at. In the latest, it is in config., general config. I run the 1.84 lock down. I think it is in config., logic in this one. I have mine set to 1000 although I had no problems at 0.

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: Limit Switch Request
« Reply #4 on: October 31, 2006, 01:52:00 PM »
Hi,
I am using version 2.0 as of about a week ago. I am using new mechanical snap action microswitches with an 8 oz activating force.  The software has a debounce function in it accepting a number times 40 microseconds. I started with 25 (1 millisecond) and then went to 50 (2 ms).  I have a strong electronics background and understand its purpose, and I do not want to delay more than 10ms before tripping. These switches should be very reliable at 1 ms debounce, providing the debounce algorithm is good. Unfortunately, all of the switches are mounted on mobile surfaces. Both Y and Z should be impervious to shock and vibration because of their orientation with respect to their activating axis and sources of vibration. X is mounted with a worst case orientation and is located near the screw where acceleration would be maximized. I will look here first. I operate using the constant velocity mode and was running this job at 40IPM cutting wood with a 3/32 bit

I ran a small number of jobs without also using the switches as homing switches. When I enabled homing and limit to the same switches, troubles seemed to begin. It is possible that the other jobs did not have as many hard turns in it. As I said before, I have not had a chance to test the capacitors I have added, nor have I reverted to eliminating the homing function.

The attachments should show that the setup is pretty mundane.
If the software were to indicate which switch tripped, then I could validate my theory about switch X.

Capacitors should cut down a lot of motor noise, but I think if motor noise was the culprit, that the switches, depending on the debounce algorithm, may never trip because the debounce circuit might never validate.
Pixel Tamer

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Limit Switch Request
« Reply #5 on: October 31, 2006, 02:05:25 PM »
Is your backlash comp. enabled? Mach does not like CV mode and backlash comp. Have you tried the run with soft limits disabled?
;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: Limit Switch Request
« Reply #6 on: October 31, 2006, 02:20:21 PM »
Backlash is OFF. I can't see any advantage to using it. There is a little slop in the system (0.001) but it is not enough to worry about yet. Flexing is a bigger problem that backlash wont fix.

Pixel Tamer

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: Limit Switch Request
« Reply #7 on: October 31, 2006, 04:14:44 PM »
Hi, Bill

I see your using NC switche's, that's good, once you get this straitened out you can connect them all in NC- series (NO - parrel)  and save 2 Input pin's, Mach nows the diff. .

As far as trouble shooting, Disable 2 of your axis inputs, xy test z, xz test y, yz test x.

Disable Port's Pins Input's, by  setting Port #'s  to 0, check Emulated for axise's to disable.

Or Gnd the input pin's 2 at a time and check.

Checked the Resistance at the connector for possibly a hi-Resistance switch / wire, ref Gnd. ?

Swap to different input pin #, flaky printer port.

Doesn't make sense to me just adding Home feature would do this. 

Are you using a Opto-Isolated interface board or Direct-connect. ?

Hope this Helps, Chip
Re: Limit Switch Request
« Reply #8 on: October 31, 2006, 10:57:42 PM »
Ran a small test run this evening and the 0.1uf capacitors seem to have helped. I could feel the head doing a lot of hard turns. The X axis relay was probably chattering. I am surprised that the digital debounce didn't handle it better.

Normally closed is the only safe way to go. I require it of all of my process controll customers.

If I use only one relay, can it also do a homing correctly?

The cube was my test run. It is made out of pine, one inch square, cut with a 3/32 bit, and is poorly centered. I need more practice. on alignment

One more question, is it possible to have a single push button do RUN/PAUSE? Hold it down for RUN, let go for PAUSE.
Thanks
Bill
Pixel Tamer

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: Limit Switch Request
« Reply #9 on: November 01, 2006, 12:58:08 AM »
Hi Bill

Glad to see you got it running, Yes for 3 axis 1 pin using 3 micro-switches, NC in series works for Limit's and homing.

When homing generally the sequence is Z then Y then X, Mach's just looking for a switch to open then moves to the next axis.

After homing thay revert back to limit function.

Yes you can use 1 pin for 2 functions (certain function's)

For a remote jog pendent I use the following.

I use pin 10 to select MPG Mode (327) and Step Jog Mode (275), switch closed one function, switch open the other, and pin 11 NO swithc to toggle MPG 1 (175) through X,Y,Z,A, Axis's.

Go to Tutorials / Documentation / scroll down to MachCustomizeWiki / scroll down Contents / 9,3 OEM Buttons, you'll See Function and OEM Code #'s

Are you talking about Start (1000) and FeedHold (1001) 

Explane exactly what you want to do, If I can't help someone else will, there are so-many features with this program it's hard to be on-top of all of it.

Hope this Helps, Chip