[SOLVED] USB Serial communication fails after repeated queries

Robin2:
My comment was only relevant in the case where the problem is caused by hardware connected to your PC.
You haven't clarified whether this is the case.
You haven't said what other hardware might be connected to the Arduino.
You have said that the Arduino sketch that you posted is sufficient to demonstrate the problem.

Because I have been unable to reproduce the problem without the hardware, I can only assume the hardware is playing a role here. Unfortunately, the problem only occurs with other hardware connected to my PC and when I access all the hardware from my PC application. For example, the 200,000 overnight test was with all the same hardware and software, but the software was only testing serial communication with the Arduino...

I have previously posted what's connected to the Arduino, two custom shields, one providing 5V - 5A regulation and the other is an LED driver. Likely some combination of the hardware is the problem as you stated, I can reproduce the problem with the simple program I've posted.. As stated previously in this thread, the USB hub could be part of the problem...

Robin2:
What happens if they don't get the start correctly?
What happens if the CR doesn't happen? perhaps because of data corruption
With unpredictable problems data corruption must be a serious suspect

I doubt this. What will happen is that the PC will error out if the data supplied back is incorrect. If a CR is missed, a timeout will occur on the PC and the next command will error out, but communication will continue.

Robin2:
Sorry of I wasn't clear. I wasn't suggesting that the 1ms delay was a problem for you. I was suggesting that your code might be a problem for the 1ms delay - if you are sending small packets too often. You haven't said how often your Arduino/PC comms repeats.

I understand now and agree. This is not the case for me. A 10 ms software pause is part of the PC program so this won't happen.