08-23-2017 12:25 AM
Hello all ,
pls explain me about the configuration file.ini?
what is the importance of the file ?? need ?
08-23-2017 01:40 AM
An ini file contains local settings of an application. For example, the labview.ini file in the LabVIEW folder contains many of the settings that can be configured or are automatic, e.g. the desired fonts, the last position of the menu, etc.
If you built an application, you can also include such settings.
These are text files that you can also edit with a text editor. This can be useful for some exotic settings that are not directly settable in the options dialog.
Please be more specific about what kind ini files you are talking about. Typically they are not mandatory, and if you delete them, they might get recreated with default settings.
08-23-2017 02:43 AM
If you want a program to remember settings between runs, such as instrument com ports, color of panel or user name you'll need to save it in a file. ini-files are a common text file format for such information.
/Y
08-23-2017 06:32 AM
I use configuration files for instrument settings in nearly every application I write. Quite useful in a dynamic setting like I work in. I have also stored default file settings and last used settings.
And with them being a formatted text file, it makes things very easy for almost anybody to update.
08-23-2017 06:46 AM
Please note that some configuration files are automatically generated. That means that modifying these can result in a case that an automatic rebuild discards your manual changes.
08-05-2018 07:59 PM
I have a question pertaining to saving control settings with the help of the "Read and Write Controls to Automatic Config File.vi". Basically, this vi saves the control settings, when triggered, into a notepad file. My problem is how does one recall that notepad file so that those saved settings recall to my program? Please and thank you.
08-06-2018 06:58 AM
@the_noble_linguini wrote:
I have a question pertaining to saving control settings with the help of the "Read and Write Controls to Automatic Config File.vi". Basically, this vi saves the control settings, when triggered, into a notepad file. My problem is how does one recall that notepad file so that those saved settings recall to my program? Please and thank you.
I'd assume the Write function of that VI to store all values a given file path. I assume the Read function of that VI reads them from the given path and put the values back in the control.
The ini file path is often a static name, added to the main VI path, or the complete VI path, with .vi replaced with .ini.
You'll have to be a bit more specific to get more specific answers (post what you have, what you've tried, what you want to do, and optionally some code).
08-06-2018 08:28 PM
Attached to this post is my LabVIEW code and pictures of it. Basically, it is a code to control a 3 channel power supply. Control of the power supply works just fine, but I want my code to save certain things (those 5 things on that array), so that I can recall them whenever instead of manually doing it every time. Also, it is not just one configuration that I am trying to save. I want this code to do it in a way where I can go and pick any of my saved configurations and my power supply uploads the configuration I pick. Thank you for you help.
08-06-2018 10:00 PM
First of all, you should only have 1 loop and 1 event structure. This will simplify things for you.
You did not attach the subVI for reading and writing the configuration file. What exactly are you stuck on? Reading the data? Writing the data?
08-07-2018 12:52 PM
Thank you for that loop and event structure advice. I appreciate it.
It is right there on the right. The notepad file with the saved settings gets produced by the event structure on the right. My problem is how do you recall those saved settings onto my LabVIEW program, so I don't manually type them in again. Does that make sense?
I attached a file which gets produced when I press OK on my program. This file is the notepad file with the saved configuration.