04-06-2010 03:57 PM
Hello together,
i´m trying to create a kind of "plugin" architecture. My intention is, building an .exe with Labview and then calling Subvi´s dynamicly. The frontpanel of the subvi´s should be loaded into an subpanel. I have a folder in which I save my plugin vis. With "open vi reference" I want to load the vi into the subpanel and with "call by reference" I want to run the selected vi. Everthing is working as i want. But if I build an .exe I cannot run the plugin vis. more precisely everthing works until I have no other subvi´s in my plugin subvi. I don´t want to "always include" the vis because I don´t want to build everytime a new .exe when I have a new plugin vi. I searched the forum but I´m new in programming with labview and I couldn´t find something what helps me to solve this problem.
Let me know if anyone need some more information
Thank you
johannes
04-06-2010 04:03 PM
04-06-2010 04:07 PM
And have you looked at the example called 'Plug In Example (Help>Find Examples)?
One thing you have to be careful about is making sure that when you distribute the subVIs, all of the dependencies are included in your distribution. This might include DLL's such as lvanalys.dll
04-07-2010 03:11 AM - edited 04-07-2010 03:19 AM
I´ve add an example. It´s LV8.5.1. Maybe someone can look at this example and tell me what I can do better (I think it´s a lot 😉 )If I start the main.vi the "plugins" are loaded. If I start the .exe the "plugins" aren´t loaded.
Thanks
johannes
04-07-2010 03:23 AM
I have an App that is using plug-in's. The way I designed it:
Each plug-in is an exe. The top level vi has the same name as the exe. In older LV versions, the exe is working like a folder, so I call /plugin-dir/plugin1.exe/plugin1.vi
For 2009 it is a bit different, see the ThiningInG blog
Instead of exe, an llb can be used (but then you need the IDE and not only the runtime installed on the target PC).
Other ways would to prefix every SubVi with the character '_', this is the way LV is browsing user.lib
Felix
04-08-2010 02:21 AM
Thanks everybody for the answers.
@Felix
I´m using LV8.5.1, so the way of using the vis in an .exe doesn´t work. I think since LV 8.2 the way you told me is not working. I tryed using an llb; it works. I created the llb with an sourth distribution an removed the three checkboxes exclude files from vi.lib, user.lib, instr.lib. So everything is in the new llb. The problem now, is when I create vor every plugin such a .llb conflicts will occur, because it could be that the same vis are in different .llb´s.
Of course it could be that implement your hints in a wrong way.
Are there some other ways to do what I want?
Thanks everybody
johannes
04-08-2010 03:45 AM
To avoid name conflicts, the old approach is using namespaces. The OpenG builder will automate this for you. The newer approach is using libraries (lvlib), but I don't know how they work internally (so how to call the vi's).
Felix