LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subVI technicalities

Solved!
Go to solution

For many LabVIEW functions, there are required inputs (bold) and optional inputs (not bold).

If the optional inputs are not wired, the function uses some predetermined default value.

 

Is there an easy way to do this with subVI's?
Like while you are wiring everything to the connecter from the front panel, is there a way to specify a require/optional input?

Cory K
0 Kudos
Message 1 of 4
(2,674 Views)

Right-click on one of your wired terminals (while still connecting controls the icon terminals) and choose

 

This input is ....

 

The options are Required Optional , etc.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 4
(2,669 Views)

Thanks Ben.

On my front panel, say have a control, and press "set current value as default".

If this control is an optional input of a subVI, will this default value be used if unwired?

Cory K
0 Kudos
Message 3 of 4
(2,666 Views)
Solution
Accepted by Cory_K

Yes, if it is on the icon connector. I use that in one of my vbery old "Event_loggers". For special operations like starting it up, I pass an enum that says "init". Most of teh time it is used to post errors so the default is set to "Post" so that it can be used without passing the enum.

 

If it is NOT on the icon connector then the answer "depends" on if the VI had previously been called and if anything was writtien to the non-icon connector control.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(2,661 Views)