06-20-2006 07:41 AM
06-20-2006 07:46 AM
Maybe, but first, what are "variables"?
Ben
06-20-2006 07:55 AM
06-20-2006 08:02 AM
06-22-2006 10:23 AM
Hi Guzz,
I think you are referring to “Shared Variables”, which you are using to share data among
There are various means of searching whether variables are being used in your project
There are two ways of searching locally stored variables using the find and replace utility:
This method relies on having the variable labels set as visible items:
You need to create a blank VI within the library/project you're searching from and drag the variable that you wish to search for into the blank VI. Then click “Edit” on the Blank VI toolbar and select “Find and Replace” from the drop down menu. A “Find” Window will open. Within the window make the following configurations: for the “search for” option select “text”, in the “Type in words to search for:” selection box enter the name of the variable that you wish to search for, and for “Search Scope” select “<All VIs in Application Instance”. Click “Find”.
All the locations where the variable is being used will be listed. If no locations listed then either the variable is not being used or the label for the variable is not a visible item.
This second method does not rely on the variables labels being visible:
06-22-2006 10:23 AM
Open the “find” window as in the previous method. Within the window make the following configurations: for the “search for” option select “object”, “globals” and click on the icon of the variable you wish to search for. As explained previously the location of all variables being used will be listed.
The attached example VI, "Cluster test.vi", has been developed by one of our engineers as a starting point for anyone who wants to develop LabVIEW code which can search for and list the
Using the attached VI, "Cluster test.vi", you can also just have an array of the variables you want to search for, rather than having to strip them from the project names as long as the names of the variables are known.
I have zipped up an example LV 8.0 project so that the functionality of using "Cluster test.vi" can be easily seen.
Simply run the "Cluster test.vi" and it's front panel will populate the table control listing what variables are being used and in what VIs they are being used.
I hope this is helpful.
Emma Rogulska
NIUK & Ireland
06-22-2006 12:46 PM
Hi Emma, I downloaded the zip file you attached but the "cluster test.vi" appears different than what you describe. Can you please re-attach?
Thanks,
Sima
06-23-2006 03:23 AM
Hi Sima,
My apologies.
You are completely right I attached the wrong file to the post by accident.
The correct VI is attached to this posting and I have renamed the search and display VI to "find refs.vi" as it is a more logical name.
I hope this helps,
Emma Rogulska
NIUK & Ireland
06-24-2006 01:03 PM
10-04-2006 10:22 PM