LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring frequency using serial comm vi's

What's the maximum frequency I can expect to measure using the Serial Compatibility vi's? The generic DAQ board (with UART) I'm using is set to 9600 baud. I have a loop of three vi's like this:

Serial Port Write.vi tells the board to read an analog input, then I use Bytes At Serial Port.vi and Read Serial Port.vi to get LabVIEW to read the comm port.

I seem to be able to read 33 Hertz in quasi-real-time and plot it to a graph, but I'm just wondering at what point the baud rate and slowness of the vi's will start to be a problem. Is the bottleneck the 9600 baud or the speed of the vi's? On a side note, are the VISA vi's any faster than the old Serial vi's?
thanks
Richard






0 Kudos
Message 1 of 3
(2,530 Views)
Hi Broken Arrow (goot it is not Broken Hart 🙂

You can go with RS connection spped up to 115200 kbps.
This should increase your limmitation a bit.

Pawel
0 Kudos
Message 2 of 3
(2,530 Views)
Hi Broken Arrow,

This question should be very easy to answer if you have an O'scope handy. Put a probe on both the transmit and recieve lines and run your app as fast as it will go. The scope will show how much of your time is being spent doing the talking. If display shows talking is taking all of the time, then bumping up your baud rate will help.

Without a scope you will have to do some math.

Baud Rate = bits/second

the number of bits per byte is

byte size + Start bit + stop bit + parity

Figure how many bytes sen in each command and query and then work the math. This should consistent withthe O-scope.

Other-wise;
33 HZ on a PC is pretty good. I have a scratch build serial based DAQ system at home (used to control my model train layout)that I have
managed to get about 100 Hz out of, but I never run it faster than 10 Hz (the indeterminism was intolerable).

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,530 Views)