1. Abide by a specified interface.
2. Are independent of each other.
3. Don’t result in name-conflicts when used in a built application.
4. Installation is independent of main application installation.
1. Is extensible without code modification to main application.
2. Depends only on plug-in interface, not on specific plug-ins.
3. Loads plugins dynamically.
4. May utilizes plug-ins as UI elements or OO Design Pattern such as Strategy or Command.
5. Requires no modification to successfully run in development or run-time environment.
6. Installation is independent of plug-in installation.
The download is available for LabVIEW 2011. If you want it in a previous version, follow the steps in the presentation to implement it yourself.
I'm interested in receiving community feedback, so please comment or ask questions.
In response to questions about displaying plug-ins in a sub-panel and communicating with message queues, I attached a version that does this in the simplest manner I can imagine:
All,
Apologies for tacking onto an existing/old post, but this thread best-describes what I'm currently trying to accomplish, and getting hung up on. In short, the plugin architecture described herein is exactly what I'm looking to implement in a data acquisition/logging application. I intend to use this to display "customizeable" plot panels depending on the type of sensor/measurement being acquired. I have attempted to follow the excellent example provided by Mike, and believe that I have completed all of the steps appropriately, but I'm getting hung up on a very important part of the process (the "Test Run" portion).
I've setup my application a bit differently than the example, namely that: 1) I'm creating the Plugin interface and Test VI as part of the same project, and 2) I'm creating multiple Plugin*.lvlibp files within the same "Plugins" project (the "Build All" option will work great for me for the few canned examples I need). See below (note: "Plugin-A and "Plugin-B" directories are identical):
In terms of the "Test.vi" application, I've simplified my code to essentially just start with the user specifying the location of a plugin (for example, "PluginA.lvlibp"), running in the Development environment. The program returns Error 1498 at the "Get LV Class Default Value" VI (see below).
I've searched 100 different ways for a solution to what I'm doing wrong (I assume it's something dead-simple), but most answers pertaining to lvlibp files, plugins, and Error 1498 specifically are related to run-time (executable) challenges. Can anyone point me to what I'm missing here?
I can upload code (LV2018 x64) if that's helpful, but couldn't find the button to do so in the new formus setup...
I greatly appreciate any suggestions you can offer!
Mark
Hi Mark,
since your PluginA.lvlibp : PluginA.lvclass and PluginB.lvlibp : PluginB.lvclass inherit from PluginInterface.lvlibp : PluginInterface.lvclass this is the one that needs to be in memory when they are loaded dynamically. I am suspecting that you have the development version of PluginInterface.lvclass in memory since you have the Test.vi and the PluginInterface.lvclass in the same project. My suggestion is to create a project that contains the Test.vi and PluginInterface.lvlibp and than load PluginA.lvlibp : PluginA.lvclass or PluginB.lvlibp : PluginB.lvclass dynamically casting it to more specific PluginInterface.lvlibp : PluginInterface.lvclass. So make sure the class that is on the block diagram in the Test.vi is the PluginInterface.lvclass from the packed library.
Also pay attention to exclude dependent packed libraries when building PluginA.lvlib and PluginB.lvlib.
I hope this helps. If not I'm willing to have a look at your code.
Kind Regards,
Stefan Lemmens