Hi,
There's absolutely nothing wrong with a controlled rapid stop, it's exactly what you want when you see something going wrong and you want it to stop without losing position.
Correct, the operative words there are
controlled stop. But Mach 3 and 4 have
never done a controlled stop with the <Stop> button, a <Stop> command
causes a crash stop. <FeedHold> is the controlled stop, and always has been.
I can't see how the ESS would lose counts. If Mach4 outputs a position move, the ESS surely just outputs whatever it's been told. Why would you lose anything?
Try this thought experiment:
1) Mach gets a G1 X300 F300 instruction (mm units)
2) Machs trajectory planner issues 1ms time slices of approx 300/60/1000=0.05mm X movement per slice, neglecting accel and deccels.
3) The time slices get queued up in the ESS, typically 150 slices or 150ms worth of movement.
4) The ESS generates the pulses required for the stepper or servo to advance 0.05mm and then discards the slice.
5) The ESS will process the next slice in the queue.
Note that Mach being a Windows application is not realtime, that is to say Windows will be busy doing something else and will not fill up the
buffer immediately, but that's OK, the ESS has a 150 or so to go on with. Surely Windows and Mach will be back to issue more slices long before
the buffer runs out.
6) If you now hit <Stop> the trajectory planner issues a crash stop command and all pulses from the ESS stop immediately. Any movement instructions
queued up in the buffer are lost. There might have been 140 slices of 0.05mm each in there so Mach thinks the machine is at point Y but the ESS has not
enacted those steps yet so the machine will lag 140 x 0.05=7mm behind.
This is an essential piece of understanding with any Windows CNC software, movement must be buffered so that Windows can go away and do other stuff,
and yet the motion controller has data enough to carry on what it was doing. If the motion controller runs out of data the machine stops and cannot
simply be restarted as any new motion time slices would require infinite acceleration. You may have seen such 'Run Out Of Data' errors from
time to time, it's what happens when the ESS runs out of time slices.
If the machine is idle then all the time slices will be the same , ie no motion between slices, so if you hit <Stop> then it would not matter if slices
were discarded, the machine and Mach agree as to where the machine actually is.
Why has this been changed? it makes no sense to keep changing things that worked perfectly well before!
It hasn't changed, Mach3 was and is still like this, and Mach4 has always been that way also.
The correct way to stop the machine without loss of position is to use <FeedHold>. With that instruction whatever movement in the ESS motion
buffer is executed and THEN the machine stops, or rather enacts a whole stream of zero movement time slices. Thus once the machine stops
the ESS has executed all the time slices that the trajectory planner issued and so Mach and the machine are in agreement.
I never use <Stop>, I always use <FeedHold>, then once the machine is stopped, THEN use <Stop>.
Craig