From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access values outside a while loop

Hi all,

 

i have a control inside a while loop and I want to access its value outside the loop while the loop is running. I have tried using a local and global variables of the control . They work fine if i read these variables inside another while loop. Is there any way that I can read the variables without using a while loop???

 

thanks

0 Kudos
Message 1 of 2
(2,401 Views)

Can you post your VI?  It will make it easier to compose an answer that directly relates to your situation.

 

You say "They work fine if i read these variables inside another while loop".   The local variable is only going to be read whenever the order of execution gets to it.  If it is outside a while loop, it will only get read once.  Unless it is in another structure that is delaying the execution of the reading of that variable, then it will get read in the very beginning of the program to never be read again.

0 Kudos
Message 2 of 2
(2,396 Views)