12-15-2015 05:27 AM
Hello all,
I have a main.vi which loads the front panel into a subpanel of four subVIs when selected. Like most applications, everything works well until coming to build the project (.exe). Program works as expected when run from .exe but when any functions from the vi.lib (eg read png subVI) is included into one of the called subVIs, the front panel is loaded correctly but the subVI does not run and the invoke node (Run VI produces error 1003).
I have inlcuded the subVIs into 'Always Include' in the build specification under the Source Files heading.
Please help,
Thank you
Solved! Go to Solution.
12-15-2015 07:30 AM
That error is that the VI is not executable. Can you share any of your code? If you are using certain modules, you may need to always include some code from vi.lib.
12-15-2015 08:12 AM
Hello Crossrulz,
Thank you for your response. I've created a simple project which behaves the same way as my original code. It falls apart when the read png subVI is included into the called subVI.
Thanks
Glen
12-15-2015 07:51 PM - edited 12-15-2015 07:51 PM
Your problem is you are trying to open a VI that is not there. The way you are building up your path needs fixed. I recommend using Current VI's Path and use the relative path of the VI from there. The relative path does not change as long as you do not use the 8.X executable format.
12-24-2015 06:23 AM
Hello Crossrulz,
Thank you for your reply. I think the path is correct to my subVIs as they load correctly and execute without problem until a subVI from the vi.lib is inserted (for example read png), then my subVI loads into the subpanel of the main VI but does not execute.
Thanks
Glen
12-24-2015 08:14 AM
I made a trivial change to your "Called" sub-VI (I created an Icon for it -- you'll see why this is important in a minute) and redid your Main VI. This snippet is saved in LabVIEW 2015, but it is simple enough that you should be able to recreate it in whatever version of LabVIEW you are using.
I like to use Static VI References (the first thing on this Block Diagram) because, particularly if they are associated with a sub-VI with an Icon, they provide a simple, robust, mnemonic way to get a lot of useful sub-VI "properties" (such as Path) without worrying about the Execution environment. In particular, they work very well with the Start Asynchronous Call function, which I find much simpler to use than the VI Server method. I'll walk you through it ...
Bob Schor
P.S. -- I tested this (in LabVIEW 2015) and it works fine.
01-03-2016 05:35 AM
Hi Bob,
Thank you for your help. It now works!
Glen
11-27-2017 12:21 PM
Just wanted to say THANKS for this post!!! I've been looking for an answer to this for ages!
01-16-2018 09:25 AM
Hi Guys, also thanks for the cood example above.
For my case i just found out that i forgot to include some Sub-VIs or libraries. After including them into the build specifications it worked again (can´t remember i deleted them from the build specifications....)