LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create a variable size subVi (extensible)?

Solved!
Go to solution

I was wondering if it is possible to create a subVi where its size (and imputs/outputs) can be extended. To be clear, something like the concatenate funcion, where you can change its size by making it bigger.

0 Kudos
Message 1 of 8
(4,118 Views)

Right click subVI > uncheck "View as Icon"

0 Kudos
Message 2 of 8
(4,099 Views)

@garrettmarsh wrote:

Right click subVI > uncheck "View as Icon"


That doesn't allow the drag to add more inputs, it just changes which inputs/outputs are visible. I think OP wants a subVI with an increasable size of inputs/outputs similar to Index Array or Concatenate Strings.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 3 of 8
(4,091 Views)
Solution
Accepted by MrX_G

@James.M wrote:

@garrettmarsh wrote:

Right click subVI > uncheck "View as Icon"


That doesn't allow the drag to add more inputs, it just changes which inputs/outputs are visible. I think OP wants a subVI with an increasable size of inputs/outputs similar to Index Array or Concatenate Strings.


Good point, my suggestion really only offers a cosmetic change in the way your block diagram appears. OP, you could maybe look into XNodes to do what you are describing, although it will probably take some work. Last I heard they are a "use at your own risk" type of feature that is not officially documented or supported.

There is some info here to get you started:

http://forums.ni.com/t5/LabVIEW/what-is-an-xnode/td-p/1307516

 

Message 4 of 8
(4,072 Views)

@garrettmarsh wrote:

Last I heard they are a "use at your own risk" type of feature that is not officially documented or supported.

There is some info here to get you started:

http://forums.ni.com/t5/LabVIEW/what-is-an-xnode/td-p/1307516

 


All true, and while fun they are often way more trouble than they are worth.  Usually there is a pretty simple workaround that just uses a bit more code than you originally wanted.

 

And, as always, a relevant XKCD.

 

https://xkcd.com/1205/

Matt J | National Instruments | CLA
Message 5 of 8
(4,030 Views)

Indeed there is, I will just stack single SubVi's, but I wanted it to be more space-efficient, just a matter of looks since others have to understand my code. 

 

 

0 Kudos
Message 6 of 8
(4,009 Views)

Seems it is the only way to achieve it, I will mark it as a good answer. Thank you. 

0 Kudos
Message 7 of 8
(4,002 Views)

Not really, no, the general solution to such scalability is arrays. Assuming you have a scalar or cluster input, place it in a wrapper and use an array of said cluster and loop through it.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 8
(3,954 Views)