LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I preserve the numeric representation of an input to a subVI?

 
I am trying to pass a numeric value into a subVI. However, the representation of this value can be any of the available representations in Labview. How do I pass and preserve the original representation of this value?
 
 
0 Kudos
Message 1 of 3
(2,679 Views)

If you really need the representation to stay the same, you need to make a polymorphic VI to handle all the different numeric types. Each instance VI will then take in a different data type. Then when you place the polymorphic VI on your block diagram, you can select which instance to use, or just wire a numeric wire to it and it will pick the correct instance to use.

To create a polymorphic VI, click "More..." under New on the getting started window, then select polymorphic VI. You'll have to create each instance and add it to this window. Check out the help if you run into any problems.

0 Kudos
Message 2 of 3
(2,667 Views)
Alternatively, you can use a variant as a control, as that will accept anything. It will require decoding the variant to find out what kind of data type it is, and for that you should get the OpenG Data Tools (I think that's what it's called) library.

Message Edited by smercurio_fc on 05-16-2007 01:22 PM

0 Kudos
Message 3 of 3
(2,659 Views)