LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making Current Values Default While VI is Running

Is there a way to 'make the current values default' while a VI is running?
0 Kudos
Message 1 of 4
(2,511 Views)
Yes, you have to use property nodes. This will only work in the development
enviroment. If you compile into an .exe it won't work. This was discussed
last week or the week before on this group. Search using keywords from your
subject line, i'm sure you'll find alot of info. I also created a sample
of how to implement this in an .exe. If this is something you would like,
email me and i will respond with it attached.

Jared

"Peter T" wrote:
>>Is there a way to 'make the current values default' while a VI is running?>
0 Kudos
Message 2 of 4
(2,511 Views)
Uh.. perhaps I missed this. Certainly you can set default values via
property nodes, but I was under the impression only for a VI that isn't
running or locked for running- i.e. in the hierarchy of another VI that is
running. Am I mistaken?

Hence a VI can load settings into another VI's front panel controls, set
them as default and then use an "invoke node" to run the VI, but there's no
way a VI can set its own front panel defaults unless you use some horrible
method whereby it launches another VI, via "invoke node" since the
hierarchies must be independent, the other VI aborts the first, sets the
font panel defaults and then relaunches it, using "invoke node" before
killing itself.

jared wrote in message
news:3a8d3384@newsgroups.ni.co
m...
>
> Yes, you have to use property nodes. This will only work in the
development
> enviroment. If you compile into an .exe it won't work. This was discussed
> last week or the week before on this group. Search using keywords from
your
> subject line, i'm sure you'll find alot of info. I also created a sample
> of how to implement this in an .exe. If this is something you would like,
> email me and i will respond with it attached.
>
> Jared
>
> "Peter T" wrote:
> >>Is there a way to 'make the current values default' while a VI is
running?>
0 Kudos
Message 3 of 4
(2,511 Views)
You know, i try to read these posts really quick because i do this at work
(my boss doesn't mind because i learn things too). Anyway, my dyslexic mind
interpreted the subject line as initialize to default values. Sorry. Craig,
i think that's twice you corrected me. Thanks.

But now i have a question. Why would you want to set the current values
to default? So after stopping then re-starting the program it starts with
the last know values? (i know, thats really 2 questions). The way i do
this is to use the simple configuration read and write vi's to some ini file.
On program close, write the values. To make sure this is done, take the
stop button away from your users and use a front panel quit button that will
execute the write code before calling labview exit. Obvisously, on program
start, read from this file to return your controls to the last know states.
Hope this helps, sorry for the confusion.

Jared

"Craig Graham" wrote:
>Uh.. perhaps I missed this. Certainly you can set default values via>property
nodes, but I was under the impression only for a VI that isn't>running or
locked for running- i.e. in the hierarchy of another VI that is>running.
Am I mistaken?>>Hence a VI can load settings into another VI's front panel
controls, set>them as default and then use an "invoke node" to run the VI,
but there's no>way a VI can set its own front panel defaults unless you use
some horrible>method whereby it launches another VI, via "invoke node" since
the>hierarchies must be independent, the other VI aborts the first, sets
the>font panel defaults and then relaunches it, using "invoke node" before>killing
itself.>>jared wrote in message>news:3a8d3384@newsgroups.ni.com...>>>>
Yes, you have to use property nodes. This will only work in the>development>>
enviroment. If you compile into an .exe it won't work. This was discussed>>
last week or the week before on this group. Search using keywords from>your>>
subject line, i'm sure you'll find alot of info. I also created a sample>>
of how to implement this in an .exe. If this is something you would like,>>
email me and i will respond with it attached.>>>> Jared>>>> "Peter T"
wrote:>> >>Is there a way to 'make the current values default' while a VI
is>running?>>>
0 Kudos
Message 4 of 4
(2,511 Views)