Look here...
https://www.cnczone.com/forums/syil-products/409310-cnc-post2399092.html#post2399092

Probably something wrong in Emergency Stop wiring. The silly spindle cover switch is the first place to look.
Also aging ES switch contacts get crappy, too. Add a 0.1uF cap across the switch to keep it clean.

Only use ES in emergency. High surge currents in motor drive board occur when ES released after a stoppage.
NEVER use it to just stop the machine. You WILL be sorry, in time.