LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unbundling an array of doubles

Solved!
Go to solution

Hi Forum,

 

I need to measure current from 20 channels so I combined the values of the 20 shared variables (one from each channel) into an array form and then send to a network variable for transferring data from A.vi to B.vi. And then on B.vi, I use "unbundle by name" to unbundle the cluster back into the twenty individual values and indicate them one by one.

 

My question is, how can I figure out which value is which out of the twenty variables? I connected the 20 shared variables to the array in a particular sequence and when i use "unbundle by name" would the sequence be consistent?

 

I have attached a screenshot just to explain things better.

 

Any help is greatly appreciated!!

 

Batistuta002

Download All
0 Kudos
Message 1 of 4
(2,194 Views)
Solution
Accepted by topic author Batistuta002

Yes, it is the same as the first element of the array.

 

But you shouldn't be converting to a cluster than unbundling.  That is a Rube Goldberg.

 

You should be using Index Array to get the individual elements.

0 Kudos
Message 2 of 4
(2,190 Views)

Thanks Ravens Fan!

 

So if I want to use Index array, then i would need to assign index numbers to each elements when I combined the 20 values from the variables to an array right? If I don't, does LV assign 0 to 19 for the 20 elements from top to bottom automatically? Sorry that I cannot verify this by myself as I can't test it out using actual measurement because of hardware issues.

0 Kudos
Message 3 of 4
(2,183 Views)

Yes. It will automatically assign it the indices 0 to 19 when you drag down the bottom of the Index Array function.  No need to wire up all of those constants.

 

The first index always defaults to 0 if nothing is wired to it, and an index always defaults to the index value of the one before it +1 if nothing is wired to it.

0 Kudos
Message 4 of 4
(2,180 Views)