LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create references in a SubVI

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.

0 Kudos
Message 1 of 6
(2,838 Views)

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.

Message 2 of 6
(2,831 Views)

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.

0 Kudos
Message 3 of 6
(2,814 Views)

Actually the dragging approach does work 😃

 

Tnx.

0 Kudos
Message 4 of 6
(2,794 Views)

I recommend that you make your cluster a typedef. Much easier to maintain if you need to add or remove items.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 6
(2,770 Views)

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.

 

0 Kudos
Message 6 of 6
(2,761 Views)