10-29-2012 11:49 PM
Hi All,
Is it possible to call a sub-VI (which within itself calls other sub-VIs not included in the executable source files) from an executable (LabVIEW 2011).
I have no problems calling the sub-VI via "Open VI reference" when runing the main vi as is. As soon as i build the execuable, search for the intended subVI the exe"looks for a few items" then stalls.
The subVI controls a few comports, and prompts the user to take some actions. The SubVI requires an input from the Main VI and when completed outputs a cluster of for the Main VI to continue.
Solved! Go to Solution.
10-30-2012 12:33 AM
Hi,
File path's use to be the most common issue when building .exe's.
Add a debugging dialog popup window displaying the path.
Br,
/Roger
10-30-2012 04:14 PM
Hi Roger,
Do you mean the file path to the subVI or the exe?
Thanks
10-30-2012 05:28 PM
Hi All,
Firstly the main error was "1031 ~ VI Reference type does not match VI connector pane."
Secondly, the subVI had a dependency on "Space Constant.vi" which is stored in the vi.lib, The Main executable did not have "Space Constant" in its vi.lib.
SOULTION
1. Added a "space constanst" to the executable project.
2. Ensured that the Refnum type was not "strict" (also ensure refnum matches VI pane)
becuase I am using a cluster, if the main cluster changes for any reason, you must update the inputs and outputs of your subVIs. This was achieved may making the cluster a control type def. However, because some subVIs are independent from the main, I have to ensure I use the lastest controls when building independent subVIs.
This allowed me to run the subVI.
Thanks.