LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create a vi with a customizable number of same input type?

Is it possible to create a vi with a customizable number of same input type like the "Compound Arithmetic" vi? I mean a vi which if I expand it on the vertical dimension automatically add same type of input ports.

0 Kudos
Message 1 of 15
(3,380 Views)

You could do it through xnodes and VI scripting, however it wouldn't be trivial to implement, especially if you don't have experience with either.. Why do you want this functionality? If the inputs will be the same type, why not just make the input an array? 

Message 2 of 15
(3,371 Views)

Practical Answer: You would be very much better off by just accepting an array input.

 

Technically Correct Answer: Yes but it is not supported and poorly documented

https://lavag.org/files/category/10-xnodes/

Matt J | National Instruments | CLA
0 Kudos
Message 3 of 15
(3,369 Views)

I know that an array could be a good solution but I don't know the number of the inputs a priori.

0 Kudos
Message 4 of 15
(3,365 Views)

What is your vi going to be doing with the inputs? 

0 Kudos
Message 5 of 15
(3,357 Views)

You can either build the arrays programmatically or you can just expand the build array function to multiple inputs and wire the output to your function.

Matt J | National Instruments | CLA
0 Kudos
Message 6 of 15
(3,356 Views)

My inputs are clusters with the same organizzation of data.

0 Kudos
Message 7 of 15
(3,351 Views)

Maybe this could be the quik solution. Can I do it with clusters as input?

0 Kudos
Message 8 of 15
(3,348 Views)

Again, what are you planning on doing with those clusters in your vi? If you have 3 input clusters, what would the code do? What about 10? 

0 Kudos
Message 9 of 15
(3,347 Views)

In every input cluster I have a density spectrum, two number which define a band and a number which defines a threshold. In output I want a boolean signal which tell me if the threshold for every spectrum in his defined band is passed.

0 Kudos
Message 10 of 15
(3,312 Views)