LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Value as Default Using Property Node? (run-time)

I was wondering if there is a way to do the following:
 
When a control value is changed on the front panel of a run-time application, can that value be stored as the default value for that control, so that when the application is exited and then re-opened the last used value loads?  Maybe using a property node?
 
I am currently writing the values to file and then reading them from file to do this...I was just curious if there is a way to change the default value in a run-time app.
 
Thanks,
Ryan (7.0)

Message Edited by esa_paranoid on 07-14-2005 10:51 AM

Ryan

LV 7.1
0 Kudos
Message 1 of 16
(8,252 Views)

Hi,

I know how to do that for the complete set of controls of the application (Check attachment), for only one, I never did it.

Hope this helps,

Paulo

0 Kudos
Message 2 of 16
(8,239 Views)

Paulo, thank you for the response but I cannot view the attached file as I have labview 7.0.

 

Could you possibly save it as 7.0 ?

 

Thanks!

Ryan

LV 7.1
0 Kudos
Message 3 of 16
(8,232 Views)
0 Kudos
Message 4 of 16
(8,225 Views)
Anyway, keep in mind that this action modifies the VI itself, so the VI must be editable.
It would not work, for example, in an EXE application.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 16
(8,225 Views)

The method "Make current values Default" is not settable when the VI is running and is not avilable in the run-time engine.

You should probably write your desired default settings to e.g. an *.ini file that is loaded automatically when the application starts.

0 Kudos
Message 6 of 16
(8,222 Views)
Hmmm...that is what I am looking for, in an .exe
 
So I am assuming the way I am doing it, writing the values to file and then reading them from the file is the only option?
Ryan

LV 7.1
0 Kudos
Message 7 of 16
(8,220 Views)
Altenbach, do you have an example of writing an .ini file and loading an .ini file?
Ryan

LV 7.1
0 Kudos
Message 8 of 16
(8,217 Views)
init file text file or xml file is probably the way to go.  It would be nice if there was a default initialization event for vi's so you can put all your initialize code in there.  I usually make one vi which opens an xml file and loads all controls with the default values,  if the initialize is successful, I run the main loop of a program.  Init files and xml files have the advantage of being able to set some or all values without having to have a strict text file format.  Also placing initialization values in such a file allows for compiled programs to be easily customized and modified at user sites.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 16
(8,208 Views)

well i am currently saving the values to the windows registry and loading them before i enter the main program loop...

this also allows for easy editing/setup at the end users location

I am trying not to create files that can easily be deleted or tampered with without some pc experience.

So it sounds like the way I have it is probably the best solution to this problem?

Ryan

LV 7.1
0 Kudos
Message 10 of 16
(8,199 Views)