LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically change default value of a control

I would like to set my Front Panel such that every time I change a control, that value becomes the default value.  I have many controls in a large program that requires me to reset each one every time I reboot.  Otherwise, if there is a way to press a button that pragmatically sets a collection of controls' values to be the default values.  Is there a way to do this?
0 Kudos
Message 1 of 7
(5,402 Views)

There is a property invoke node for the vi class 'make current values default'. This is only available in edit mode.

The professional way would be to store all data in a file and load it when running the vi. Check out on OpneG.org for some tools that help you saving the data into a config file.

 

Felix

0 Kudos
Message 2 of 7
(5,391 Views)

Yup, choose an invoke node, right click select class->viserver->vi

 

then left click and choose make current values default. Just put this at the end of your code before the program closes

 

Edit: I lost the race to the answer:)

 

Here is a link though to a nugget ben wrote about setting default values using the config file method metioned above. Some of it is a bit in depth but it gives you an idea of the way to do it if you are not running the VI in edit mode.

Message Edited by for(imstuck) on 11-13-2009 04:14 PM
0 Kudos
Message 3 of 7
(5,390 Views)
Ok.  Is this the same as selecting it from the drop down menu?  Because when I did that, it also set the indicators and graphs to default the current value too.  That is not something that I want to happen.  Is there a way to pick and choose which values get set?
0 Kudos
Message 4 of 7
(5,379 Views)

You have a similar methode for individual controls. Under 7.1 you get it via right click data->operations make current value default. There is a property node for this as well. Furthermore use the link from (for)iamstuck...

 

Felix

0 Kudos
Message 5 of 7
(5,368 Views)

I just opened up my LabVIEW 2009 environment and was surprised that the method for individual controls isn't there!  (Someone correct me if I missed it somehow)  I guess I haven't used that one in a while.  I saw that there is a property, however, but you need the VI scripting license in order for it to be visible.

 

DefaultValue.png

 

Edit: (Ignore that I called it a method when it's a property)

 

Kind of strange... it seems like a normal sort of thing to be adjusting, rather than the typically more advanced hidden stuff.

 

For what it's worth...

 

Jim

 

Message Edited by Mr. Jim on 11-13-2009 05:04 PM
Message 6 of 7
(5,359 Views)

It is scripting/private in 7.1 as well

 

Felix

0 Kudos
Message 7 of 7
(5,349 Views)