How do I Deploy Network Shared Variables from a Compiled Executable?
Primary Software: LabVIEW Development Systems>>Base Package
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems, LabVIEW Modules>>DSC Module
Problem: 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 autodeploy. How do I deploy the shared variables?
Solution: In order to use a network shared variable in a compiled executable, 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 library(s) to be
Support Directory from the
Support Files Setting tab.
Deploying Shared Variables from Windows
This can be done by utilizing the Deploy Library method of the Invoke Node. To find the Deploy Library method:
- On the block diagram, right click to bring up the programming palette and go to Programming » Application Control and place the Invoke Node on the block diagram
- Using the hand tool, click on Method and select Library » Deploy Library
- Use the Path input of the Deploy Library invoke node to point to the library(s) containing your shared variables. If the library(s) were included in the executable's Support Directory as directed above, the library(s) will copied to the executable's data folder. Point the Path input to these library(s).
If you are using LabVIEW Datalogging and Supervisory Control, you should use the
Deploy Library.vi to deploy your shared variables. To find the Deploy Library.vi:
- On the block diagram, right click to bring up the programming palette and go to DSC Module » Engine Control » Libraries & Processes (DSC Module » Engine Control before LabVIEW 8.5) and place the Deploy Library.vi on the block diagram
- Use the path input to the Deploy Library.vi to point to the library(s) containing your shared variables
* 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.
Deploying Shared Variables to a Real-Time Target
If you are compiling an executable to be run on a real-time target, you must manually deploy the shared variables from the Project Explorer window. In the Project Explorer, right click on 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,
- In LabVIEW, go to Tools » Shared Variable » Variable Manager
- Add a RT system to monitor by right clicking on RT Systems
- Right click on the library you wish to undeploy and select Remove Library
Related Links: Developer Zone Tutorial: Using the LabVIEW Shared Variable KnowledgeBase 3S8AETIH : Troubleshooting Network-Published Shared VariablesAttachments:
文章评论(0条评论)
登录后参与讨论