Black Pearl Posted April 30, 2009 Report Share Posted April 30, 2009 Cross-post from http://forums.ni.com/ni/board/message?boar...hread.id=405018 resonance wasn't to greate there. I'm planning an application with a plugin architecture, that will look up a directory during runtime for available plugins. I know I could do it using .llb Top-Level VIs. But I would prefere to have the plugins 'compiled', so as exe or dll. Is that a straight foreward build of those plugins or do we need to take care of some things? And how about compatibility when we use plugins of a newer LabVIEW version? Felix Quote Link to comment
ShaunR Posted April 30, 2009 Report Share Posted April 30, 2009 The "Specify path on diagram" is the way forward but I don't think that exists in 7.1 (long time since I used that). So you would have to use the old method of creating an intermediary DLL which you can call from the "Call Library Function node" to pass data too and from other the other DLLs. (2D array in and out always worked best for me). Not elegant, but it works.When you create the plugins, if you make their inputs/outpts are a 2D array then your intermediary dll only needs 2 inputs (the dll name and the 2D array) and one output (2D array). Quote Link to comment
candidus Posted April 30, 2009 Report Share Posted April 30, 2009 In LV7.1 you can open a VI reference to a VI that resides in a DLL or EXE. Wire its path to the "Open VI Reference" primitive, the parent "folder" of the VI is the DLL or EXE. But I think things get complicated if you want to use DLLs/EXEs built with different LabVIEW versions. Quote Link to comment
ShaunR Posted April 30, 2009 Report Share Posted April 30, 2009 QUOTE (candidus @ Apr 29 2009, 09:02 AM) In LV7.1 you can open a VI reference to a VI that resides in a DLL or EXE.Wire its path to the "Open VI Reference" primitive, the parent "folder" of the VI is the DLL or EXE. But I think things get complicated if you want to use DLLs/EXEs built with different LabVIEW versions. Much better solution. Quote Link to comment
Black Pearl Posted April 30, 2009 Author Report Share Posted April 30, 2009 Got it working. It goes actually very nice as I can execute each plugin-exe on it's own as well as launching it as plugin. But I observed some strange behaviour of the plug-in's FP. Although set to 'top-level' (open front panel when called), it did not show up using the run method. I had to use the FP.Open property in the plugin vi. Thanks, Felix Quote Link to comment
jpdrolet Posted April 30, 2009 Report Share Posted April 30, 2009 QUOTE (Black Pearl @ Apr 29 2009, 07:48 AM) Although set to 'top-level' (open front panel when called), it did not show up using the run method. I had to use the FP.Open property in the plugin vi. That is the expected behavior when opening a VI with VI Server; you have to manage the FP opening explicitely. About the compatibility issue between LabVIEW versions, whether you use exe or dll, you can't open a VI reference to a VI having a different version in your application instance. However, you can have an executable (7.1) running for example the 7.1 plugins and another 8.6 application invoking them opening first an application reference with the VI Server. Quote Link to comment
Aristos Queue Posted April 30, 2009 Report Share Posted April 30, 2009 QUOTE (Black Pearl @ Apr 29 2009, 06:48 AM) Got it working. It goes actually very nice as I can execute each plugin-exe on it's own as well as launching it as plugin.But I observed some strange behaviour of the plug-in's FP. Although set to 'top-level' (open front panel when called), it did not show up using the run method. I had to use the FP.Open property in the plugin vi. "Run when called" literally means "when called as a subVI." If it is run as a top level VI (i.e., when you use the Run method of a VI), it doesn't open the FP. If you run it using the Call By Reference node, that calls as if it is a subVI, but it does not sound like you want the rest of the behavior that comes with that. So, yes, the right way for a top-level VI is to use the FP.Open method. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.