Hi,
with powerful and fast industrial machines a 'limit event' shuts the machine down instantly and totally.....its a legal requirement.
Thus an opening switch contact will cause all the electrical contactors to drop out, the spindle stops, the axis and spindle brakes come on,
hydraulic pumps stop, coolant pumps stop.....no ifs or buts....no computer required just a safety interlock circuit.
In normal circumstances you hope that a limit switch never activates, if it does, everything stops, often with tool breakage and the part being ruined.
For those situations you simply MUST have separate home switches, otherwise every time you tried homing your machine would shut down.
Remember to satisfy the law you cannot disable the limits under any circumstances.
Our hobby machines are not that powerful or fast and we can probably ignore the safety laws which apply if you are employing people to operate
machines. None the less I still advocate separate switches.
One distinct advantage is that limit switches are situated to activate at the very end of the allowed axis travel, usually that situates the switches at the ends
of the axis. Your home switch does not have to be at the end of travel and may therefore be mounted at a more convenient location with respect to
vulnerability to damage or contamination say. Also it allows you to choose switches which are optimized to the task. For instance I use roller plunger
switches for homing, they allow repeatability of better than 0.02mm but I use proximity switches for limits.
Irrespective of whether you combine limit and home switches or not there are some good precautions to take to avoid noise. Mark has already suggested
screened cable.
Another idea is to have some reasonable current flowing in the circuit at all times, say 20mA. This is another way of saying that a 'moderate impedance limit
circuit is less sensitive to noise than a very high impedance circuit or a very low impedance circuit'.
A high impedance circuit is likely to suffer from 'voltage' or 'displacement' noise whereas vey low impedance circuits are subject to 'induced current'
noise. For instance with respect to the pic attached. With the resistor of 250 Ohm as shown and a 5V supply with the switches closed about 20mA flows through
them. This circuit would still work with a resistance of 25kOhms but the current would now be only be 200uA and therefore much more prone to
capacitively induced noise spikes from an adjacent circuit. Likewise if the resistor is reduced to 20 Ohms the current is now 250mA but is now
subject to magnetically coupled noise spikes from adjacent circuits.
A little capacitance doesn't hurt either, I've shown a 1nF capacitor, you could buy ten of them for $1. You could use higher vales for more noise
suppression but eventually you will cause the speed of response to slow. If you need as much a 0.1uF you should look to find why that other
'bothersome' circuit is radiating that much noise.
Craig