LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Turn cluster Info from "Get Cluster Information VI" into cluster constant

Solved!
Go to solution

Hi everyone,

 

I'm working on a LabVIEW project where I need to dynamically handle cluster data stored in files. The goal is to make my sub-vi reusable for different cluster structures without hard-coding them. Here's the approach I'm taking:

 

  1. I pass cluster information to a subVI using a variant.
  2. Inside the subVI, I want to generate a cluster constant from the variant. This constant will define the structure of the data stored in the file.
  3. I then read the data from the file as a cluster.
  4. The read cluster is converted back into a variant, which is passed back to the parent VI.
  5. In the parent VI, I convert the variant back into its original cluster form.

This allows me to use the same "Read VI" for different cluster structures, depending on the file and cluster info provided. But i can't figure out how to convert the variant cluster information which i get from the "Get Cluster Information VI".

 

Sub VI:

Raukho_0-1736784377690.png

Parent VI:

Raukho_1-1736784630491.png

 

 

0 Kudos
Message 1 of 3
(83 Views)
Solution
Accepted by Raukho

Hi Raukho,

 

Malleable VI is a solution.

 

PinguX_0-1736785765668.png

 

For more information about malleable VI, I guess there must be enough Help to look for.

Message 2 of 3
(75 Views)

I would refer you to this OpenG module, the "OpenG Variant Configuration File Library":

 

https://www.vipm.io/package/oglib_variantconfig/

 

There's a good chance you can just use it as-is.

 

If the file format it generates isn't to your liking, you could also just examine it to see how it does things internally, and possibly copy some of those methods.

Message 3 of 3
(53 Views)