LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Project libraries, polymorphic VIs, and access scope

I'm trying to be good and arrange all my VIs appropriately in project libraries*, marking each VI as public or private as I go. But I have found that, when a polymorphic VI is called from outside a project library, LabVIEW uses the access scope (public/private) from the instance VI, not the polymorphic VI. It seems that the scope for the polymorphic VI is simply ignored; you can even call a private polymorphic VI, as long as the instance VI is public. I assume this has something to do with how the actual instances are dropped on the diagram via the polymorphic VI. Is this the intended behavior? It just doesn't seem like the way things should be, at least not in my head.

The attached example contains a project library (Case Lib.lvlib) with three VIs:
  • Poly (private)
  • Case DBL (public)
  • Case I32 (private)
There is also a Use Case DBL VI that calls Case DBL via Poly and a Use Case I32 VI that calls Case I32 via Poly. Use Case DBL runs fine. Use Case I32 has a broken arrow.

Originally, I had made a library with a public polymorphic VI and private instances, because that's what makes intuitive sense to me. Calling the polymorphic VI from another VI didn't work because the instances were private.

(Cross-posted from LAVA.)
Message 1 of 2
(2,865 Views)
Good observations, these are all issues we are working on addressing in future versions of LabVIEW.  Ultimately the behavior we are going for is having the library scope checking be on the poly VI and not the instances, but I can't say at this point in which version of LabVIEW you would be able to see this changes.  Thank you for the feedback.
0 Kudos
Message 2 of 2
(2,845 Views)