Jump to content

Calling an external LabVIEW VI from an EXE


Recommended Posts

Hello coders,

I have recently encountered a problem very similar to the ones described here, but with another variation. At this point I have simplified my application to the following:

-Have a list of plugins which are "Always Included" in the Build Specs

-Main program waits for user to push a button to run a plugin

-Program opens a VI reference for the plugin, opens the front panel, and closes the VI reference.

In the IDE, I can repeatedly load the plugins in any order without receiving an error. In the executable, I can load any of the plugins at least once without error. However, after the first time loading one (a specific one) of the plugins, most of the plugins will fail to load (error 1003) for all subsequent runs. The only way to get the plugins to load successfully again is to close the executable and load it again from scratch.

As a test, I deleted all of the code for the plugin that seems to trigger the errors so that only the controls and indicators corresponding to the connector pane remained. When I run the executable with this plugin instead of the original version, I no longer receive any errors over multiple runs.

So at this point I am relatively convinced that the "suspect plugin" has some kind of bug such that after it loads the first time things go awry. The previous suggestions about missing subVIs seem like they could be appropriate here, but then why does the supect plugin load successfully the first time? Also, why would loading one plugin have any effect on the future loading of other plugins?

Clearly, I could use some expert advice here... and where better to turn than the LAVA community! I'm happy to send more info or code snippets if it will help.

Link to comment
  • 2 months later...
  • 6 years later...

Thanks so much for everyone's help - I appreciate it greatly. I've gone for a combination of options that have resulted in a source distribution of all of the dynamic components. The new Project Explorer has certainly helped me here as it offers a layer of abstraction for the developer - I've created the overall system, and I want my developers to be able to define new and change existing dynamic components without the need to touch the main architecure - I've created an application within an application, and the improvements in LabVIEW 8 have certainly helped. Thanks again - I'm a happy little vegemite! :laugh:

I have much the same thought and same situation as yours. I build a main.vi, it is top level and is to be compiled into an exe. Some other vi will be continuously programmed after that. I want to call these VIs by "open vi by reference". Up till now , these dynamically called VIs don't work after compiling. In dev environment they worked as fine as I've expected. But when it is in an exe, the problem comes out. P.S. These dynamically called VIs indeed have subVIs. 

So, could you please tell me more details on how to shoot this problem? Pleeeeease?   

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.