LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hi!!how can I build a vi with every number of inputs?

The vi I want to build is a little "strange" , I am going to try to explain the basic idea!!

I need a vi with every number of inputs, so, maybe my vi has 2 inputs or 50 inputs.
I know that a vi has a limited number of terminals (28), so , I thought that I had to use an array to avoid limit the number of inputs and outputs.
But the problem is that I want to connect my inputs separately , no using an array.
I suppose that my explanation is not very good!
I want to build something similar to the vi "Build an array" . It is a vi that has every number of inputs, this example is to explain the idea. I dont know if it is possible doing something similar, because depending on the number of inputs the block diagram
will change!

Thanks in advanced!!

Graci
0 Kudos
Message 1 of 3
(2,814 Views)
> I suppose that my explanation is not very good!
> I want to build something similar to the vi "Build an array" . It is a
> vi that has every number of inputs, this example is to explain the
> idea. I dont know if it is possible doing something similar, because
> depending on the number of inputs the block diagram will change!
>

VIs have fixed number of inputs, and as you mentioned, they allow for
unlimited amounts of data through arrays. If you want a growable node
like build array, there are a couple options. In LV7 and above, there
is a subVI style that is bigger, with the blue border, and it allows for
textual terminals at the bottom. These are much bigger, and it is more
obvious what someone is wiring to, but they also take more space, and

I'm not sure they are what you want, but probably worth looking at.

Second option is to really use a build array. You can either teach your
users to put a build array in front of the subVI and build an array, or
you can build a merge VI.

A merge VI is how the 3D graph and the polar plot drop with subVIs
already wired to other objects. It is a regular VI whose item in the
palettes has the Merge Option turned on. In this case, instead of the
subVI being dropped, its contents are merged into the user's diagram.
You could build your subVI using arrays, then build a merge subVI for
the palettes. In the merge VI, place a build array with whatever you
want as the default size. Then add the merge VI to the palettes and set
the option. When dropped, you will get the build array's default size
already wired to the other subVI.

Greg McKaskle
0 Kudos
Message 2 of 3
(2,813 Views)
Hi,
one of the typical solutions is to use clusters. You can create one cluster input for your vi with many elements inside. These elements colud be of different types. With such solution you can create inside cluster much more then 28 input elements.

Good luck.

Oleg Chutko.
0 Kudos
Message 3 of 3
(2,813 Views)