LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
BruceAmmons

Inline VI with polymorphic inputs/outputs

We already have inline VIs that are compiled directly into the code, just as if you had wired the code on your diagram.  Imagine if we could designate some of the inputs and outputs as polymorphic.  We could create VIs that do simple math operations, comparisons and other stuff without having to create a dozen versions for the different inputs and outputs possible.

 

I think the outputs would have to be either a fixed type or same as a selected input.  Some inputs, such as strings, wouldn't work in many cases.  If the input wired to the inline VI was not compatible, it would just fail to compile and give you a broken wire, just as if you had wired the same code into your diagram.  It really would just be a block of code that could easily be added to a diagram as a VI, but it would be recompiled based on the inputs.

 

Bruce

Bruce Ammons
Ammons Engineering
4 Comments
tst
Knight of NI Knight of NI
Knight of NI
Mr.Mike
NI Employee (retired)

It sounds like you're looking for a generic VI, not a polymorphic inlined VI.  It's possible to create a poly VI with inlined instances, but you're responsible for creating each of those instances.  What tst linked (2nd) is in fact a generic vi.

 

- Mike

-- Mike
BruceAmmons
Trusted Enthusiast

Yes, I think I want a generic VI, and I want the ability to modify it.  This is more or less a duplicate of the other post (which I voted for long ago), but I have a specific way to get there for NI.  It sounds like they are working on it, so I guess I can try to be happy about it until appears in some beta version of LabVIEW in a few years.

 

Bruce

Bruce Ammons
Ammons Engineering
G-Money
NI Employee (retired)