LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuartion data and clusters

When coding for test rigs, it is normally required to save a large amount of configuration parameters that will be used during the test sequence. And these have to be saved in the hard disk.

The only option seems to be to save these parameters in clusters and write to disk. I am talking of something like 40 to 60 values - single precision, boolean, bytes and even strings all mixed.

And when the test is running, these clusters are read from disk, unbundled and used in various functions for comparison, limit values and the like.

Obviously this involves intensive wiring to bundle the clusters and unbundle them. Are there any other options that are more elegant ?

Thanks

Raghunathan

PS : I had posted the same query today morning but somehow it had vanished ! Hence posting again.
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 5
(2,976 Views)
Well I use INI text files because they are easy to handle.

They can be easily repaired, copied and managed, although there is always a concern that the wrong one will get in place if you don't version them.
It happens but over a period of so many years and multiple languages, I tend to work on the KISS principle......

If I want to lock them down I write a checksum into them so they are easy to read but difficult to accidentaly change. Means I also have a good simple check on what I am expecting to be stored and what is not.

I end up with routines to read and write my information out, it's a tad tedious but as a system it has stood the test of time.

I work on systems written by third parties and the situation that you describe is employed, it has its merits.
0 Kudos
Message 2 of 5
(2,965 Views)
>> Well I use INI text files because they are easy to handle.

I am not sure how exactly it is implemented.

Could you please elaborate on the actual method of creating the INI files and retrieve data from them in LV ?

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 3 of 5
(2,950 Views)
I think there are various ways to go about that. It is not completely clear to me what is bugging you the most, but it seems like you think it takes too much code to manage configuration data. First of all, I would like to point out the following: when using datalog or configuration file VI's, you do not need to cast any data: these VI's will do that automatically for you. Datalog files seem to be the most powerful because you can write and read complete complex clusters to file and read complete clusters as well.

here I got distracted by somebody and got a bunch of beers in lovely downtown Amsterdam....

Back behind my computer I notice your question got answered already. I would like to add a suggestion to the one VI solution:
Use two enums: one for read or write and one for all the "properies"/configurations. This will only work if you don't have to many different data types though. It is the cleanest solution I can think of, loading all settings into an uninitialized shift register (at startup) and calling that vi anywhere in your code where you need to read or write values. If you have many diffrent datatypes, you may consider embedding this vi inside new vi's that just do more specific tasks.
Or maybe I just had to much to drink..

Aart-Jan
0 Kudos
Message 4 of 5
(2,948 Views)
look for these examples through menu "help -> find examples"
these examples (see picture) will explain config vi's for making INI files. Also take a look at datalog.

Aart-Jan
0 Kudos
Message 5 of 5
(2,947 Views)