Skip to main content

Open G Variant Configuration File Library

 screenshot

The Open G variant configuration file library allows you to save LabVIEW data as an .ini file.  I use these to save software configuration values.  

Here is an example of saving a cluster of data to an .ini file

Save_ini.png

You can save each cluster as a section in the .ini file.  This allows you to load data by section.  Eliminating the need for a "clustersaurs".  A "clustersaurs" is a single cluster that contains all the configuration data.  The single cluster can get very big and hard to manage.  Saving each cluster by section allows to break up your configuration data into manageable sizes

Here is an example of loading data from an .ini file by section

Read_ini.png

I like saving data as human readable files.  This makes the data usable down the road.  I got this concept from the Pragmatic Programmer

The Power of Plain Text

As Pragmatic Programmers, our base material is knowledge. The best format to store knowledge persistently is plain text, so that we can manipulate it with different tools. Example of plain text: "milk" (my favourite drink 😉).

Plain text doesn't mean it's unstructured: HTML, JSON, YAML and so are all plain text.

Human-readable forms of data, and self-describing data, will outlive all other forms of data and the applications that created them.

 

I know some people use the Moore good ideas Read and Write anything.  I don't have experience with this but it might work for you.

MGI_Read_Write_Anything.png

Check out the AST library on LabVIEW Add ons I use.

One comment

  • You don't need to wire the data name into  save to INI function.    If you leave the data name unwired the write/read function take automatically take the name of the input cluster.

Leave your comment

In reply to Some User

Copyright © 2024 Automated Software Technology LLC All Rights Reserved.

Joomla! is Free Software released under the GNU General Public License.