LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I save changes made to a sub vi automatically

Hello Fellow Engineers!
I have a doubt and welcome useful suggestions from all of you.

I have the following problem:

I am programming a vi that asks a user for his/her username and password. The user has an option of changing the password . When he/she clicks on  the option 'change password?', there is a dialog box asking the user for the old password and new password. If the old password is authenticated, the new password is sent through a global string to a sub vi. This sub vi simply has a table with user name and password column fields. So, on checking the validity of the old password, the main vi sends the new password through a global string to this sub vi and overwrites the old password field with the value of the current password.

My problem is this-

When I close the main vi, restart it and look at the sub vi, it doesn't show the new password.  The sub vi has the original password as default. In other words, the changes I make to the sub vi are not saved on closing of the complete application. If I don't close the main vi and try changing the password any number of times, it works fine and does its job! But, when I shut down the application and start again, the sub vi has the original values.

Is there any way by which I can make sure that the changes I make to sub vi through the main vi are permanently saved each time the changes are made?


Hoping to hear from all of you,

With warm regards,

Aparna.

Student,
Germany.

0 Kudos
Message 1 of 3
(2,703 Views)
You can save the VI, but if you are planning to build an EXE, this approach will not work.  You should strongly consider saving your username and paswords in an external file/database.

My response in this thread will show you how to save the VI programmatically.
0 Kudos
Message 2 of 3
(2,701 Views)
There is an invoke node in the server class VI. The invoke node is called: Default Values.Reinitialize All to default. this will set all controls in the VI as Default. Next you need the invoke node Save.Instrument to save the VI. both methods work while the VI is running and are available in the runtime engine too.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 3 of 3
(2,700 Views)