From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-09-2017 04:41 PM
Hello,
Im trying to figure out if it is possible to efficiently unbundle an array of clusters which contains about 20 elements without disassembling the array prior to unbundling the clusters.
Thank you,
Ran
Solved! Go to Solution.
07-09-2017 06:29 PM
What is it you want to do? What is your goal? I assume you want to do something other than put your array into a For loop, and within the loop unbundle the Cluster, then reassemble on the way out.
Bob Schor
07-09-2017 07:33 PM
@ran0 wrote:
Hello,
Im trying to figure out if it is possible to efficiently unbundle an array of clusters which contains about 20 elements without disassembling the array prior to unbundling the clusters.
You cannot "unbundle" an array of clusters, because it is an array, not a cluster. It would be interesting to know what you mean by "disassembling". Is the cluster of mixed datatype? What kind of data structure do you want at the end? (e.g. a cluster of 20 arrays? 20 individual arrays, one for each element? a N x 20 2D array? Just random access to a specific inner element? something else?)
I guess you figured out a way to do whatever you are trying to do, but you are worried about performance or efficiency. Is this correct? Do you have performance or memory problem? If so, what is the evidence? Can you show us your code? How big is the array of clusters?
Where does the data come from? If you feel that the data structure is not suitable for your use case, maybe you want to carry it as a different data structure from the beginning.
07-10-2017 09:12 AM
My guess is that you're looking for a function that is the complement of "Index & Bundle Cluster Array".
There's no built-in function for that, you just have to code it like this:
07-10-2017 09:38 AM
@paul_cardinale wrote:
There's no built-in function for that, you just have to code it like this:
Exactly 😄
07-10-2017 03:31 PM
I asked this same question about a week or so ago. Unfortunately, the answer is the same. 😉
07-10-2017 03:56 PM
07-10-2017 04:02 PM
Thank you all...
My aim is to record about 20 mixed datatypes in one giant array. I thought it would be better if i cluster them all together, per iteration, and unbundle by request only the datatype array i want.
Since it can't be done, i guess i'll work with multiple arrays, as easy as it could be at first place.
Once again, I thank you all.
Ran
08-31-2018 11:43 AM
Here's a better solution.
Just drop "Index and Unbundle.xnode" onto the block diagram.
(To make it handy, add it to a palette.)
08-31-2018 04:07 PM
I just discovered that it gags when it comes across cluster elements with empty labels (but you're not supposed to do that anyway).
Here's the fix (it invents a name if it finds a blank one).