06-12-2019 07:31 PM
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?
Solved! Go to Solution.
06-13-2019 04:54 AM - edited 06-13-2019 04:55 AM
@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...
06-13-2019 10:23 AM
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.
06-14-2019 01:50 AM
@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.