LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a subVI without controls?

Solved!
Go to solution

Greetings,

 

I am going through some exercises to learn LabView and I have a question.

 

One of the exercises in my book is to create a subVI that generates a random number within a min/max range.  (OK--re-invent the wheel)  I have the block diagram and I have the icon designed, but I am having difficulty in getting the connections wired.

 

Right now it's a hard-coded static value for the min and max.  I'd like to have a connector in for each of the min and max (so that the parent can specify that however it wants be it with a static integer, an input, etc) and then a connector for the output--again, without a specified control so that the parent can take the value and run with it.

 

How do I do the wiring?  I can obviously drop in controls into the front panel, but my parent project doesn't need the clutter of 3 extra controls coming up on it.

 

Thank you,

newbo

0 Kudos
Message 1 of 4
(2,159 Views)

In the top right hand corner of the window, next to the icon is the connector pane.
This is where you associate controls or indicators with connections on a sub-vi.

 

http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/building_connector_pane/ 

0 Kudos
Message 2 of 4
(2,152 Views)
Solution
Accepted by newbo

From the connector pane, you can right-click on a connector and select a setting.  You can set "This Connection is->" to Recommended or Optional.  This will allow the VI to be called without those terminals wired from the parent VI.  If left unwired, the default values you put in the controls will be used.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(2,150 Views)

If you don't want the clutter of three controls then you are thinking along the right lines. Create a cluster control and make sure you save it as a type-def.

=====================
LabVIEW 2012


0 Kudos
Message 4 of 4
(2,140 Views)