To download NI software, including the products shown below, visit ni.com/downloads.
1. Overview:
This VI programmatically creates URL based on customer target selection and reads shared variable using Read Variable.vi and the URL created.
2. Description:
In LabVIEW 2009 we introduced the Shared Variable Palette to give you a little more control of your shared variables.
In this code the URL to the shared variable is built by concatenating strings together. The URL starts with "ni.var.psp://". Then we add on the IP address of the computer or real-time target that has the shared variable library "xxx.xxx.xxx.xxx". Then we give the name of the library followed by the name of the variable. So in the end we have "ni.var.psp://xxx.xxx.xxx.xxx/Name of Library/Name of Variable".
This code assumes that you have three different targets on your network with the IP addresses of 10.110.1.41 and 10.0.110.41, and your localhost. All of those targets have a shared variable library named "Untitled Library 1" that contains a variable named "Test".
3. Requirements
4. Steps to Implement or Execute Code
5. Additional Information or References
If data out is not updated properly, check the value of the variables using the Distributed System Manager.
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Description-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.