LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Packed Library

Solved!
Go to solution

Hello All,

I need some help on LabVIEW classes and library.

I created one project in this project, first i created one parents(PowerSupply) class. 

after that i included one child class(PSSimulated).

Through code i am able to load child class, but when i created packed library for both(parents class and child class) i am not able to call child class through parents class. 

 

I know that error came because parents class not able to load child class(may be path issue).  i tried many way to resolve that issue. 

 

So please help me how i will create packed library without this issue for both parents and child class for resolving that issue. 

0 Kudos
Message 1 of 8
(1,602 Views)

Hello Community

in attached image i am class path is parents path and loaded class path is child class. location of the child class is same as shown in path but still facing issue when i calling child class using parents packed library. 

 

 

Thank you.

 

0 Kudos
Message 2 of 8
(1,522 Views)

It is extremely hard to debug pictures.  Can you supply some example code that shows the issue?

 

My suspicion is you are inheriting from the wrong class (in the lvlib vs in the lvlibp).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 8
(1,512 Views)

Hello, 

 

I attached one sample code in this post.

The folder contains one instru project which has two classes one parent and another child.

PSChild and PSParents folders both has also a project. that project i am using for building the packed library.

in PPL folder containing the packed library.   

everting working fine. but when i build a packed library i am not able to call the child class using parents' class

   

0 Kudos
Message 4 of 8
(1,488 Views)
Solution
Accepted by amit01

Finally got back to being able to look at this...

 

You have the classic issue with PPLs.  When you build "Child", it is using the non-PPL parent class.  So it pulls in its own version of "Parent" into the PPL, adding the PPL namespace to it.  Now when you try to use "Child.lvlibp:Child.lvclass" in code that uses "Parents.lvlibp:ParentsClass.lvclass", you will get an inheritance issue.

 

There are currently 2 solutions to this.

1. Use a separate project for the parent and child classes.  You use the built parent PPL in the child project so make sure child PPL does not pull in its own version of parent.

2. Use Solution Builder.  You can get more details here.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 8
(1,457 Views)

With the help of your post finally issue resolved.

Thank You for your support. 

🙏🙏🙏🙏

0 Kudos
Message 6 of 8
(1,398 Views)

Hi, I guess I have a very similar problem. 

I made an example because I cannot share the real project.

In the example, I have one Parent class which is the Camera, then I have two children: WebCam and Simulation.

Everything works ok as long as I use the code. Inharitance works when I connect the different classes to my VIs (Main.vi)

logatto_0-1680792057248.png

logatto_1-1680792078721.png

 

Problem start when I try to use the PPL. I do not know what is the right procedure then I tried some.

- Build a PPL of the parent including children.

- Build each PPL alone, and use them separated folder (Main_Packed.vi) and copy the 3 of them in the same folder (Application , Main_Packed_App.vi). 

But in all cases I tried, I do have a broken wire and seems the inheritance does not work.

 

What is the right procedure? I have seen some pdf online but they did not help.

 

Thanks in advance for your support.

0 Kudos
Message 7 of 8
(1,157 Views)

@logatto wrote:

 

- Build a PPL of the parent including children.

- Build each PPL alone, and use them separated folder (Main_Packed.vi) and copy the 3 of them in the same folder (Application , Main_Packed_App.vi). 


#1 should work, i believe.

#2 fails for the reason Crossrulez says two posts up.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 8
(1,147 Views)