# Gecko G540 Limit Switch Wiring



## grepper (Mar 3, 2016)

Gunrunner you need to order a set of these for the Z axis hand crank. Bill did you just spit coffee on your monitor? :rofl:

View attachment 253356


----------



## JimDawson (Mar 3, 2016)

grepper said:


> The Gecko G540 has 4 inputs for limit switches, etc. Seems sort of stingy to me. I take it that for 2 switches per axis, both switches would be wired NC and in series?



You can use just one switch per axis and then install two cams to operate the single switch, one at each end of the travel.  Switch function is setup in the Mach3 configuration menu.



grepper said:


> What does this mean for Mach3? Does Mach3 need a separate connection for each set of limit switches for each axis?
> 
> Does Mach3 need one connection for _each_ switch so it knows what limit it hit and therefore knows what to do?



Not really,  with only 3 axis switches, Mach3 will stop the axis on limit trip.  You can back it off of the switch manually or press Ctrl (shift?)/Jog to back it off of the switch.  



grepper said:


> Could all six (2-X/2-Y/2-Z) switches be wired in series on one connection?



You could do this, Mach3 will stop the machine and you have to figure out which switch is tripped.  This actually might be the best way of doing it, Mach3 would stop all axis on a limit trip.  Doing this would require the use of separate home switches, which are useless on a mill IMHO.



grepper said:


> I don’t know about the relationship between home switches and limit switches either.



Mach3 can be configured to use the travel limits as home switches when a home command is issued.  Having said that, I have no idea why you need a home position on a milling machine.   I always set my ''home position'' (parking position or tool change position) relative to my current work envelope.  The router on the other hand, 0,0,0 is always at a fixed location so I do home it.


----------



## grepper (Mar 3, 2016)

JimDawson said:


> You can use just one switch per axis and then install two cams



Cams?  I don't know what that is.



JimDawson said:


> You could do this, Mach3 will stop the machine and you have to _figure out which switch is tripped_.



Guess that would not require too much figuring.  

BTW, Jim, that pump you made for your coolant system is a work of art.  Really impressive!


----------



## JimDawson (Mar 3, 2016)

grepper said:


> BTW, Jim, that pump you made for your coolant system is a work of art. Really impressive!



Thank you for the kind words.   You can build one too, as soon as you have your CNC running. 



grepper said:


> Cams? I don't know what that is.



Cam, X axis.  Single limit switch, two cams, one on each end of the table.



Cam, Y axis. Single limit SW, one cam at either end of travel.  There is actually a limit SW under all those aluminum chips


----------



## grepper (Mar 3, 2016)

Apparently I am dimwitted.    I don't get it.  That looks like a limit switch tripped by bumping into that rust colored thing.  Is that rust colored thing the cam?  How is that using only one switch per axis?  Wouldn't you need one at each end of the axis travel?  How is that one switch/axis?



JimDawson said:


> You can build one too, as soon as you have your CNC running.



Uh, huh.  I'll whip that off as my first project!


----------



## RJSakowski (Mar 3, 2016)

grepper said:


> Apparently I am dimwitted.    I don't get it.  That looks like a limit switch tripped by bumping into that rust colored thing.  Is that rust colored thing the cam?  How is that using only one switch per axis?  Wouldn't you need one at each end of the axis travel?  How is that one switch/axis?
> 
> 
> 
> Uh, huh.  I'll whip that off as my first project!



The cam is actually a ramp which depresses the roller on the switch.  One is used on each end to trip the switch.  In the Tormach flavor of Mach 3, the E-Stop is tripped and on reset, the mill can be jogged out. 

The switches could be wired in series.  I believe that the homing function would still work as only one axis is homed at a time.  I use the homing function on my machine because it allaws me to shut the machine off and restart without having to re reference my workpiece.  But then, I put in an optical homing system the is repeatable to sub-thousandths.  In my experience, the roller type limit switch w/ ramp cannot be relied upon to better than several thousandths.


----------



## JimDawson (Mar 3, 2016)

grepper said:


> Apparently I am dimwitted.  I don't get it. That looks like a limit switch tripped by bumping into that rust colored thing. Is that rust colored thing the cam? How is that using only one switch per axis? Wouldn't you need one at each end of the axis travel? How is that one switch/axis?



Actually that is a poor picture to show how it works but you got it!  The cams (one at each end of travel) are fixed to the knee, the limit SW is attached to the saddle and moves with the Y axis.  On the X axis, the cams are on the table, and the limit SW is fixed to the saddle.

It really doesn't matter if the cams are fixed or the limit SW is fixed as long as there is relative movement.




grepper said:


> Uh, huh. I'll whip that off as my first project!



Well, maybe your second project.   You need a little bit of practice.


----------



## grepper (Mar 3, 2016)

RJSakowski said:


> The cam is actually a ramp which depresses the roller on the switch.



Okeedohkee, that makes sense.



RJSakowski said:


> One is used on each end to trip the switch



One switch/cam at each end of the axis.  So, two switches per axis, right? 



JimDawson said:


> Cam, X axis. Single limit switch, two cams, one on each end of the table.



How can you have two cams, one at each end of the table, but only one switch?

I'm guessing that by "one switch per axis" you mean two physical switches-cams/axis, wired in series, so they act like one switch?

Am I missing something forehead slappingly obvious here?


----------



## RJSakowski (Mar 3, 2016)

grepper said:


> Okeedohkee, that makes sense.
> 
> 
> 
> ...


One switch.  If the table moves to the left, it hits the left ramp and trips; if it moves to the right, it hits the right ramp and trips.


----------



## grepper (Mar 3, 2016)

Well, huh.  Clever. (slaps forehead!)  Thanks.  Got it.  Geeze.  Duh.


----------

