Sounds like you have a noise issue if only happens when spindle starts. Does the control software have an option to apply De-bounce filtering to the inputs.?