Generally the philosophy behind the E-stop circuit has been for initially the protection of the operator, followed by protection of the machine itself, if one is building/retrofitting a machine for one's own use then pobabally anything goes, but if you are retro-fitting for a customer or have employees that are going to use the machine, then it would be a wise decision to look at the state & provincial codes and recommendations for legal reasons.
In the states there is the OSHWA and the NFPA regulations to consider, in Canada, there is usually Provincial regulations.
Going back to the original question, I tend to stick with the NFPA guide lines and use hardwired E-stop control and have software input to acknowledge the E-stop, rather than have the E-stop software originating it , which goes against the code.
First I set up an E-stop relay circut that has contacts to switch the servo amplifier-enables as well as remove the amplifier power, this relay would also control the spindle, and depending on what type of spindle would depend the degree of control i.e. standard AC induction motor, DC or AC Electron control or VFD. all require a different approach.
I also include the Watchdog relay on the Galil card in the E-stop string and the amp enable outputs on the Galil can be included AMPENX,Y,Z etc , Also I use the E-stop relay to switch off the power to all the logic outputs, the inputs I keep powered for diagnostic purposes especially if these are low voltage (5v to 24v ) type.
An input (e-stop) can be fed into the logic indicating a E-stop exsists, which inturn would be included in the FeedHold logic. And any other logic that was deemed necessary including issuing a Alarm message.
In some amplifiers such as DC & AC servo's, removing the DC power is not always sufficient to stop the servos as the DC supply remains charged for a period of time and can allow servo movement until the DC has decayed, that is the reason for also using the amp enable signals which most amps have.
Remember in an emergency the E-stop button is smallest button on the panel
Al