I have done all of the above, have the machine on it's own circuit, cleaned switches, unplugged and replugged inside control box, and use the usb that came with the machine, because it fits tight, as you guys may know some usb keys are not that great, and everything seems to be working OK.
I believe you may be correct on the USB issue. While I was doing a test run just now, I slightly touched the USB dive. So little, that I didn't even see it move, the machine immediately froze ad gave the ERROR 21. My worry is that with just the axis movement, it could shake it enough to cause the issue.
I originally thought my error 21 was caused by "dirty" power but then tried holding the USB stick in place and no longer got an error. I purchased another USB stick at the local box store and distorted the male end of the plug ever so slightly with a pair of small needle nose pliers so that the USB stick now fits nice and snug into the machine. Since making this modification I have not had an error 21. Steve
I've had my 1013 for 8 months now and just had my first "error 21" today. I took off the HMI face plate and checked the connections, they seemed okay to me but I am still getting the error. Guess I will disconnect completely and then reseat and see if that helps. Then I'll try some of the other suggestions you guys have made. Thanks, and I'll be back to let you know how it went.
The only time I've had a 21 in my 20 months with the machine was from a poorly seated USB drive. It's a drive I've used for the entire time, my only thing that I can think of is that I just didn't seat it correctly.