05-07-2008 11:34 AM
05-07-2008 04:26 PM
05-08-2008 03:09 AM
Testing to read data immediately to avoid a buffer overflow fails. At the current baud rate of 9600 there should be plenty of time to empty the buffer before it overflows so I'm back to my original though that this is not really an overflow, but an issue with the serial hardware; perhaps the serial module throws this error whenever it gets a timing problem (Tx/Rx switching etc.), and not just when the buffer actually overflows...
If the Bytes at port property is read just after sending the poll command it returns 64, which is the value it always returns when the following read throws the buffer overflow error.
Here's what I do:
I send a command to my serial instrument connected to the NI9870 and get the correct 7 byte reply...I then wait for 30 seconds to allow the instrument to do a job, and then send it another command. This is when I always get the error. So - it works fine, and then stops with the buffer overflow error...too quick for the instrument to actually reply with more than a few bytes.