Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Wire class conflict when using LVLIBP

Solved!
Go to solution

Clipboard01.jpg

LV2015
I made a project , with 1 single Actor ("ActorModBusPolling").

Then I buildt the packed lib.

 

In anothe project, I add my packed lib, then drop the actor class, 2 property set, and call launch root actor.

I have a wire class error.

WHY? IMHO it's a BUG! It can't be wire class conflict, because my object DERIVES from Actor class.

 

PS: If I add the library as source, it works. WTF!?

If I add the LVLIB file it works, but LVLIBP no.

0 Kudos
Message 1 of 10
(4,006 Views)

Have you checkeg the class Hierachy diagram?

Does your LVLIBP-contained Actor inherit from the Actor class?

 Have you build the LVLIBP including the Actor class?

0 Kudos
Message 2 of 10
(3,982 Views)

Does your LVLIBP-contained Actor inherit from the Actor class?

 

Yes

 

Clipboard02.jpg 

 

Have you build the LVLIBP including the Actor class?

 

Not explicitly.

Everything is in "include if referenced", also "dependencies"

 

It's the first time I use lvlibP , I don't know what's wrong

0 Kudos
Message 3 of 10
(3,975 Views)
Solution
Accepted by CaseyM

One of the things I learned when messing with PPL's and AF is that a packed class is a distinctly different class than it's source equivalent. Even though one is directly built from the other, LabVIEW seems them as different. Thus you can't mix and match PPL and source of the same actor in a system.

 

When you build a packed library, it needs a packed version of actor framework.lvlib. Either it's built into your PPL actor, or it has to be built separately and your actor class must inherit from the PPL version before creating it's own PPL. If you want to keep them separate you must remove dependent packed libraries in the build spec of your actor PPL. Consider a plug in architecture - all the plug-in's must inherit from the same base actor framework.lvlibp, otherwise you'll have this class conflict. It's not an easy system to manage. I eventually decided against PPL's because I'm using the same source code on multiple target types. Managing PPL's for that is...not fun.

 

 

0 Kudos
Message 4 of 10
(3,974 Views)

@Ironman:

what has happend in your case: Actor Framework is packed into your LBLIVP resulting in a different namespace.

This means that the AF VIs you are taking from the BD palette are referencing to a different library, as such to a different object.

That's the reason, the object wires are broken.

 

There are some threads around this group discussing the usage of LVLIBP usage together with AF.

 

I am also using this approach, yet it takes some time to get the idea and avoid pitfalls

0 Kudos
Message 5 of 10
(3,971 Views)

this is DLL hell again guys

 

NI should fix it

0 Kudos
Message 6 of 10
(3,965 Views)

There will be a better solution in NXG.

 

After all, it is not really as bad as DLL hell: some things to be taken care of, yet there's only one LVLIBP loaded into memory at a given time.

 

You might want to check this for more information on PPLs / LVLIBPs

0 Kudos
Message 7 of 10
(3,961 Views)

If I have a "module" (actor or whatever), that does a specific thing (for example: at startup, getting all required files and configurations from network folders), what is the best practice to manage its updates?

 

for example: I develop a "version 1", it works, and some softwares use it.

 

Then a month later, I find a bug OR I want to add a feature, so I will recompile it.

 

What are the best practice to avoid problems and avoid older software break?

 

Maybe deploy  with "app-style" ? (that is all the software and libs are in a folder/app/silo)

0 Kudos
Message 8 of 10
(3,952 Views)

Any update here? How to replace lvlib with a ppl without class wire conflicts?

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 9 of 10
(384 Views)

@bienieck wrote:

Any update here? How to replace lvlib with a ppl without class wire conflicts?


Using the "Replace with..." dialog should help a lot, but it doesn't change the cause of the issue:

 

@wrkcrw00 wrote:

One of the things I learned when messing with PPL's and AF is that a packed class is a distinctly different class than it's source equivalent. Even though one is directly built from the other, LabVIEW seems them as different. Thus you can't mix and match PPL and source of the same actor in a system.

 

When you build a packed library, it needs a packed version of actor framework.lvlib. Either it's built into your PPL actor, or it has to be built separately and your actor class must inherit from the PPL version before creating it's own PPL. If you want to keep them separate you must remove dependent packed libraries in the build spec of your actor PPL. Consider a plug in architecture - all the plug-in's must inherit from the same base actor framework.lvlibp, otherwise you'll have this class conflict. It's not an easy system to manage. I eventually decided against PPL's because I'm using the same source code on multiple target types. Managing PPL's for that is...not fun.


You still may need to change your actors to inherit from the PPL actor instead of the vi.lib one, etc. Using something like LV Solution Builder can help with managing and building PPLs but there are always going to be challenges.

CLA CLED AF Guild
Message 10 of 10
(359 Views)