LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle paths to PPLs?

I have a program that handles several different instruments. Each of those instruments has its own library, most of them have an external .dll file(s). At the moment I have each instrument in a class inheriting from a common parent. But because all instruments are loaded into memory when running the program, when I distribute the program as an executable, I have to provide all dlls of all instruments, even if the instrument isn't available.

 

I understood that a factory pattern is ideal for this, loading only the available instruments in memory. PPLs seem to be the best way to go about this. I have tried using them, but I always get a lot of dependency errors and issues. I know how to setup a factory pattern (I've followed this guide: Plug-in Architecture using Packed Project Libraries (lvlibp)) My question is how to handle the PPLs? Where to build them? Difference between dev environment and production environment? How to properly handle dependencies? Some PPLs I've tried became very big >1MB even though the library itself is only 100-200 kB. So PPLs duplicate a lot of code.

 

At the moment I have a HAL.lvlibp that I build to /data/. Then a separate lvlibp for each instrument that I build to /data/instrument_N/. Each of those folders also contains the dll of that instrument. However, I would like to have all the lvlibp files in my SCC folder so I don't have to rebuild all PPLs when I download my repository. Same for the dlls. What is the best way to handle this?

0 Kudos
Message 1 of 3
(1,531 Views)

If you're going to use PPLs, I recommend you watch the presentation associated with this:

 

Ludicrous Ways to Fix Broken LabVIEW Code

 

There is a section in there on PPLs.  I highly recommend you watch the whole thing but at the very least just that part.

 

From my own experience with PPLs (limited) it seems that they are one of those things that solve one problem by giving you 2-3 additional problems.  They may or may not be worth it for you.

 

At the end, in our company we had to abandon them because the HAL library which we built years earlier just couldn't be adapted to them without a complete refactor.  

0 Kudos
Message 2 of 3
(1,501 Views)

Take a look at this presentation: Effectively_Using_Packed_Project_Libraries_SEPAD.pdf ‏2772 KB

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 3
(1,483 Views)