Hello Guest it is October 15, 2021, 09:54:33 PM

Author Topic: Homing & Limit Switches  (Read 3585 times)

0 Members and 1 Guest are viewing this topic.

Offline NKS

*
  •  9 9
    • View Profile
Homing & Limit Switches
« on: May 23, 2018, 12:38:29 AM »
I know this topic is common and I've tried to do my due diligence in reading related posts.  However, I have not been able to find a satisfactory answer, so here goes:

I have a single switch per axis that I'd like to use as ++, --, and home.  I have three total switches (3 axis) wired in series to a single input.

I can home the machine without it kicking up an e-stop (others have had problems with this).  However, when I hit a limit while jogging Mach throws up "XYZ home tripped, XYZ ++ tripped, XYZ -- tripped, and enters e-stop condition.  That is, I suppose, the correct response from Mach-- but it's not what I want.

I'd like Mach to ignore the sensor as a homing signal when jogging/running g code, and ignore the sensor as a limit signal when homing.

I haven't got there yet, but I also foresee another issue:  When I do trigger a limit switch (which mach sees as both ++ and --) and I going to be able to jog off the switch in the opposite direction?  Or am I going to be stuck in linear motion purgatory, not allowed to move either direction?

Thanks for taking the time to read and respond! 
N



Re: Homing & Limit Switches
« Reply #1 on: May 23, 2018, 12:58:56 AM »
Hi,
a limit switch is to indicate that the carriage is about to fall off the end....unless you want to be really
clever that means a switch at each end of an axis. You could use a switch as a home AND a limit although thats
poor practice. Lots of people do it, it always used to be done that way when Mach was 'small' but doesn't make
sense today.

If you only have three switches (one per axis) consider using them as home switches only. Then you can use 'soft limits'
which is a programmatic way of having limit switches and works pretty well.

Is there some reason you don't want to fit more switches?

All industrial machines will have nine switches, two for each axis as limit switches and another one per axis as a home switch,
three axes, ergo nine switches.

The best single addition to my three axis mill was three nice roller plunger microswitches for which I made little
adjustable ramps to activate them. I can reference the machine to within 0.02mm and thats without 'index homing'.
It means I can be doing a job, turn the machine off half way through, come out tomorrow, turn the machine on,
reference (also called homing), and start from where I left off without having to remeasure  or reset anything, brill!
They cost $60NZD for all three, about $45USD. Best and cheapest mod I ever did.

Craig
My wife left with my best friend...
     and I miss him!
Re: Homing & Limit Switches
« Reply #2 on: May 23, 2018, 01:07:50 AM »
Hi,
you can have the Mach treat the switches as home switches when homing and ignore them as limits and vice versa.
Its just when you are homing you really want protection that limit switches provide, you are more likely to have a cock up
when homing and thats just when you told Mach to ignore limits...really bright!

You can have Mach ignore limits so you can jog back into bounds. If you have individual switches rather than all combined
then Mach will allow you to jog but disable the direction which takes you further into the crap.

What controller are you using?

If  other than a UC100 the you should have plenty of spare inputs, consider 'treating' yourself to one input to one switch.

Craig.
My wife left with my best friend...
     and I miss him!

Offline NKS

*
  •  9 9
    • View Profile
Re: Homing & Limit Switches
« Reply #3 on: May 23, 2018, 01:12:12 AM »
Hiya Craig, thanks for the quick reply.

The reason I don't want to fit more switches is for simplicity sake.  A switch as the end of each axis seems silly when one switch in the middle should be able to do the same job.  Less wires, less money, less things to go wrong...

I don't know why industrial machines use 9 (though I agree, that's also what I have seen), when the same can be accomplished with 3.

I may end up the soft limits route... though having the limit switches would be nice for peace of mind.  I'll surely forget to home the machine at some point...

Cheers.




Re: Homing & Limit Switches
« Reply #4 on: May 23, 2018, 03:02:09 AM »
Hi,

