LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the best way to store test parameters for future use?

I'm creating a test stand that will perform various "standard" tests. Each of the tests has it's own setpoints (integer numbers) as well as some string values that are stored in the log file with the data.

What is the easiest way to store these setpoints and strings so that I can pull them into the VI in the future, say by selecting a test type from a ring control, etc.?

I would also like to make this dynamic so that new test types can be stored from the vi. (i.e. I don't want to have to hard code all the future tests and their parameters).
0 Kudos
Message 1 of 4
(2,855 Views)
I'd suggest a seperate tab delimited text file to store these as an array and use "read file" and "spreadsheet string to array" vis to read the data, then just index and search it correctly to recover the data, using property nodes to populate the ring controls and other controls and then "array to spreasheet string" and "write file" to save it if you're programmatically entering tests. Otherwise just edit it in Notepad or whatever.
0 Kudos
Message 2 of 4
(2,855 Views)
Personally, I would store the parameters in an .ini file. In the File VIs are the Configuration File VIs and they are really good for reading sections and keys. You could have one large .ini file with a section for each instrument or you could create an .ini file for each instrument. Either way, you can save your parameters in the keys and get them back later.

I lean towards having fewer .ini files and keeping things a little cleaner in the file structure.

Rob
0 Kudos
Message 3 of 4
(2,855 Views)
I like INI files, too. If you are looking for an easy way to read and write your parameters to INI, take a look at the Variant Configuration File IO Library of the OpenG Toolkit.
0 Kudos
Message 4 of 4
(2,855 Views)