11-04-2009 02:07 PM
Hi there,
Sorry if this has been posted before, I did the search first but did not find anything.
Problem is that I have two setups that are identical and need to be controlled from a single vi. Since they are the same they are configured with the same sets of parameters so I decided to create a cluster of these and then build an array of the clusters. This way I need to only use one wire and if I need a given parameter I can easily get it from there (or so I thought) and also since I need to see if anything changes I can compare one wire instead of each one of the parameters.
The gui has the list of parameters then in the block diagram I bundle them appropiately, using "Bundle by Name" and then each bundle into an array using "Build Array". Problem arises when I index the array for the first setup and the use that to unbundle the parameters I need, using "Unbundle by Name" (though if I use "Unbundle" the same happens)and lo and behol, the ouput names are from the second setup, not the first.
Here is the curious thing though, even though the names are all wrong the values are correct. I could live with this but it is annoying plus it will make another user very hard to understand the diagram plus this is just a proof of principle to test with two, eventually there will be eight or even more and that is going to get really confusing.
Is there a way around this? Even if it is to change the names after unbundled.
Check the attached vi to see what I mean.
Solved! Go to Solution.
11-04-2009 02:29 PM
I think you are forgetting an important point about arrays. The only thing that can be different between each element of an array is its value. The array elements must all share the same properties. So that would include the names of the individual elements that make up the cluster that is an array element.
It appears that the last cluster that gets built into the array is the one that defines the names of the elements that are within the cluster element. You either need to give all elements of the array the same names within the cluster. Or use a cluster of clusters instead of an array of cluster to build your data structure.
11-04-2009 02:43 PM
Thanks, I guess I'll have to do that, giving them same name is out of the question though because it will become really confusing in the long run.
🙂