08-25-2015 05:26 PM
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!!!
08-25-2015 05:44 PM
08-25-2015 05:49 PM
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.
08-25-2015 05:59 PM
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.
09-01-2015 05:48 AM
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'
09-01-2015 08:53 AM
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.
09-01-2015 11:16 AM
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.
09-02-2015 02:33 AM
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.
09-02-2015 07:58 AM
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???
09-02-2015 07:52 PM
I have sorted the error.Thanks all for your support 🙂