LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get value out of while loope, before while loope is finished

Hello developers!

I am a novice with LV.
I am trying to regulate a current that is passed through coils, until my measured magnetic field reads 0. I do that with a while loope, that is running inside another while loope.
Now my problem is, that I have to pass a value (Boolean) from the inner while loope to the outer loope, BEFORE the inner loope is finished.
I tried local and global variables, and tunnels - needless to say - none of them worked, BEFORE the loope was finished.

Every advice is appreciated.
Thank you,
Florian.
0 Kudos
Message 1 of 3
(2,897 Views)
You can pass a value from a while loop with a local variable but if you've got nested while loops, the outer while loop will not be able to do anything until the inner while loop stops running. You might need to do something with parallel while loops instead of nesting them.
Message 2 of 3
(2,897 Views)
By using the global and local, actually you can pass the value but it just that it is not executing the passed value.

LabVIEW will first finished executing the inner loop first then it will go to other tasks. Why you use inner and outer loop?

If you want to pass the value before it finished, my suggestion is you run your two while loops in parallel. Then you can pass the value by using local or global variable and they can execute synchronously.
------------------------------------------------------------------
When you feel sad, laugh
Message 3 of 3
(2,897 Views)