Quote
I don't know why industrial machines use 9 (though I agree, that's also what I have seen), when the same can be accomplished with 3.
Wrong, the same thing cannot be accomplished with three. If for instance you had one switch which activated as a limit, both ++ and --
on one axis when it triggers all Mach knows is to stop. If you try to jog in the + direction by mistake because its going to make it worse then it will let you,
it doesn't know which end the machine is at. Whereas if you had two limit switches (and two inputs) it would know that you had banged into the + limit so it would
let you jog in the - direction but stop you from jogging in the + direction.

Additionally industrial machines are powerful and fast, when you hit a limit the machine powers down, no ifs or buts. It does not rely on a computer to turn it
off, the limit switches trigger the electrical contactor to drop out. Have to for safety, in most countries its probably legally required.

Quote
The reason I don't want to fit more switches is for simplicity sake.
Its a poor excuse but I understand
Quote
Less wires, less money, less things to go wrong...
Less money, less wiring but because you are trying to combine things you have in fact ensured that there are MORE things to go wrong, not less!

Three good quality home switches and 'soft limits' are good. If you have modest steppers then 'soft limits' are probably enough. If your axis motors are powerful
and/or fast, especially servos then limits are mandatory for safety as well. If you chose to combine functions you will end up with less protection and robustness than you thought.

Craig
My wife left with my best friend...
     and I miss him!

Offline NKS

*
  •  9 9
    • View Profile
Re: Homing & Limit Switches
« Reply #5 on: May 23, 2018, 12:18:51 PM »
Quote
it doesn't know which end the machine is at.
But it should!!  If I'm doing a X+ move when it trips the switch mach should know, "hey, I just tripped limit while moving in X+, I can't move anymore in X+, but I can move in X-".

The only thing limiting 3 switches being used instead of 9 is the control software.  Though I do understand the need for "kill" switches on bigger and more powerful machines.

Simplicity is not a poor excuse, it is good design philosophy. 

Re: Homing & Limit Switches
« Reply #6 on: May 23, 2018, 02:28:23 PM »
If you have 1 switch that is used for X Home, X++, and X-- it will do 2 things.  1, It will home when it is in the homing routine, and 2, it will trigger an over travel.  

Although WE know the machine was moving in a positive direction when the over travel has been triggered, the CONTROLLER only knows that an over travel has been triggered.

If you have the one switch plugged into each over travel (X++ and X--) in the config the machine will think it is on both switches.  

« Last Edit: May 23, 2018, 02:32:17 PM by Cbyrdtopper »
Chad Byrd
Re: Homing & Limit Switches
« Reply #7 on: June 02, 2018, 11:10:59 PM »
I have an ESS smooth stepper and C11G BOB.  How do I create more inputs to accommodate that many switches?

Offline NKS

*
  •  9 9
    • View Profile
Re: Homing & Limit Switches
« Reply #8 on: June 02, 2018, 11:31:28 PM »
You can wire multiple switches in series and use one input.  You don't need 9 discrete inputs.
Re: Homing & Limit Switches
« Reply #9 on: June 02, 2018, 11:46:17 PM »
Hi,
NKS is right, you can combine switches to reduce the number of inputs required, usually with a modest loss of functionality.

The ESS has three ports. With a second or even third BoB you can have multiple inputs. You may have noted in the ESS setup screens the option of declaring pins 2-9
in ports 2&3 as inputs rather than their default as outputs. This means that the two ports provide 26 inputs and 10 outputs.

I have two BoBs attached to my ESS to gain the extra inputs, its easy to do and such a luxury. Combining limit and home switches as NKS proposes is apt to confuse you
if not Mach and the first time you recognize a fault in your logic or perhaps a hardware fault like noise or a broken wire is when the carriage sails off the end breaking stuff as it goes.

Craig

« Last Edit: June 02, 2018, 11:51:40 PM by joeaverage »
My wife left with my best friend...
     and I miss him!