LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration data and clusters

While coding in LV for product test rig applications there is this need to save configuration data to disk and retrieve it while running the test. A typical scenario to test product "AA" will be :

1. There are 10 different variations of the basic product AA_1 to AA_10.

2. Each variant has 40 odd parameters that can vary.

3. User enters the values for these variants and will have to be saved on disk.

4. When a particular model is tested, all 40 parameters for it have to be read from disk and used in the various tests.


In such events the only option seems to be :

(*) Collect all the user entered parameters into clusters. If there are totally 8 tests for each model, then have 8 clusters and bundle parameters pertaining to each test into that cluster.

(*) Write the clusters to disk in a bit stream using "Write File.VI"

(*) When running the test, retrieve the parameters from disk and load them into the relevant clusters back. Unbundle by name and use each of the parameters as required. And if the same parameter is required to be used in many functions in the same test, then assign it to a local variable (my beloved ;-)) and use it.


I would like experienced LV professionals to comment on this method.

Handling the clusters and wiring them for large data storing and retrieval calls for heavy wiring. Is there no way out ?

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 4
(2,962 Views)
Hi Raghunathan,

Since you have to deal with so many elements of data, it looks like clusters will be your best method. It will simplify your file I/O and will also help you keep the data organized. I'm not sure why you must write the data to disk, but if it is necessary, clusters will be helpful. It's true that there will be many wires when you bundle and unbundle those clusters, but that will happen no matter how you deal with large numbers of parameters. It will probably make your code more readable if you write subVIs to take the clusters as input, and then break apart the clusters within the subVIs.

I hope this is helpful!

Megan B.
National Instruments
0 Kudos
Message 2 of 4
(2,937 Views)
>>It will probably make your code more readable if you write subVIs to take the clusters as input, and then break apart the clusters within the subVIs.

Yes that would be a good suggestion to make the code neat and tidy. The coding for writing to file and reading back are quite complex with many cross checks to create / compare the file name, and handle cases like "file not found". I can have one sub VI to write to disk and another to read from disk.

Thanks

Raghunathan
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 3 of 4
(2,932 Views)
If you have the DSC engine, you could flatten the cluster to string and write it to a memory binary string tag. The DSC engine saves historical data to the Citadel database. Then read the historical tag value at startup.
0 Kudos
Message 4 of 4
(2,927 Views)