LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass VI ref. from LV ActiveX server to LV executable?

Greetings all,

The question is:  How can I pass a VI Server VI Ref from a vi that is dynamically called using LV ActiveX?

The method I'm trying to use is the "CALL2" method.  The target vi executes fine, parameters are set and read fine using the paramNames and paramVals inputs/outputs of the invoke node, however this doesn't work on one of my outputs which is a VI Reference.  Probing the reference wire after it is converted back yields "Refnum No Longer Valid" along with the hex value of the refnum.

Why I need to do this:  I'm building a highly modular application that consists of a core application and several "plugins."  All are developed in LabVIEW 8.2.  The core application is an .exe file, the plugins are .dll's and can be updated on site without a full recompile of the app, and the user can also pick and choose the plugins they wish to install.  In this sense it works a lot like the Firefox web browser.  Idealy, others should be able to develop plugins.  In order for them to be able to test and debug their plugins while launching them from the core, the core application needs to be able to run uncompiled VI's as plugins.  This can be accomplished one of two ways that I know of.  Either through the use of a VI Server, or by instantiating LV through ActiveX and using the ax properties and methods to run the vi.  When a plugin is started, it spawns a thread that allows it to communicate with other plugins and monitors it's UI, then returns a reference to the plugin main VI so that the core application can display it in a sub panel.  The goal is to not use the VI Server method which would cause the uncompiled VI to attempt to execute under the Core app's instance of the run time engine, but to execute it using the LV Dev. Environment through ActiveX so the developer can pause, probe etc their plugin vi.

So far the whole architecture works great when:
Core is compiled and plugins are compiled
Core is not compiled, plugins are compiled
Core is not compiled, plugins are not compiled

What's missing is the way the core should be deployed to potential plugin developers:
Core is compiled, plugins are not compiled.

It is also not possible to pass the VI refernece back to the core by just using the AX GetVIReference function, since AX refs and VI Server refs are not the same and an AX VI Ref can't be placed in a sub panel.  Is there possibly a way to convert an AX VI Ref to a VI Server Style VI Ref?

Thanks for any insight in advance.
0 Kudos
Message 1 of 2
(2,170 Views)
Just an update, I've bumped this up to NI tech support and they are looking into it...
0 Kudos
Message 2 of 2
(2,151 Views)