NI Home > Community > NI Discussion Forums

LabVIEW

Reply
Member
eliel
Posts: 63
0 Kudos

save value control

Hello,

 

How can I save the value of a control and when I close the labview the values return to the control?

 

But the values changes some times.

 

How can i preserve this values when I open again the labview?

 

Thank You.

Trusted Enthusiast
TiTou
Posts: 2,746
0 Kudos

Re: save value control

Hello,

 

I think you have to write the value into a file when your application shuts down and when it starts you have to load it from the same file.

 

Configuration file (INI) seems to be appropriate for that, the VIs are in a subpalette of the File palette.

 

If you need an example to start from, go to Help >> Find examples.. >> seach tab and look for "INI".

 

Hope this helps

________________________________________________________________
"Cambiar el mundo, amigo Sancho, que no es locura ni utopía. sino justicia."
Cervantes
Trusted Enthusiast
P@Anand
Posts: 2,194
0 Kudos

Re: save value control

There are two ways. As suggested by TiTou you can use the file to save the file (Mostly advised) else you can set default values to the controls which you can do by right click the control >> Data operation >> Make current value default or select the controls Edit>> Make Current alue Default. I would prefer writing to file :smileyhappy:

 

-----

The best solution is the one you find it by yourself
Knight of NI
Posts: 18,064
0 Kudos

Re: save value control

This has been asked many times before. Did you search?

 

Community: Easy saving and loading of control values