I want to acess the value of a variable outside a loop even befor the loop is over So i am trying to creat a local variable and use it to transfer data outside the loop to do processing simulataneously online.
However i am only able to update one indicator outside the loop with the updated variable name..but if i draw a wire from there to do some processing the value in the wire is not updated...
I have tried two versions and updated the same..only one numeric indicator gets updated..numeric2 is always not updated..why?
how can it be solved?
Solved! Go to Solution.
Of course Numeric 2 is not updated continuously. It's only executed once since it's not in any kind of a loop.
You should take the free LabVIEW tutorials.
I understand that numeric2 is not in any loop .
BUt even if i put two loops and try to pass the value from inner loop to outer loop immedieately the data does not seem to be flowing..even though i have made it as a local variable.
please see the attached vi.
Hi siva,
did you read Dennis' message? Have you looked through the free online courses?
When you would have done so, then you would be testing your vi in "highlight" mode. And then you would have seen, that the local is only read once (probably before the inner loop starts). Then it will be read again after the inner loop has been finished...
thanks for the update..But is ther eany other alternative to local variables.?
I did try to acess the free tutorials but i see only getting started stuff and basic tutorials..
siva0182 wrote:thanks for the update..But is ther eany other alternative to local variables.?
I did try to acess the free tutorials but i see only getting started stuff and basic tutorials..
I wrote this Nugget on Action Engines to answer just that question.
Have fun,
Ben
I usually only use to initialize a control on startup not to pass data. We usually pass data through a queue which adds a level of complexity, but gives you control of your data. The problem with locals is if you use multiple locals in multiple places all linked to the same indicator you lose control of data timing. Even worse if you write to it in multiple places. If your just using it in one place in a simple application where update timing and such aren't critical then it should be fine.