Hi,
I am supposed to read some data from the RS232 port and plot it on the waveform. The data looks like this: (ASCII Strings seperated by return)
134
343
12F
12
...
To test, I wrote a Labview program to send out this kind of data to the RS232 port. It is a for loop and for each loop step, it will translate the data into an ASCII string and send it to the RS232 port. For example, number 48 will be translated to "48".
I made a loopback on the RS232 port, and wrote another Labview program to read the RS232 data in, translate into numerical and plot on waveform. It is a while loop, for each loop step, it will check the bytes on the serial port, if it is bigger than 0, it will read the bytes and translate into number and plot it.
This works fine in loopback mode, it can capture every line of string and plot it perfectly.
But then I switched to the real environment, the data is sent by others, I checked the data by Hyperterminal and it is in accordance with the above format, but the strange thing is that now my receiving program got the data not line by line, instead, it got the data several lines per read. How can this be? And what can I do to make it read line by line while not losing other data? Not every sample data is of the same length.