LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV OOP - Plugin

Hi,

 

I am trying to implement the plugin example with LV OOP. At the moment if I plugin the ppl in a new project and call an class I get the error 7 - Default Class Values - not found. From the development environment everything is ok - but a calling exe throws this error. I have also attached a screenshot of the calling of the ppl which is embedded in an exe.

 

Maybe somebody has an hint.

 

Best Regards,

 

Joachim

Download All
0 Kudos
Message 1 of 11
(4,379 Views)

Joachim,

 

you currently use a static path including an IP address. Is this your local PC?

If not, how does the code work if the plugin (hence the path) is on the same machine?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 11
(4,370 Views)

Hi Joachim,

 

I have following observations/questions

 

Why is the Packed Project Library(PPL) built with both Parent and Child class togather? As i understand the use of PPL for plugin architecture correctly, first you need build the parent class (Interface class) alone in a seprate PPL and use this PPL for the Plugin or Child Class which inherits from the parent class in PPL file and then create the PPL of the Child class. Please note, use the same Parent Class (interface class) in PPL file both, in the LabVIEW application development as well as for the child class or Plugin class(PPL) creation.

 

In the above way both the LabVIEW application as well as the Child (Plugin class or PPL) development uses the same Parent (interface) class in PPL. 

 

As per the attached image file, in the calling of the ppl VI, are you using the EVAL class from PPL? 

 

Hope this helps.

 

Best Regards,

Vijay. 

0 Kudos
Message 3 of 11
(4,356 Views)

Norbert,

 

the ppl is located on a network share - from which every caller can connect. Where shell I include the "Get LV Class Default Value.vi" which wasn't found at exe runtime? In the ppl or in the calling exe?

 

Best Regards,

Joachim

0 Kudos
Message 4 of 11
(4,315 Views)

Vijay,

 

yes the parent class is also in the ppl - i think this isn't the problem.- all callers are using the ppl classes.

 

Best Regards,

 

Joachim

0 Kudos
Message 5 of 11
(4,310 Views)

Joachim,

 

as far as i understand, error 7 is generated by the VI "Get LV Class Default Value". If this VI would be missing in the EXE, the complete EXE would not start running (subvi broken).

So what the error tells you is that the file you pass as path information to "Get LV Class Default Value" is not loadable by this function. This could mean that your path is incorrect or the function does not accept it as LV class file.

 

So please check if distributing the PPL to a different system is the source of this error. Since i have never done that, i can imagine that this is the source.

 

Regarding placing all inheritance levels into a single PPL:

It is absolutly valid, if the PPL should be a stand alone component and the whole inheritance hierarchy is only necessary within the PPL.

Splitting up inheritance hierarchies into different PPLs could lead to unexpected situations which are described here.

 

The only cultrip is that the caller has to know at least the ancestor functionality (if using dynamic dispatching) so, even during development, LV has to load and know the general plugin functions. So in most cases, the ancestor is part of EXE.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 11
(4,306 Views)

Norbert,

 

you are right - the path is the problem - the application builder places the same ppl in the data folder - when i call this ppl directly everything is ok. Obviously the network share is the problem - when more than one applications are using this ppl I have to replace in every exe the ppl (in the data folder)

 

Best Regards,

 

Joachim

0 Kudos
Message 7 of 11
(4,302 Views)

Hi,

 

unfortunately my problem isn't solved. When I run my application on a system with the development environment everything is ok - but with dsc runtime the application searches for a method within the ppl. I definitly know that this sub-vis and all classes are in the ppl. What is the difference between development and runtime when calling an exe?

 

Best Regards,

Joachim

Download All
0 Kudos
Message 8 of 11
(4,263 Views)

Joachim,

 

have you already checked if altering the settings in "Additional Exclusions" in the build spec of the PPL changes the behavior?

 

Are you sure that you have the correct folder setup within the PPL?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 11
(4,245 Views)

Joachim,

 

Does your Loading VI in you application uses the Methods and Parent Class (Interface) from PPL or not?

 

I guess, still your application VI is not using the methods from PPL instead it is using the methods from the Class directly (Unbuild from).

 

Can you create a prototype, which can produce the error described.

 

Thanks,

Vijay.

0 Kudos
Message 10 of 11
(4,226 Views)