Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Dinamic Inputs requirements to SubVIs

Hi All,

I am not an expert on Labview, but recently I adapted some serial protocols created some years ago for an acquisition system.
I have two different boards to communicate with, both have their own protocol. I have two SubVIs just to communicate to witch one at a time. They are in everything similar, the only thing that changes are delays, timeouts and the serial message.

I manage to combine both in only one and I am feeding the input data in a cluster, though the list of commands just doubled.

 

Similar to most of the modulus available to work. Is there any cleaver way of somehow dynamically change the input types and combo boxes default depending on other input we link on the calling VI?

 

For instance, when we simply build an array if we connect to it a number the rest of the inputs expect a number too and automatically give an error if I try to connect a string to it!
In this case I would like that the board address for instance, automatically adapt other inputs to the expected commands of the that especific built in protocol.

Example  

0 Kudos
Message 1 of 3
(4,327 Views)

This does not sound like a good place to combine your code.  It would be best to have two different lilbraries for each board.

 

Now, as far as adapting to inputs, you could look at polymorphic VIs.  But they can only adapt to data types, not values.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(4,318 Views)

I understand your opinion! Was a doubt in the beggining too, but it works fine like this and is less a sub vi in the folder... 
I did not knew how to do that, I guess I can manage a way to develop something from that!
Thak you! 

 

0 Kudos
Message 3 of 3
(4,313 Views)