LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS 232 and while loop

Hello,

 

In the labview: Is it possible 'while loop' running on KHz speed?.

 

Only read VISA VI (Baudrate:115200) will be in while loop.

 

Thanks.

0 Kudos
Message 1 of 6
(2,353 Views)

Umm.. what? Are you asking how fast a while loop can run? The answer is that it depends on what's inside, and whatever else your computer may be doing at the time. A software-based loop cannot be controlled precisely since the OS can take control of the system and do whatever it wants. You said you have a "VISA VI". Which one? Is it just the VISA Read? What are you doing with the string? Are you converting it to a value and displaying it on a single numeric indicator? Graphing it? Accumulating the value into an array? The baud rate has no bearing on the speed of the loop since the baud rate will control how fast the characters are sent over the serial bus. VISA Read has to get the information out of the operating system since the data is in the UART that's on whatever serial interface device you're using. So, is it possible to get kHz? Probably. I doubt you'd get high kHz out of it, though.

0 Kudos
Message 2 of 6
(2,333 Views)

If you style yourself an expert, how is it that you don't know how to spell LabVIEW?Smiley Wink

0 Kudos
Message 3 of 6
(2,327 Views)

The serial port sub system in Labview also include a buffer. You do not read directly from the serial port, but the buffer. The buffer size is if I remember correct 2K bytes by default. But you can set the size in software. However why are you asking this question. Why do you want to run your loop that quick. Also remember that standard Labview run on MAC/Linux/Windows platform. Is not suited for realtime applications at all



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 6
(2,320 Views)

Hello Knight,

 

I will run this while loop dynamical and it will contain only read VISA vi  and string output, encoding will be done in main vi. However, I am expecting to continuously acquire serial data on 10 KHZ speed i.e.. data logging interval will be 100 microsecond.

0 Kudos
Message 5 of 6
(2,299 Views)

There is no way you can log data at a rate of 100 microseconds.  Nor is there any reason you need to.

 

Don't confuse the baud rate of the serial port with how fast the while loop needs to run.

0 Kudos
Message 6 of 6
(2,296 Views)