LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS 232: How to avoid "Queue overflowed" ?

Hello,

I've got a measurement system which delivers 400 values (each of them is a 16-bit-integer) via the RS 232 to the PC. I would like to visualize and record these values.

To get an idea how LabVIEW handles communication with RS 232, I had a look at the example "LabVIEW <-> Serial.VI", which reads a given amount of bytes from the RS 232 and displays the data on the display. The problem is the high transfer rate, which causes the error message x4001, meaning: "Serial port VI error, receiving queue overflowed".

I think I've to use something like a buffer, but I don't have any idea how to realize this in LabVIEW.

Can anybody help me, please ?

Matthias


Thanks a lot, Matthias
0 Kudos
Message 1 of 4
(3,126 Views)
Frankly, I don't think that's the best example for serial communication. One thing to do differently is use the VISA Bytes at Serial Port function inside of a while loop with the VISA read and read until the byte count is zero. You could also enable the termination character with the VISA Configure Serial Port function. At very high baud rates, you'll also want to do hardware handshaking.
0 Kudos
Message 2 of 4
(3,126 Views)
As a first try, I built the attached program:
It should read incoming data from the serial port until "Bytes at Serial Port" gives out that there are just 2 bytes left. All of the values should be stored into an array, I hoped to avoid the queue overflow with it, thinking that the output to the display costs too much time.
Well, the vi doesn't really do what it is made for.
What's wrong ?

I'ld also be interested in examples where VISA is used for serial port communication. The examples in LabVIEW are far too complicated for this.

Matthias
0 Kudos
Message 3 of 4
(3,126 Views)
There are some shipping examples which come with LabVIEW that show how to use VISA in LabVIEW. There are also quite a few of them on NI's website. This is one of them. Check those out. I find them much easier to use than the lower-level serial VIs. They also give you a bit more built-in functionality.
J.R. Allen
0 Kudos
Message 4 of 4
(3,126 Views)