LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what is the importance of configuration file. ini ?

Hello all , 

pls explain me about the configuration file.ini?

what is the importance of the file ?? need ? 

0 Kudos
Message 1 of 12
(5,135 Views)

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.

Message 2 of 12
(5,107 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 12
(5,090 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 12
(5,063 Views)

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.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 12
(5,054 Views)

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. 

0 Kudos
Message 6 of 12
(4,610 Views)

@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).

0 Kudos
Message 7 of 12
(4,587 Views)

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.

0 Kudos
Message 8 of 12
(4,555 Views)

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?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 12
(4,545 Views)

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. 

0 Kudos
Message 10 of 12
(4,523 Views)