My lathe has a vfd which can't be speed controlled from the cnc. I have wired the standard no volt contactor in series so hitting the stop button just removes mains from the vfd which stops the spindle quickly. I also have a mains isolating device connected to the vfd input which outputs an open collector logic level to the estop input to halt axis movement. So this leaves the controller running but just in the estopped state so I don't have to reinitialise it and reload gcode and stuff. This works fine.