Hi.
I often make code that can handle many different types of input data - code that obtains queues, functional globals that just stores data and doesn't operate on it and so on. Usually I can get along by using poly-VIs, but many times I could save a tremendous amount of code if I had a generic-type control, or a control that adapted at edit-time to the wired data type. I could also much more easily re-use poly-VIs inside other poly-VIs (to obtain variability on more than one input, without making all permutations of instances).
Second best would be something like a generic cluster control/indicator, since I can't make a poly-VI that takes a cluster of a type I don't know when I make the poly-VI. And what would be the odds of me knowing the type of any cluster before someone using my toolset defined that cluster?
This code snippet could replace an entire poly-VI (I know this snippet does nothing that the ordinary Obtain Queue doesn't do, but imagine that it did):
I'd expect a broken arrow if a generic input wasn't wired, even if it is only recommended or optional - the compiler needs to know the data type to determine default values, available methods, to select other poly-VI instances down the wire etc. A VI with a generic control on its FP wouldn't work as a dynamic VI obviously, unless someone comes up with something clever (it's late here in Denmark, so I'm somewhat below par on brilliance right now )
There are probably a zillion pitfalls in this, and it'll be both risky and time consuming to implement (it impacts almost everything in LabVIEW), so let's see how far we get. Anybody else in need of this feature?
Cheers,
Steen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.