Hello,
It is possible that you are only reading up to a termination character in the read buffer, which would make it appear as though you are only receiving half the data. What termination character have you set (if you are using termination at all)? It sounds like you may be performing a loopback test; if not, to verify things are working correctly, simply open, write, read, and then close a given serial port, where you have connected pins 2 and 3 of the serial cable connected to the serial port. This way you should read back exactly what you wrote. Try reading precisely the number of bytes your write, and don't include termination characters in the write string; you should get all the data. Now try writing once, with some text separated by a termination character (with termination enabled) and you should be able to perform multiple reads, where the data remaining each time will be all that came after a given terminataion character, but it is not lost until you empty the buffer or close the serial resource.
It seems like you may be having this subtle termination and read issue; feel free to get back to me if you have further questions. Also, you seem to be using a serial specific API and not NI-VISA; can you attempt to use NI-VISA?
I look forward to your repost!
Best Regards,
JLS