LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Default setting to be Recalled from File

Hello,

 

I have many controls in my application,i want the default values of it to be loaded from a file.Also i want the last changed values of these controls to be saved separately in another file so i can recall it over default values when required.

 

I have tried with the already available examples online but my major struggle is loading to each control its value from the file.

 

Pls HELP!!!

0 Kudos
Message 1 of 10
(3,401 Views)
So you can read the data but don't know how to use property nodes to set the control values?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 10
(3,395 Views)

Thanks for your fast response.

 

Its better i know it completely as for now my knowledge is scattered wrt both R/W file,also with the controls usage.

0 Kudos
Message 3 of 10
(3,389 Views)

I just discovered the "Read Panel from INI" and "Write Panel to INI" functions in the openg library the other day, thanks to crossrulz. They are very quick to use, and can be installed with VIPM.

0 Kudos
Message 4 of 10
(3,376 Views)

Hi

 

I tried reading from text file.I am able to read line by line and the output can be read in array or cluster.

 

I wanted the data from the file to be loaded in the Controls placed,so that user can read the default values from file.

 

PLease help me with 'Read File to Indicators/Controls'

Download All
0 Kudos
Message 5 of 10
(3,288 Views)

Help->Find Examples->Fundamentals->File I/O-> anything talking about ini files.

 

Build a file that makes more sense.  Use this example.  Problem solved. 

 

If you insist on having some random lack of organization in your text file, at least have the decency to give yourself a csv to work with so you have something to easily separate the different values.  There is an example for this in the same section of the example finder.  It helps you create a file that's organized in a way you can manage it easily.  With the ini file, you can easily choose which control to update or read because the format leads to that.

0 Kudos
Message 6 of 10
(3,260 Views)

I put something together for you. First of all, open your front panel and make default values for each control by; right click on the control, default values/make current value default. Once you run the code, click save default values button. It wil generate a config file for system default values. Then, click and change control values on the front panel. Then click "Call Default values" button. you will see all controls will be reset to their default values. Now, you change all control values as you wish and click"Save used default values" button. It will generate another config file for user default settings. Now you can call either system default or user default values. Check out the example that I built and let me know how it works. It is created in LV 2013.

 

Good luck.

Senior Software Developer
Message 7 of 10
(3,237 Views)

Thanks Freelion8.It works perfect and this is what i was looking for.

I have sent you PM asking few questions,can u pls check that and give me a response pls.

0 Kudos
Message 8 of 10
(3,210 Views)

I am adapting the SW given by frrlion8 to my application.

I am using Ring Menu in my FP,for which i use U32 with RingDefType for ReadKey.vi but it throws error,what is wrong here???

0 Kudos
Message 9 of 10
(3,191 Views)

I have sorted the error.Thanks all for your support 🙂

0 Kudos
Message 10 of 10
(3,160 Views)