Jump to content

Plugin architecture as exe in 7.1.


Recommended Posts

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

Link to comment

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).

Link to comment

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.

Link to comment

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.

Link to comment

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

Link to comment

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.

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.