LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open VI Reference Function in an Executable

Solved!
Go to solution

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.

0 Kudos
Message 1 of 4
(3,298 Views)

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

 

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

Hi Roger,

 

Do you mean the file path to the subVI or the exe?

 

Thanks

0 Kudos
Message 3 of 4
(3,260 Views)
Solution
Accepted by topic author Kamilan

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.

0 Kudos
Message 4 of 4
(3,251 Views)