From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Wire class conflict when using LVLIBP

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 8
(3,254 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 8
(3,230 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 8
(3,223 Views)

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 8
(3,222 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 8
(3,219 Views)

this is DLL hell again guys

 

NI should fix it

0 Kudos
Message 6 of 8
(3,213 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 8
(3,209 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 8
(3,200 Views)