From my research, your symptoms seem consistent with EMI noise. Without knowing your whole setup, it is difficult to know for sure. Is there a condition or sequence of events that it always occur? Does it occur when the spindle motor/VFD is off or on?
The biggest culprit for noise is the VFD. It is advised to put an EMI filter between your main power supply and the inputs of your VFD to prevent noise from bleeding back to the power supply. If your computer is on the same circuit as your VFD, then the noise can definitely reek havoc.
The next thing is to be sure your shielding is grounded. All signal carrying wires should be shielded with proper grounding. The description of the PMDX-424 says the USB port is isolated electrically. This by itself should help with EMI interference, so I suspect there is a strong EMI source somewhere.
Lastly, be sure no signal wires run parallel to any power carrying wires. If they need to cross, cross them with a 90 degree joint and if they need to run parallel, be sure they are separated the recommended distance or run them in separate conduit. My experience with EMI is limited, and there are plenty of resources on the internet on the effects of EMI and how to minimize it.
Hopefully, this is the issue and you can easily correct it.