LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

capturing streaming serial data

I have a device that collects data on a sensor and streams information on an RS232 cable to my machine.  When I use the VISA read operation, I can see data is being read, but I get a buffer overrun error since the data is constantly streaming to my machine.  I am used to doing VISA write then VISA read type programs, but never have dealt with constant streaming data.  How can I collect streaming data on the COM port?
 
thanks in advance.
0 Kudos
Message 1 of 3
(2,976 Views)
Hello,

You may want to look into flow control.  There's a great knowlegebase, Serial Communication with Software Flow Control, that explains how to do flow control in LabVIEW.

Thanks,

Meghan
Applications Engineer
0 Kudos
Message 2 of 3
(2,942 Views)
The easiest way to stream data is to configure your serial port outside of a while loop.
Use a "bytes at port" wired to a visa read inside the while loop.
Close the serial port on the other side of the while loop.
 
You should put a wait in the while loop so you don't hog your CPU.  Only needs to be a few mSec.
 
If you need to do any data processing you might what to use a producer - consumer design pattern.
 
Good Luck
0 Kudos
Message 3 of 3
(2,929 Views)