From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keeping values to controls after closing a VI

I am trying to set up a UI for my techs where they can add columns to a test report and give each column a name.  I have been taught a way to have them add/remove columns, but this VI must be used in TestStand later to create the report and the sequence must read the titiles of those columns.  The problem is that the VI seems to dump the data once the VI is closed.  What would be the best method to keep this data after closing the VI?

0 Kudos
Message 1 of 4
(2,179 Views)

What control are you using?

 

Most often you right-click on the control go to Data Operations and select Make Current Value Default.

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 4
(2,176 Views)

You need to save the data to a file and read the file at the beginning of the program to restore the data.  The config file functions serve well for this purpose.

 

This question has come up numerous times before, so search the forums and you'll come across some examples.

0 Kudos
Message 3 of 4
(2,166 Views)

If you are only storing a few values such as column headers, you could create a registry key and store it directly there.

I have used this method to save calibration and CAN settings so that the messages don't have to be re-input at each runtime and a file doe not need to be created to store the values.

0 Kudos
Message 4 of 4
(2,155 Views)