Searching for Unused Tags
I've run into this same issue many times with RSView Studio, and cannot understand how they can leave out such a fundamental tool in their software. Well, I finally could not stand it anymore. After unsuccessfully searching the web for a solution, I decided to create my own. It is somewhat crude, but using the Graphics Import/Export & Tag Import/Export wizards to get data into Excel, I am able to determine which tags are unused in the RSView Studio application. Here's the method I used:
1. Open the application in RSView Studio.
2. Export each Display in the application using the 'Graphics Import Export Wizard' by right-clicking in the Explorer Tree on 'Displays'(under Graphics) and selecting 'Import and Export...'. This creates an .xml file for each display.
3. Export all tags in the application using the 'Tag Import and Export Wizard' under the 'Tools' menu. This creates a .csv file.
4. Copy and Paste all the text in each .xml file into Excel (one set directly under the previous set). I ended up with over 9000 rows of text across 11 columns.
5. Copy and Paste all the Tag names from the 'Tag Name' column in the .csv file into the same Excel spreadsheet from step 4. (The .csv file can be opened in Excel)
6. Use the following formula in the cell next to each Tag Name (I had 450 tags). This will search through all the Display Text for each Tag Name. If it finds the Tag Name it places a row number in the cell. If it does not find the Tag Name it places a '#N/A' in the cell.
=MATCH("*"&$CA3&"*",A$3:A$9162,0)
$CA3 is the cell location for the Tag Name
A$3:A$9162 is the range of cells for the first column of Display Text
The dollar signs($) are important, so is the zero at the end of the formula
This formula only searches through the first column of Display Text. I had 11 columns of Display Text. So I copied these formulas across 11 columns to the right. I ended up with these formulas in 240 rows high by 11 columns wide. So, basically, if there is a number in any of these cells then that Tag Name is being used in the application.
7. You could leave it like this, but I also added the following formula to make it slightly easier to read. I placed it into the cell to the right of the formulas in step 6 (one for each Tag Name).
=IF(OR(ISNUMBER(CB3),ISNUMBER(CC3),ISNUMBER(CD3),ISNUMBER(CE3),ISNUMBER(CF3),ISNUMBER(CG3),ISNUMBER(CH3),ISNUMBER(CI3),ISNUMBER(CJ3),ISNUMBER(CK3),ISNUMBER(CL3)),0,1)
Sorry for the long formula. This checks each of the formula results from step 6 (11 of them per Tag Name, for me) to see if it is a number. If any one of the formula results is a number then it places a 0 in the cell. If none of the formula results are numbers then it places a 1 in the cell. So now each cell with a 1 indicates an UNUSED tag.
Anyway, I hope this helps you guys. It solved my problem half way. Now I had to go delete all my unused tags in RSView Studio. This, by the way, is also not as easy as it should be. But I've become accustomed to disappointment with Rockwell Software.
I imagine this procedure may not be as clear to you as I'd hoped. So, send me an email if you have questions (kmwisskirchen[at]dramcotech[dot]com). I'll try to help you.