02-06-2013 07:44 PM - edited 02-06-2013 07:44 PM
Hi, I have created some references in my frontpanel, bundled them into a cluster to pass to a subVI. How do you create the references in the SubVI that can match the frontpanel's reference types. For examples, I have a few double references and a bool. How do I create the 2 doubles and bool references in the subvi to match the frontpanel cluster I'm passing in. I'm sure this is an easy question for the experts out there 😃
Regards.
02-06-2013 07:55 PM
Just copy them from your one VI to the other. That way you know they're identical. Or hold down control and drag them from your one VI to the other, this also creates a copy.
--Ryan S.
02-07-2013 12:20 AM
That doesn't work exactly how I want. I need to drag them into a cluster on the subvi's frontpanel, so I can attach a terminal to cluster in order to pass in a cluster of references. Your way works to copy them into the wiring diagram part, but not the subvi's frontpanel. Does this make sense?
Tnx.
02-07-2013 07:45 AM - edited 02-07-2013 07:51 AM
Actually the dragging approach does work 😃
Tnx.
02-07-2013 02:21 PM
I recommend that you make your cluster a typedef. Much easier to maintain if you need to add or remove items.
02-07-2013 02:55 PM
I got this riddle!
There are no references on the front panel yet. On the main vi FP there are elements, the block diagram has their references, they are bundled into the cluster. You want to control elements from the subVI. Right?
The most easy way - bundle output -> Create -> Control. This will create a cluster of references on the main VI front panel, you can move it to the subVI front panel and link to the connector pane.
More difficult: Go to the sub VI front panel, Modern -> refnum -> control refnum. Right click -> Select VI server class. Find numeric (somewhere under preselected Control class). Do the same, find boolean. Place these refnums with selected classes into FP cluster in correct order.