LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I unbundle the following?

Hello, how can I unbundle the following vi? I want to get the value of "mean" out of the cluster.

Thanks
0 Kudos
Message 1 of 7
(3,127 Views)
Since it is an array of clusters, you need another FOR loop to create an array of all means. See attached.
0 Kudos
Message 2 of 7
(3,127 Views)
You can also unbundle it inside the for loop. Pass that data out with indexing enabled, and you should get what you are looking for.
0 Kudos
Message 3 of 7
(3,127 Views)
Matt, if you need the array of means right there on the diagram, options 1 is probably a bit more efficient than your option 3. 😉
Option 4 is for the general case if you need to unbundle elsewhere in the code.
0 Kudos
Message 4 of 7
(3,127 Views)
I can't open Matt's file since I only have Labview 7. However, I can't get to write 'mean' into unbundle by name. How do you do this? I'm quite new to clusters.

All I want is to write the value of mean (only channel 0) into a cvs file.
Altenbach can u please post the vi rather than the gif's?

Many thanks
0 Kudos
Message 5 of 7
(3,127 Views)
If you only want one value from the array then you can use the Index Array function then unbundle the cluster. To select mean from the Unbundle by name function use the operate tool and click on the function to bring up a list of values within the cluster. Try it with the attached vi.

Jon Bowers
Applications Engineer
NI UK
0 Kudos
Message 6 of 7
(3,127 Views)
Unbundle works for clusters, not an array of clusters as in your case. Your cluster turns into an array at the loop boundary due to the miracle of autoindexing.

You have never told us before that you want only one element of the array of means. See Jon's example below, it should suit your needs.
0 Kudos
Message 7 of 7
(3,127 Views)