LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW classes not fully compatiable with polymorphic VI's

I'm just working on a set of fully object orientated drivers for a .NET assembly provided by a 3rd party that we have to integrate into our existing code.
 
To provide base command functionality into the .NET assembly I am using polymorphic vi's (an example of which I have attached) to allow different data types to be sent to our .NET object.
 
This works great except that the .lvclass when passed out of the polymorphic vi becomes invalid and I get the following error message :-
 
"Terminal: One or more of the inputs to this tunnel or shift register does not originate at the dynamic input front panel terminal"
 
This appears to be a limitation with using .lvclasses with polymorphic vi's that I can't see a way around, but thought I'd post on here just to see if anyone else has experienced this and found a way round it.
 
It's not critical as the polymorphic vi's are not writing to class data, only reading, but as I've always made good use of polymorphic vi's, and am now developing almost exclusively using .lvclasses I can see that it's going to be a real pain if I want to use polymorphic vi's that write to class data.
 
David Clark
CLA | CTA
Genesee Technologies Ltd
Hampshire, England
0 Kudos
Message 1 of 6
(3,913 Views)

Hi David,

Could you attach the example?

Thanks

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 2 of 6
(3,893 Views)

Hello,

I'm not sure I completely followed your use case, but I can tell you that a VI in an LVClass with dynamic dispatch inputs cannot be used in a polymorphic VI.  This is a known limitation.

If this is not what you are asking, as Adam suggested, attaching the VIs that you referenced would be helpful.  🙂

Thanks!

Message 3 of 6
(3,884 Views)

Hi Jeff,

Just came on here to post a bit of code for Adam to have a look at, but having read your answer there's probably no point - if it's a known limitation then there isn't anything that can be done about it - any idea if this will be fixed in a future LabVIEW version as polymorphicism is a fairly fundamental part of OO programming?

 

Message Edited by davidpcl on 07-27-2007 04:51 AM

David Clark
CLA | CTA
Genesee Technologies Ltd
Hampshire, England
0 Kudos
Message 4 of 6
(3,870 Views)
Just to clarify - run-time polymorphism via dynamic dispatching works just fine in LVClasses, and should be sufficient for most use-cases I am aware of.  What I thought you were asking about is having a polymorphic VI contain a VI with dynamic dispatch LVClass inputs.
 
While there may be a perfectly valid use-case for this, I am not currently aware of this, and to answer your question, I do not know if or when this will be supported.  If you have a use-case for this, please let me know, it would help me evaluate whether or not there might be a better way to solve your application's use-case, and at the same time help us prioritize defining what the behavior should be for dynamic dispatch VIs inside polyVIs, and subsequently scheduling it for some future LabVIEW release.

Message Edited by Jeff B on 07-27-2007 07:29 PM

0 Kudos
Message 5 of 6
(3,855 Views)
Hi Jeff,
 
Thanks for your interest and replies to this issue.
 
I've played around a bit more and narrowed down the limitation - it is simply that if you use a polymorphic vi within a dynamic dispatch vi, you can pass the class handle into the polymorphic vi, but if you try and connect the output of the polymorphic vi to the dynamic dispatch output terminal it will error.
 
I've added a picture of a vi where this occurs - the 'send command' vi to the right is a polymorphic (with non dynamic terminals) - notice the thickness of the wires going in and out - if I then change this to a non-polymorphic vi i.e the actual vi the polymorphic links to it is fine.
 
I think from what you've said we're talking about the same thing, and it is a know limitation - just wanted to give you a use case for it as you requested.
 
David Clark
CLA | CTA
Genesee Technologies Ltd
Hampshire, England
0 Kudos
Message 6 of 6
(3,826 Views)