LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1003 when dynamically calling VI from an executable

Solved!
Go to solution

I am trying to get a plugin architecture to work, so that my built executable can call VIs at runtime. I had things working as I wanted, till some unexpected VIs caused problems. Write to File.vi uses the built in labview functions Write to Text File and File Dialog. When my subVI uses these functions, I get error 1003 at Open VI Reference, saying the VI is not executable because a subVI could not be found.

 

I've included a simplified version of the application to show what I'm talking about. If you run the application, you'll see the error. To demonstrate it is definitely those two VIs it's not finding, I also have a version of my Write to File with those disabled, and it runs without problem.

 

I'm assuming what's happening is that because my plugin VI is never referenced by my startup VI, its subVIs don't get included in the executable, even though their are "built in" to labview. And then the runtime environment doesn't have them either. I've been trying to find the necessary dependencies so I can copy them to the plugin folder, but haven't been successful. Is there a way I can find and include these VIs and all their dependencies, that doesn't require rebuilding the application for every new plugin?

0 Kudos
Message 1 of 4
(2,169 Views)
Solution
Accepted by topic author buttersworth

@buttersworth wrote:

I'm assuming what's happening is that because my plugin VI is never referenced by my startup VI, its subVIs don't get included in the executable, even though their are "built in" to labview. And then the runtime environment doesn't have them either.


Those subVIs aren't 'build in' to LabVIEW, they are in the LabVIEW library.

 

And yes, you have to include them in the executable in some way.

 

This is why PPLs are used...

0 Kudos
Message 2 of 4
(2,141 Views)

Thanks, I had never used PPLs before. It adds a little bit of complexity to my architecture, but has the significant advantage of actually working.

0 Kudos
Message 3 of 4
(2,124 Views)

@buttersworth wrote:

Thanks, I had never used PPLs before. It adds a little bit of complexity to my architecture, but has the significant advantage of actually working.


Haven't had the need for them. Based on the vast amount of posts and presentations on the topic, it's not easy.

 

However, the old school method is near impossible. Another option would be to make source distributions of the plug in VIs, but it will get messy. And you'll probably have the same problems as with PPLs.

 

One big issue seems to be unloading of classes (not being possible). That's obviously only relevant if you use classes.

 

In short, I thing PLLs are the way to go, but save your cheers until it works.

0 Kudos
Message 4 of 4
(2,111 Views)