LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV config refnum gets coerced when inside packed library

Solved!
Go to solution

Hi,

 

I have build a packed library which contains VI's that operate using LV config files. The refnums of these files are outputs and inputs.

When I use this library in my other projects the config file typedefs get casted with my own library name in front.

 

I don't want this to happen. Is it possible to have the standard LV config typedef as output from my library VI's?

 

See the pictures for more information.

Download All
0 Kudos
Message 1 of 4
(3,114 Views)

First know that nothing functionaly bad happens.  A Coercion dot does not mean a loss of data, or that something bad is happening, it means the data type is being changed from one to another that is (on the surface) a compatibile data type.

 

That being said if you do want this fixed I'd say to post your code, I can't see why you can't replace the terminals with the data type of the refnums you want, to have that coersion go away.

0 Kudos
Message 2 of 4
(3,077 Views)

I'm aware nothing functionally bad happens. It is more from a code perspective that I want to understand what's possible.

 

A sample of the code is included in the .zip.

 

Is it possible to write it such that the coercion doesn't happen?

If not, can you explain why? In future I would like to share other typedefs between libs. This way I will always get coercion dots.

 

Thanks.

0 Kudos
Message 3 of 4
(3,055 Views)
Solution
Accepted by topic author Hymstra

No, it is not possible - anything inside a library (including a packed project library) gets namespaced to that library (e.g. MyControl.ctl becomes MyLibrary.lvlib:MyControl.ctl).

 

If you want to avoid the coercion dots, you must make sure that you use the version of the control from within the packed project library everywhere (so you are using the one that's namespaced to the ppl)! You might find that you need to have a 'shared' library/ppl which contains your shared type definitions which is referred to in both your application and your ppls.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 4
(3,046 Views)