View Single Post
  #3   Report Post  
Posted to rec.crafts.metalworking
Tim Wescott Tim Wescott is offline
external usenet poster
 
Posts: 1,620
Default Mach3 user - how do home switches work?

On Sat, 24 Mar 2012 21:42:00 +0800, Dennis wrote:

I've got a problem I cant seem to sort on my little DIY CNC router, my
limit switches don't work!


1) I've installed limit / end of travel switches on the x,y & z axes. 2)
The switches are wired in series and wired to input 10 and enabled. 3)
The switches are all normally closed, the input goes hi when switches
operate.
4) In diagnostics I can operate any of the switches manually & the
program senses it ok.

But.... when I jog any axis or run some code to move an axis, operating
any of the switches does nothing. I expected the motors to be disabled
when I operated a switch.

I've tried inverting the active level of the switches (ie hi/low active)
and have tried changing just about every other setting.

I've watched a couple of the mach3 videos (which have taught me a lot)
but cannot find out what the problem is.


There are two reasons to put switches at known locations in the travel of
an axis:

1: to keep from crashing the axis into something hard.
2: to let the controller know where home is.

1 and 2 are two different things, and on anything high performance,
implementing 1 so you don't waste a whole bunch of travel is difficult or
impossible.

If your software is really using the switch as a _home_ switch and not a
_limit_ switch, then it will only pay attention to the switch when it is
homing -- and the homing algorithm will be something like "move the axis
toward the home switch at a known safe speed until the switch opens,
reverse direction and move _really slowly_ until the switch closes, then
call that spot 'zero'".

And, if your software is really _just_ using the switch as a home switch,
then it'll happily go "past zero" in normal operation.

Trying to implement a "don't crash" limit switch when you've got a motor
that takes a while to stop even at maximum opposite current is a pain in
the behind, because the mechanism _will_ keep moving for a while after
you slam on the brakes when its going fast, but if you approach the
switch slowly you'll need to power it in the desired direction to get it
to finish up. About the only way out of that quandary is to have a
normally-unused "shut-down lane" -- and who wants to pay for unused
travel in their machine?

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
Why am I not happy that they have found common ground?

Tim Wescott, Communications, Control, Circuits & Software
http://www.wescottdesign.com