ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
To download NI software, including the products shown below, visit ni.com/downloads.
1. Overview
This example helps to locate all shared variables used by a VI or by all the VIs inside a directory specified and display them in a list.
2. Description
A shared variable is a memory space that you can read data from and write data to. You can read and write shared variables on a single computer with single-process shared variables or on multiple computers with network-published shared variables, which publish data over a network using the NI Publish-Subscribe Protocol (NI-PSP). Use shared variables to publish only the latest values in a data set to one or more computers.
This example helps to locate all shared variables used by a VI or by all the VIs inside a directory specified and put them into a list. Then the list can be grouped by a VI (it displays all shared variables inside a VI selected from the list) or by a shared variable (it displays all VIs using a shared variable selected).
3. Requirements
4. Steps to Implement or Execute Code
5. Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines.**
Description-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Doesn't seem to always work
I really like the idea of the VI, I can see it being very valuable. However, I set it to run on some installed examples (C:\Program Files\National Instruments\LabVIEW 8.2\examples\Shared Variable) with my LV 8.2.1 and it doesn't seem to find all four variables being used within that folder. Additionally, if I set it to search for shared variables within a certain VI, for instance Front Panel Binding Client.vi in that same folder, then it doesn't find any shared variables even though there are two in the VI.
I haven't looked too much at the code to see yet why it's doing that...