LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass data out of while loop

How do I pass data out of while loop when the loop is still running? Is there any VI that allow me to pause the loop for a short while to send the data out and then start looping again?
0 Kudos
Message 1 of 4
(3,354 Views)
You won't be able to pass data out of the while loop through a tunnel when it is running. However, another option would be to use local variables. If you only want the data passed out under certain conditions, you could put the local variable(s) in a case structure.
Message 2 of 4
(3,354 Views)
Btw, you would place the local variable(s) INSIDE the while loop (along with any case structures).
0 Kudos
Message 3 of 4
(3,354 Views)
You can get by using a local if,

it does not get written anywhere else
and
you are reading much faster than it will change.

Otherwise,

Use a queue.

A queue will ensure the "reciever" never misses anything that was sent.

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