Hi,
that is the absolute standard way to enact soft limits.
Soft limits REQUIRES that Mach knows where it is, usually at the begining of a session, called homing or referencing.
Note this is NOT THE SAME as zeroing your axes.
I will use an analogy.
Imagine you have an automatic lawn mower and you wish it to mow a rectangular paddock. You could put bump sensors
on the mower and allow it free rein, if it gets to a boundary it bumps into it and stops. So long as it doesn't hit to hard
that works. Its a bit like limits in Mach, if you bump into a limit Mach stops. The problem with a plasma table is that the plasma
is electrically noisy and if it triggers a limit mistakenly then Mach, which cant tell it is a mistake so it has to respect the signal and stop,
bugger!
Back to our lawmmower example. Imagine instead that there rock somewhere in the paddock, of course the rock doesn't shift. If we happen
to know that the Northern boundary is 50m away, the Southern boundary is 20m away, the East 55m and the west boundary is 20m away.
When we first start the mower we take it to the rock and tell Mach 'you are at the rock'. As the mower progresses it calculates where it is
relative to its starting position( the rock). Mach would also know how far away each boundary is and can keep a running update.
Thus if the mower is 10m North of the rock and 10m East of the rock and the mowing program says 'now go 50m North and 50m East'
but Mach would know that if it did so it would end up 60m North and 60m East of the rock and therefore out of bounds. The Soft Limits
would issue an error and refuse to execute the move.
Home switches are the equivalent of the rock. Note that it is common for the home switches to be and the end or near the end of an axis but
they don't have to be. Your 'rock' could be at the centre of the table (paddock), it doesn't matter...all that is required is that you know where
the machine boundaries are relative to that reference or home. Note also that the home switch circuits are only accessed when homing, at the beginning
of the session. A noise glitch when homing is happening will screw Mach up bigtime, it might think its at the center of the table (rock) when in fact
its way off towards one boundary. When homing the plasma will not be operating and therefore the chances of Mach getting screwed up by noise
is minimized. Once homing is complete Mach ignores the home switches....after all it can keep a running update of where it is, it doesn't need to
keep redoing it. Therefore if electrical noise afflicts the home switches later in the session, who cares?
I used el-cheapo limit switches on my mill and when I had an upset some of them got wiped out...bugger. What I did was put three good quality roller pluger
microswitches as home switches and use Soft Limits as I have described. I don't have ANY limit switches fitted on my machine at the moment, I rely on
Soft Limits and have done for three years, works good for me. The good quality switches, still only $15US each, allow me repeatability of 0.02mm.
I can have a job in the vice, and get sick of it and end the session. I can come back tomorrow, re-home (reference) and start from where I left off
without touching the job or resetting it, real handy.
So just to be clear...HOME switches allow Mach to accurately and repeatedly find its REFERENCE position where it sets its MACHINE COORDINATES to
zero. When you ZERO your machine you are manipulating the WORK OFFSET so the WORK COORDINATES are zeroed. This may be done multiple times
in a session whereas machine coordinates are zeroed (referenced) just once. Work coordinates are convenient for us but Mach cares about machine
coordinates because that's how it knows where the boundaries are.
Craig