LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, it is possible to dynamicly change number of inputs - outputs in VI ?

Ok,

these are the sub modules which you call from an main module in your application right?

First, find the total number of inputs and outputs of all the sub mudules. Consider the common input for all the sub module  only once while counting.( Donot inlude them in all, you can use it for all the sub modules ). If the total number goes beyond 28, then you cannot make a single sub module which will have all the sub modules.(unless you think of using clustersSmiley Wink )

If not exceeding 28 (or now u thought of using clusters) Then, create another vi with a case stucture. Create cases for each of your sub module, place the sub module(VI)s inside the respective case.

Just call the corresponding case to be executed from the main VI(module) of your newly created vi. Pass the corresponding inputs to the submodule, and get the output.

Hope this helps.



Message Edited by Vsh on 04-02-2008 06:07 AM
0 Kudos
Message 11 of 18
(1,204 Views)
It is not recommended to use a subVI with 28 terminal connector though Smiley Wink
0 Kudos
Message 12 of 18
(1,186 Views)
Thanks Vsh I'll try do something similar that you describe.
But submodules have not smilar nature - TTL, DAC, ADC, frequency meter and etc, with different number of channels, and all this must be easy understand for users, i.e. best decision will be dynamically changing VI with different number of channels and different configuration parameters. How I understand under LabView it is impossible.
0 Kudos
Message 13 of 18
(1,181 Views)

Glad I could help.



AMV wrote:
But submodules have not smilar nature - TTL, DAC, ADC, frequency meter and etc, with different number of channels, and all this must be easy understand for users, i.e. best decision will be dynamically changing VI with different number of channels and different configuration parameters.


As you know that your sub modules are not the same, then there is no point in changing the connectors dynamically!!! They have to be used differently.
 
And, it is not like its impossible to do with Labview, there is an option of using a polymorphic VI, If you have time, you can go through this link.
0 Kudos
Message 14 of 18
(1,175 Views)
In my understanding dynamically - mean - when user add VI - VI should changing under current set of submodules.
0 Kudos
Message 15 of 18
(1,172 Views)
Now trying polymorphic VI.
0 Kudos
Message 16 of 18
(1,166 Views)


AMV wrote:
In my understanding dynamically - mean - when user add VI - VI should changing under current set of submodules.



That exactly is what a Polymorphic VI do.
Have a look at functions in Functions Palette>>Signal Processing>>Waveform Measure. Most of them are polymorphic VIs. Just right click on the functions, select the type in "Select type". You can observe that the terminals are changed when you select different types. Also right click on the function Visible Items>>Polymorphic VI Selector, click on it. Now you can set the type directly under the function.
 
Or if you have used DAQmx VIs, then its same as the Create Virtual Channel.vi, where the developer can select his choice.(and that exactly what you want to do right?)
 
Hopefully I have not confused you Smiley Wink
 
 
0 Kudos
Message 17 of 18
(1,165 Views)
Of course not.
(I finished
confusing in university Smiley Wink  )

Thanks Vsh and others for help.
Begin trying.

Thread closing.


Message Edited by AMV on 04-02-2008 05:14 PM
0 Kudos
Message 18 of 18
(1,161 Views)