ned Posted November 14, 2008 Report Share Posted November 14, 2008 I have a cluster containing two identical child clusters. At runtime I want to unbundle one of those child clusters, do some work on it, and bundle it back into the parent cluster. Is it possible to do this in-place? Even with the new memory management structures I can't figure out how one would accomplish this without using a case structure and creating one case for each child cluster. Am I missing some good explanation as to why this isn't possible? This is mostly curiosity, as my child clusters are small enough that creating a copy isn't a problem. Quote Link to comment
Aristos Queue Posted November 14, 2008 Report Share Posted November 14, 2008 I'd do this: Cluster contains two child clusters, Alpha and Beta. Case structure to decide which child cluster you want to operate on. In Frame Alpha, drop an In-place Element Structure to unbundle Alpha. In Frame Beta, another In-place Element Structure to unbundle Beta. Then call the same subVI in both frames, with the cluster passed in and coming out again on the other side of the subVI. Note that if you need other elements from the parent cluster in order to do the operation, those should be unbundled in both frames and passed into the subVI as well. Second option: Don't use two child clusters. Instead use an array of clusters with two elements. Then you can index which element you want to use. Quote Link to comment
ned Posted November 15, 2008 Author Report Share Posted November 15, 2008 I realized after posting that I can do the two-element case with a matching pair of "Swap Values," taking advantage of the boolean input. I suspect that can be expanded to the general case, but would get messy in a hurry. Quote Link to comment
Mark Balla Posted November 15, 2008 Report Share Posted November 15, 2008 QUOTE (ned @ Nov 13 2008, 04:31 PM) I have a cluster containing two identical child clusters. At runtime I want to unbundle one of those child clusters, do some work on it, and bundle it back into the parent cluster. Is it possible to do this in-place? Even with the new memory management structures I can't figure out how one would accomplish this without using a case structure and creating one case for each child cluster. Am I missing some good explanation as to why this isn't possible? This is mostly curiosity, as my child clusters are small enough that creating a copy isn't a problem. I find the OpenG bundle and unbundle by name useful when trying to bundle and unbundle clusters dynamically an example is shown http://forums.lavag.org/-t9978.html&view=findpost&p=40907' target="_blank">here. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.