LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subVI indicator initialize

hello one and all,

i have created a subVI and when the subVI is first created i would like an
indicator to have a value of zero. after that first call, if the subVI is
called again, and perhaps many many times, i want the indicator to have the
previous value from when the subVI was called. everytime the subVI is
called now that indicator resets back to zero. how do i keep this from
happening? i have labview 7 for windows.

lucas
0 Kudos
Message 1 of 3
(2,851 Views)
Hi,
look here

Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 3
(2,850 Views)
ok, i think i figured out a way to save the last value of an indicator and
have that value available when the subVI is run again.

simply create a for loop with a hard-coded count of 1 in the subVI, add a
shift register to the loop. pass the value of the indicator to the right
register and when when the subVI runs again it will pass the previously held
value in the left register, which can then be used by the next run.

that seemed to work very well.

lucas


"lucas" wrote in message
news:uJOdnWTEDO8pfDXdRVn-gQ@adelphia.com...
> hello one and all,
>
> i have created a subVI and when the subVI is first created i would like an
> indicator to have a value of zero. after that first call, if the subVI is
> called again, and perhaps many many times,
i want the indicator to have
the
> previous value from when the subVI was called. everytime the subVI is
> called now that indicator resets back to zero. how do i keep this from
> happening? i have labview 7 for windows.
>
> lucas
>
>
0 Kudos
Message 3 of 3
(2,850 Views)