Discussion:
How do I update individual values of array using local/global variables?
(too old to reply)
Wan81
2008-08-07 08:40:17 UTC
Permalink
Dear labview experts,
 
I have a problem with updating of variables on different frame sequence.
 
In the image attached, the first frame sequence creates the 10 by 10 array of random numbers and this is being updated onto the array indicator. However, how do I achieve resetting the array all to 0 on the 3rd frame sequence before exiting?
 
I am trying to incorporate this idea into my other VI which I am currently doing and this is a simplified version of my problem. I was thinking of using local or global variables but how do i do this?
 
Please help. Thanks in advance.
 
 
devchander
2008-08-07 09:10:09 UTC
Permalink
You mean you want to display 0's in the array indicator before exiting/stopping the VI?
Is that it??
 
If yes,
Just right clicking on the array indicator>>create>>local variable, initialize an array of 0's and wire it to the local variable
If u want to just empty that array indicator, just connect an empty array constant
 
To learn how to use Varibles, look at example VI's shipped with LabVIEW Find Examples>>Fundamentals>> Local and Global variables folder
Hillman
2008-08-07 09:10:12 UTC
Permalink
Hi Wan81
 
Heres a quick example I pulled together of what your talking about attached. You'd probably like more control over the elements you alter - but i'll leave that you to you.
 
And as devchander says, resetting an array with zero is spot on.
 
Also, like devchander says, what did you mean by 'I am trying to incorporate this idea into my other VI which I am currently doing and this is a simplified version of my problem. I was thinking of using local or global variables but how do i do this?'
 
Again, the other posters advice is good - look at the examples they are mega.
 
Thanks,
 


array example.vi:
http://forums.ni.com/attachments/ni/170/347408/1/array example.vi
Loading...