LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading 1 element from a Cluster coming from a FGV.

Solved!
Go to solution

So I made an FGV which reads and writes a cluster. However the cluster has about 10 items. In the current way as shown, each time I want to read one element, I get a full list of all the elements. Is there a way to have it more compact?

 

- One possibility am thinking is to have all the elements from the cluster as single ouputs from the FGV but this would defeat the point of having the cluster.

 

Is there a way to have a single output which can be toggled like an enum? Or will I need to read all of them to their respective indicators and then each time I need the value I would use local variables? I would want to avoid local variables.


Is there another way of doing this?

 

Thank you for the replies.

 

Reading from Cluster.JPG

0 Kudos
Message 1 of 4
(1,892 Views)
Is this a FGV? I don't think so.
0 Kudos
Message 2 of 4
(1,889 Views)
Solution
Accepted by topic author rajiv85

Hi rajiv,

 

you should also make the cluster typedefined. Each element of that cluster needs to get a descriptive label.

Now you can use UnbundleByName to pick just the cluster element you need without having to use that huge Unbundle node!

 

Other things:

You should give that FGV VI a better icon… (Also that VI receiving that IO wire.)

Using AutoCleanup would help, too.

Create (and use!) typedefined Enums as well!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(1,879 Views)

Thank you very very much!

0 Kudos
Message 4 of 4
(1,870 Views)