Hi Troy,
I think I was mistakenly thinking when you said "Spindle Runaway" that it was accelerating up to full speed. But I'm thinking now you simply mean Z stops and the spindle continues forever which would be as exactlly expected if feedhold stops Z and the Spindle runs until Z reaches some point. Is that correct.
I like all of mmurray70's points and ideas.
I think the coasting and manual movement causing an unexpected Spindle reversal and startup could be solved by adding a check that the Spindle is on before reversing. ie change:
if (chan[ZAXIS].Dest <= StopPoint) // If stoppoint Reached
to:
if (chan[ZAXIS].Dest <= StopPoint && ReadBit(SPINDLECW)) // If stoppoint Reached while being driven CW
It might also be necessary to check for coasting and manual movement to the finish point of the Tap which could cause the GCode to expectantly continue on with the Spindle Off and such. So similarly change:
if ((chan[ZAXIS].Dest > Z0) && (StopPointReached == 1)) // If Tap is out of hole and stop point has been reached
to:
if ((chan[ZAXIS].Dest > Z0) && (StopPointReached == 1) && ReadBit(SPINDLECCW)) // If Tap is out of hole and stop point has been reached and being driven CCW
Regards