LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

controls default values

At the end of vi execution I would like to make some of the controls actual
values the default value for the next execution of the vi. Does somebody
know how to do that ?

Thanks
0 Kudos
Message 1 of 5
(3,385 Views)
Before stop vi save to file desired values - ini or bin

First run load
1. Set Default value of some control with "Magic value" for example -inf for
numeric
2. Set VI Options Run when opened
3. Check Magic value on Run - if magic is <-inf> load values from file
4. Stop VI
Now VI have loaded last run values, and user can change values and run vi

"Katja" wrote in message
news:B64157D0.144%katia@em2c.ecp.fr...
> At the end of vi execution I would like to make some of the controls
actual
> values the default value for the next execution of the vi. Does somebody
> know how to do that ?
>
> Thanks
>
0 Kudos
Message 2 of 5
(3,385 Views)
Hello Katia,
the first step: right click on control (in diagram) and
Create "Reference"
second step: right click on reference Create Method and choose "Reinit to Dift"

Cheers
Mike Manzheliy


Katja wrote:

> At the end of vi execution I would like to make some of the controls actual
> values the default value for the next execution of the vi. Does somebody
> know how to do that ?
>
> Thanks
Message 3 of 5
(3,385 Views)
There is an example in the KB: defaults.zip that shows how...
kenkm
0 Kudos
Message 4 of 5
(3,385 Views)
> At the end of vi execution I would like to make some of the controls
> actual
> values the default value for the next execution of the vi. Does somebody
> know how to do that ?
With a invoke node referenced to your VI you can set "current values
default".
This only works when the VI is not running. So you have to call another VI,
stop the other one and then set with the second VI the values of your main
VI to default.

Max

-> max.weiss@gmx.de / max@web.de <-
-> Max Weiß * Eulenweg 2 * 76356 Weingarten * Germany <-
-> Fax: 0180 505254775181 * Tel: 0175 1228001 * DB 8 MWE <-
0 Kudos
Message 5 of 5
(3,385 Views)