Hello Valk,
I'm not sure that I fully understand your problem. From what I understand, you're not using a termination character, so you must be reading a precise number of bytes into the program off of the port. The program does not see the data the first time, but if you run it again, then the data is available?
If you are sure that the data made it into the port, the serial hardware and kernel-mode driver is responsible for delivering it to higher level serial drivers and the LabVIEW software buffer. If you could provide more detailed information about your problem, that would be helpful. From what you have told me, the only thing I can come up with is that possibly the port is not opened when you receive data on the port. If this is
the case, you will not get the data into LabVIEW.
Consider the following set of events:
-You recieve data1 on the port.
-You open the port
-You receive data2 on the port.
-You do a "read" on the port
After this, your read will return only data2, not "data1 data2" as you would expect. This is because anything received on the port is discarded while the port is closed.
Perhaps this is applicable in your case. If not, please describe in more depth the set of steps that you are taking to read the data and describe the data that is expected but not received.
Thanks,
Scott B.
Applications Engineering
National Instruments