04-20-2010 07:07 AM - edited 04-20-2010 07:09 AM
I want to do UI control of my front panel within a subVI. Hence, I need to pass a number of references to front panel objects to a subVI.
See the attached (simplified) example to illustrate my point. Everything that lies within the sequence structure frames would reside in the subVI.
In the top part of the block diagram, the references are explicitly bundled together, before being passed to the subVI to be applied to property nodes. This works fine.
However, if I want to define a constant cluster of references, as in the bottom part of the block diagram, it returns an error: "Object reference is invalid". How would I make this work? Note: I created this constant by right-clicking on the cluster wire in the top part of the diagram.
Many Thanks,
Dan
04-20-2010 07:22 AM
04-20-2010 07:28 AM
04-20-2010 07:42 AM
DanB1983 wrote:
OK, so back to my initial question, is it possible to create a constant cluster of references without having to bundle each individual reference together?
Not easily. You can get a reference to the front panel and from there get references to every control and indicator it contains, then get the label from each control reference and see if it matches an item in the cluster, build the matching items into an array and then convert the array to a cluster (or find another way to get those references into the cluster), but that will probably turn out to be more work than bundling the references manually.
04-20-2010 08:16 AM
You can pop-up on the middle input of teh bundle to create a constant. See this mini-Nugget.
This thread may help, here is a preview.
Ben
04-20-2010 10:27 AM