LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build application with SubVi in labview 7.1

HI,

 

I have developed a application using Labview 7.1, In that i have a main VI inside that i am calling subvi's dynamically by using OpenFP whenever the user clicks on the menu item.

 

but when i build the application the SubVi's are not getting added in the applicaion exe.

and because of that the SubVi's are not getting loaded when i run the EXE.

 

Can you help me on this

 

Regards

Sudhindra

0 Kudos
Message 1 of 3
(2,708 Views)

This is explained in the LabVIEW Help. On the page that describes the Source Files Tab it says:

 

Source Files Tab

Use this tab of the Build Application or Shared Library (DLL) dialog box to add and delete files from the stand-alone application or shared library. You also can specify custom destinations for files that you include in the build.

This tab includes the following components:

  • Add Top-Level VI/Add Exported VI—The Add Top-Level VI button appears when the build target is an application. The Add Exported VIbutton appears when the build target is a DLL.
    • Add Top-Level VI (Application only)—Adds a top-level VI to the application. You must have at least one top-level VI. When you add a top-level VI, LabVIEW automatically includes all its subVIs and related files, such as menu files. LabVIEW also includes DLLs if the VI references the DLL using an absolute path. However, if you use the VI server to call VIs, you must manually add those VIs by using the Add Dynamic VI button.
    • Add Exported VI (Shared Library only)—Adds an exported VI to the shared library. You must have at least one exported VI. When you add an exported VI, LabVIEW automatically includes all its subVIs and related files, such as menu files. LabVIEW also includes DLLs if the VI references the DLL using an absolute path. However, if you use the VI server to call VIs, you must manually add those VIs by clicking the Add Dynamic VI button.
  • Add Dynamic VI—Adds a VI to the application or shared library, which it uses through the VI server to dynamically call the VI. When you add a dynamic VI, LabVIEW automatically includes all its subVIs and related files, such as menu files. LabVIEW also includes DLLs if the VI references the DLL using an absolute path.

0 Kudos
Message 2 of 3
(2,703 Views)

In LV7.1 the (probably) easiest workaround is to create a case structure with a FALSE constant wired to the case selector and putting all the dynamically called SubVIs into the true case.

This way you make sure they are included in a compiled application but the VIs are not executed automatically.

 

You could also place static VI references to the VIs.

 

0 Kudos
Message 3 of 3
(2,701 Views)