Hello,
I am not sure I understand exactly what you are seeing vs what you would like to see as far as data concerned, however, here are the players involved with serial reads:
Your read operation will terminate on one of 3 conditions, whichever occurs first:
- you receive the number of bytes specified to the read function
- you receive a termination character (and you have termination enabled)
- you receive a timeout error due to the amount of time specified for the timeout having expired before the other two above noted conditions occurred.
In general you have flexibility in reading data received over the serial port. The UART (a part of your serial port) takes care of receiving the data and the OS (and LabVIEW) takes care of getting that data into memory accessible by LabVIEW. So your data will be sitting in local memory on your computer waiting for you to read after it has been sent. You can then read it based on the 3 conditions above. That is, if you expect to receive a block of data, and then a termiation character, you can read a large number of bytes and your read will stop when it sees the termination character. In this case, if your data is sent in binary form you'll need to be weary of the possibility that one of the bytes sent for data may be the ascii equivalent of your termination character; this could cause you to stop reading a block of data prematurely. On the other hand, if you know you are receiving a block of data of a given size, then you can simply read the specified number of bytes you know you will receive (and even disable termination to remove the possibility of an accidental termination as discussed above).
It sounds like you are encountering a problem described by the behavior noted above. Hopefully applying the noted ideas will enable you to get your data more easily!
Repost if you are still having trouble and be sure to be as specific as possible about the format of the data you are trying to receive.
Best Regards,
JLS