LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading from the serial port.

How do I know when I have finished reading data from the serial port??
0 Kudos
Message 1 of 4
(2,793 Views)
Hello,

amie wrote:
>
> How do I know when I have finished reading data from the serial port??

Reading from the serial port should not be an isolated operation as your
question implies. You should be able to expect what you will be
receiving.

However, in general, every time before reading the data you should check
for the number of bytes available at the serial port. When you feed this
number to the reading operation, all data is read and you are finished
if no error occured, and if you did not ask for more incoming data. You
can check for number of bytes at serial port again, and verify it is
zero.

If you have no control of the incoming data, (i.e you do not send
commands to ask for data), then you should know what the "end of data
identifier" sent by the
transmitting device is. When you recieve it, you
are done.

Husam Abdawi AL-Mosa
Amman-Jordan
0 Kudos
Message 2 of 4
(2,793 Views)
Which functions are you using to read the port? Serial port VI's or
VISA? If you are not too far into the project, I would recommend VISA.
Also, could you give some specifics on what you are trying to do? There
are many different ways to read a serial port if you are unsure of the
amount of data expected.


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
0 Kudos
Message 3 of 4
(2,793 Views)
Thanks, but I think that I have figured it out now.... Sorry to be a bother.
🙂
0 Kudos
Message 4 of 4
(2,793 Views)