11-19-2012 04:50 PM
Hi guys,
Although I should be working on the main chunk of my program, I'm thinking of convenient features for the user.
One feature is having the user input be defaulted to the current value upon closing.
For example, in my situation the user will have to specify the GPIB address of multiple instruments.
After the program has been executed and terminated, the default values will be changed to the current GPIB addresses
as the GPIB addresses of the equipment will likely not be change.
I notice the "VISA resource name" function-> Data Operations -> Make Current Value Default.
Is there a programmical way of changing this?
Thanks,
William
Solved! Go to Solution.
11-19-2012 05:55 PM
You cannot change the default values of a running VI. Instead, write the data to a config file at closing. When the program opens, read the config file and set the values to what is in the file.
Lynn
11-26-2012 12:13 PM
Awesome. I would see config files when browsing through program folders and took them for granted. Didn't think about using it until you pointed it out.
Thanks. ![]()
11-27-2012 12:00 PM
Not sure if you are familiar with OpenG but they have a Write Panel to INI and Read Panel from INI which will save all controls on a front panel to a human readable INI file. I usually write this to a temporary file on the start of a test, then read it on the start of the application. This way if the program dies unexpectedly (ie power outage, or BSOD), the previous settings will be remembered.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-28-2012 01:12 PM
Thanks,
I'll look into that.