Hi,
it is common to use a limit switch as a home switch also on an axis.
Take say the X axis with two limit switches, one at each end. Lets say the leftmost one is X-- and X Home and the rightmost one is X++.
Your Soft Limits on the Homing and Limits page would be 0 (0 being home AND X--) and X++=400mm for an X axis of 400mm travel.
Imagine you have only one switch, a home switch on the X axis. Lets say that it is 100mm from the lefthand extreme of the axis. Your settings on the
Home and Limits page would be X-- = -100 and X++=300mm. Note the travel (400mm) is the same in both cases its just that the zero point is somewhere
in between the left and right extremes of the axis.
You want to program limits into your fifth axis. On Machs General Setup Page check that the fifth axis, B, is in angular units and also that rotational
soft limits are engaged. I suspect you will want Rotational Rollover unchecked.
If you have one B axis switch at the center point of rotation (home) then your softlimits would be -100 and +100. If you had two limit switches at each end of travel
with the home at the ccw end then the limits would be 0 and +200.
Provided you reference (home) your machine when you turn it on prior to use and your soft limits are set correctly they work pretty well. Mach will refuse,
in fact throw an error, if the Gcode or jog inputs attempt to cause an axis to go out of bounds. If you forget to reference (home) your machine then its
entirely possible for your machine to go out of bounds because you forgot to tell it where it was at the start, so even having the boundaries correct doesn't
help because it didn't know where it is to start with.
The safest method is to have limit switches, one at each end of travel. Most high speed industrial machines have separate limit switches like that, it means that
if any one of the switches is activated the machine is shut down.....no ifs....no buts.....completely de-powered, its a safety measure. Such a machine will have
soft limits as well set to go off before the machine touches the physical limit switch. The idea is that 99.9% of the time the machine will work within the soft limit
boundaries and only as a result of some dangerous failure will the limit switch activate, and to comply with safety laws shut the power off.
Craig