08-09-2012 09:19 PM
I know that local variables and value property nodes cause lots of problems.
But if I read the value of a front panel variables from outside a loop,
the value is only read once before the loop starts.
During loop iterations, the changed values of the front panel variable is invisible.
How can I solve this problem?
Solved! Go to Solution.
08-09-2012 09:34 PM
You use the terminal of the front panel control and put that inside the loop.
That's probably not the answer you are looking for. You'll need to post your VI so we can see what you are trying to do and give you ideas on how to do it.
08-09-2012 09:59 PM - edited 08-09-2012 09:59 PM
While a front panel variable is inside a loop, it's not available to other loops.
I want to access the value of the variable in many loops.
And I want to write to a front panel variable in many loops, too.
08-09-2012 10:04 PM
I guess you could use a queue or a notifier (depending on your circumstances).
08-09-2012 10:30 PM
That example you have doesn't show enough information as to what you want to do in each loop, or why they run infinitely. Do you need to read the control in every loop? Assuming you do, using a local variable of the control would not cause a problem.
Local variables are abused when you are trying to read and write to them at the same time in different parts of your program, especially multiple writes, without any control on the order of execution.
08-09-2012 11:20 PM
@Ravens Fan wrote:
That example you have doesn't show enough information as to what you want to do in each loop, or why they run infinitely. Do you need to read the control in every loop? Assuming you do, using a local variable of the control would not cause a problem.
Local variables are abused when you are trying to read and write to them at the same time in different parts of your program, especially multiple writes, without any control on the order of execution.
How about
?
08-09-2012 11:23 PM
@Hornless.Rhino wrote:
I guess you could use a queue or a notifier (depending on your circumstances).
How do you propose I use them?
08-09-2012 11:26 PM
@iCat wrote:
@Ravens Fan wrote:
That example you have doesn't show enough information as to what you want to do in each loop, or why they run infinitely. Do you need to read the control in every loop? Assuming you do, using a local variable of the control would not cause a problem.
Local variables are abused when you are trying to read and write to them at the same time in different parts of your program, especially multiple writes, without any control on the order of execution.
How about
?
You should be more specific when you want to solve any problem. Please do not post very simple question to which the others cannot understand whats in your mind and what you want to achieve. Please explain as much as possible so that you will not be questioned.
Good luck.
08-09-2012 11:54 PM - edited 08-10-2012 12:03 AM
send it like this to multiple loops...."DATA/value IS DIRECT WIRE" to your input
08-10-2012 02:13 AM - edited 08-10-2012 02:13 AM