How Do I Deploy Network Shared Variables from a Compiled Executable?Primary Software: LabVIEW Development Systems>>LabVIEW Full Development System
Primary Software Version: 8.5
Primary Software Fixed Version: N/A
Secondary Software: N/A
I have created an executable that contains network shared variables, but when I try to run the program, it appears that the variables do not deploy automatically. How do I deploy the shared variables?
LabVIEW 2009 and Later
In LabVIEW 2009, functionality was introduced into the Application Builder to deploy shared variable libraries at run time. This option is available in the build specifications for the compiled executable and greatly simplifies and reduces the coding required to use shared variables with compiled executables.
To deploy shared variable libraries in executables built in LabVIEW 2009, follow these steps (and refer to the image below):
Note: The method described below for versions of LabVIEW prior to 2009 is still valid for LabVIEW 2009. Also, code written in previous versions that is upgraded and compiled into LabVIEW 2009 that uses the method described below need not be updated to use the method described above.
Before LabVIEW 2009
In order to use a network shared variable in a compiled executable in versions of LabVIEW prior to LabVIEW 2009, it is necessary to first deploy the shared variables before they are to be used in the program. When you create a new application (EXE), under Build Specifications»Application (exe)»Source Files, add your top level VI as the Startup VI and then add all libraries that contain network shared variables to the Always Include (previously Support Files) list. Also, make sure to set the Destination of the libraries to be Support Directory in the Source File Settings category.
Deploying Shared Variables From Windows
This can be done by utilizing the Deploy Library method of an Application Control. To find the Deploy Library method:
Note: If the application you want to build uses VI Server properties and methods or DSC VIs to modify a library or shared variables within a library, place a checkmark in the Enable Enhanced DSC Runtime Support checkbox on the Advanced page of the Application Properties dialog box shown below. If you are planning to distribute this application to a machine without LabVIEW DSC installed, also be sure to check the NI Enhanced DSC Deployment Support in the Additional Installers section of the installer properties.
Deploying Shared Variables to a Real-Time (RT)Target
In the Project Explorer, right-click each of the libraries you wish to deploy on your real-time target and select Deploy All. The network shared variables that are deployed onto the real-time target will persist until you manually undeploy them. To undeploy network shared variables:
You can also deploy the shared variables programmatically from the host PC to the real-time target using the Application invoke node:
Report Date: 02/13/2006
Last Updated: 08/09/2013
Document ID: 3UCBHM8T