LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i vary the number of inputs?

Solved!
Go to solution

I have to design a system that reads data from sensors and processes it. Is there any way to vary the number of inputs without making any change to the program? Like specifying the number of inputs and the program adapts. I use labview 2009.

 

Also is there any way to multiplex multiple inputs?

 

Thanks

 

Mathew 

0 Kudos
Message 1 of 6
(2,943 Views)

 

The general solution to that would be an Array.

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 6
(2,938 Views)
U mean i have to use a shared variable array? and how do i multiplex it?
0 Kudos
Message 3 of 6
(2,926 Views)

I don't think a shared variable is applicable. In general, if you have a simple array, by definition you have multiple inputs.

 

You really need to provide some additional information. Are you using DAQ? Then a physical channel control will allow you select however many channels you want.

 

Multiplex multiple inputs how and to what?

0 Kudos
Message 4 of 6
(2,921 Views)

OK.. the system is broadly like this.. I get data from DAQs(NI 9215), online databases, remote servers and data given on the front panel. I process them. So my requirement is to use them in a time multiplexed fashion and process one data at a time. 

 

My doubt is whether the number of signals from the same source(for eg two or more data given from the front panel) can be increased without changing the program. And how do i multiplex them. Is there any specific VI available for multiplexing?

0 Kudos
Message 5 of 6
(2,913 Views)
Solution
Accepted by topic author lonewulf
Then arrays are the answer. You can change the number of channels simply by specifying a different channel liist. If you use arrays as controls, the array can be fed to a for loop and it will automatically index the array - element by element. That would be 'demultiplexing' the selections.
Message 6 of 6
(2,906 Views)