LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading Instrument settings from file

Hi there

I am developing a new app that uses quite a few possible instrument configurations and needs to be able to support multiple instruments models. I have written a little GUI that lets users select a config from various settings on different tables. I now want to save this config to a file and maybe read in the settings when they want to edit it again. Can any body suggest and tried and tested formats for doing this. I was going to use configuration files with a section for each instrument type and then keys for model number and GPIB addr but am open to any other suggestions as I need to do this quickly (whats new eh !) and it needs to be scalable.

Instrument settings will be loaded from file into Globals by each test sequence so that globals can be re-used etc

Cheers in advance.
Chris R
0 Kudos
Message 1 of 3
(2,729 Views)
Hello Chris
Try the Configuration Toolkit at my web page.
I would be really really interested in what you find unsuitable in it! It was designed for exactly your issue and I use it daily with thousands of configuration elements!
Yours Sincerely
John www.tradersmicro.com
0 Kudos
Message 2 of 3
(2,727 Views)

Chris,

Option 1 - HDF5
I have found HDF5 the best method for saving configuration data. 

HDF5 is a binary, hierarchical file format, with a lot of built-in features such as compression and 64-bit file pointers. As such, it is fast, allows for easy backwards compatibility, and you can put anything into it. It also allows circular references (it is actually a directed graph, not a tree), so, for example, you can reference data from configurations and configurations from data. I maintained the NI-SCOPE Soft Front Panel configuration file with this method through many years and configuration changes.

Now for the bad news. HDF5 is very low level. Expect to take a week to get comfortable with it. HDF5 is not threadsafe, so you must ensure that you never call the DLL from more than one place at once. The posted code uses version 1.4.4 of HDF5, while the latest version is 1.6.3.

Option 2 - Configuration file VIs
If your configurations are fairly simple and have no real hierarchy, consider the configuration file VIs found on the file palette. These store your data in a Windows style INI file, so it is easily human readable. They are not as fast as the HDF5 solution, and have only a single layer of hierarchy, but they are written in pure G, so are very portable.

Good luck. Let us know how you make out.

0 Kudos
Message 3 of 3
(2,700 Views)