LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

auto save and auto recover of front panel controls/indicators values

i just want that when i exit from the VI's front panel all controls and indicators current values get saved automatically and when i get back into this vi,those values get recovered automatically.
Like if i incremented numeric control value from 1 to 5 , when i exit from the vi the value 5 get saved automatically and when i get back into the vi ,it shows the recovered value 5 to me automatically.
best regards
0 Kudos
Message 1 of 8
(3,766 Views)
duplicate post

I gave you some ideas to do that... I now remember that you can also program a "make current value default", there are a few posts on the forum explaining how to do that, just do a search.

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 8
(3,757 Views)
actually i have tried both options  but in both options i have to click buttons for saving and retrieving of VI control values .i want that vi get auto saved on exit and auto retrieve on opening the front panel.
best regards
0 Kudos
Message 3 of 8
(3,752 Views)
Why do you say it requires to click a button ?

Look for the programatic "make current value default" and perform it automatically at the end of you application...


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 8
(3,747 Views)
have a look at this... 😉



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 8
(3,744 Views)
Open G has vi's for storing and retrieving info of all controls and indicators on a front panel to a .ini file.  Goto OpenG.org and look for variantconfig.llb. They use variant data read from the front panel objects, there is an option to save either control or indicators or both.
 
I use these vi's for my applications now. The way i used to do it was massive subVi's which had a key for each control or indicator on the front panel which I wanted to save the data for.
 
By using the Open G vi's all of that code was replaced with a few subvi's.
 
I was fairly easy to impliment in to my applications.
 
I will try to put somthing together to post here for you with the files you everything require.
 
I'll be Back
 
Georges Janveau
0 Kudos
Message 6 of 8
(3,727 Views)
I'm Back
 
I was mistaken when I said the you could select to save either the controls or indicators or both in the Open G Vi's, They are hard wired for both. I made minor changes to these VI's for my app.,  because I only needed the controls to be saved. The example I am providing uses the Modified VI's, but I've also included the originals.
 
Modified
Read Panel from INI.vi
Write Panel to INI.vi
 
Originals
Read Panel from INI.vi
Read Panel from INI__ogtk.vi
 
The ability to select either or both could easily be implimented into these Vi's using a case selector and an enum wired as an input
 
Controls only
Indicators Only
Both
 
Incase you don't have the OpenG toolkit I've provided the necessary files for this example to function
 
Extract the zip file to your User.lib directory then open Usage.vi
 
Hope this helps you
 
Georges Janveau
0 Kudos
Message 7 of 8
(3,722 Views)

OOOps

 

Originals should have been

Read Panel from INI__ogtk.vi

Write Panel to INI__ogtk.vi

 

Georges Janveau

0 Kudos
Message 8 of 8
(3,720 Views)