You are on page 1of 4

Instructions for converting RSView SE HMI Server into

Tag Database folders

First you need to determine a meaningful structure for the HMI Tag Database. As an example you could
divide the tags into folders using the first three or four characters of the tag name or whatever makes
sense to the project/customer. Keep in mind the total number of tags in the database. Any tags that do not
meet a meaningful naming convention/structure could be placed in the root folder or another folder; you
are aiming to have approximately 1000 tags or less in a folder.

In most projects the tags can be grouped according to the area within the application. For instance, group tags based
on the first 4-5 characters (Example: AA123). The first five characters of the tag name such as “AA123” and
placed those tags in a folder call “AA123” so that the tags would be “AA123\ AA123restoftagname”.  

Other tags where there was not a large number with the same beginning five characters or if the tags all
had different names can be left in the root folder as long as there is approximately 1000 tags or less the
root folder.

IMPORTANT NOTE: Please ensure you have a backup of the HMI Server project before starting the
following.

Tag and Alarm Export/modify/Import:


IMPORTANT NOTE: If there are any tags in folders already existing in the projects that begin with the
same five characters (Example: AA123). Be sure to not modify the tags that are already in the folder that
have the same beginning characters. If you are not careful these tags could end up with as
“existingfoldername\ AA123\ AA123restoftagname” and not work when you run the project. You must
watch for this problem as you edit the various components of the project, it is easy to do a replace all and
end up with problems with the tags in the existing folder.

Export the HMI Tags and Alarm tags into CSV files using the "Tag Import and Export Wizard" available
with RSView Studio.

For the HMI Tags CSV file, Use Excel to Search and Replace the tags into folders. Under the CSV file
section labeled ";Folders Section (Must define folders before tags)", which is located near the beginning
of the file, you must add one line for each new folder to be created. Under the CSV file section labeled ";
Tag Section", Search and Replace the tag names in the column labeled "Tag name". You can do the
following: search for AA123 and replace with AA123\AA123.

For Alarms CSV file, Use Excel to Search and Replace the column labeled "Tagname" for tag names into
folders as you did for the tags.

Once the CSV files have been updated you must start with an empty Tag and Alarm database for the HMI
Server project, Tags and Alarms can be imported into a project but the Import will not delete the existing
tags and alarms.

To create an empty tag database you must delete all files in the "C:\Documents and Settings\All
Users\Documents\RSView Enterprise\SE\HMI Projects\projectname\TAG" folder
Example to delete:

ALARM.DAT
CLI_01.CAC
CLI_01.CRC
CLI_01.CTL
CLI_01.DB

Copy in the empty HMI Tag database files (attached) and rename all EMPTYDB files to CLI_01 or
whatever the SE HMI Server project is called.

Example to rename:

EMPTYDB.DB
ALARM.DAT
EMPTYDB.CTL
EMPTYDB.CRC

You should have the following in your \TAG folder when you are done renaming:

ALARM.DAT
CLI_01.CRC
CLI_01.CTL
CLI_01.DB

Import the updated tag and alarm CSV files using the "Tag Import and Export Wizard" available with
RSView Studio.

Graphics:
From within RSView Studio open graphic displays one at a time and do an "Edit > Select All" to select all
objects on a graphic. Then do an "Edit > Tag Substitution" to place the new folder names in front of the
appropriate tags (Example: search for AA123 and replace with AA123\AA123). As you use the “Tag
Substitution” utility you will be able to see which tags are used on a graphic so you do not have to search
for every possible set of first five characters.

IMPORTANT NOTE: Be careful to update only the correct tags, some tags can have the same first five
characters but are already in the TRSV\ folder. You can click the "Confirm replacements" checkbox of the
"Tag Substitution" screen to verify which tags are being replaced.

Note that you will have to modify any VBA code within each graphic display if the VBA code is used to
access tags.

Other HMI Server components:


Examine all Macros, Events, Parameters and Derived tags to see if they need to be updated with the new
tag folder names.

Customers may be using a large number of Parameter files that will have to be edited to include the new
folder name for each appropriate tag. Attached is a MS Word .doc file (“WordSR_230.doc” ) that contains
a Search and Replace macro that will perform a Search and Replace for all files in the PAR\ folder.

IMPORTANT NOTE: Avoiding the problem of accidentally updating tags in existing folders is easier when
working with Parameter files because the tags all start with an equal sign =. So you can search for the =
sign in front of the first five characters to avoid the existing folder.

Example: search for =AA123 and replace with =AA123\AA123

You will have to run the macro several times to Search and Replace all folder names.

Open the “WordSR_230.doc” Word doc and Double-click on the “Double Click Here to Run Word Search
and Replace” macro. If the macro does not run for some reason you can navigate to “Tools > Macro >
Visual Basic Editor” menu option in Word. Navigate to the “Forms” folder and run the “SRForm” from the
“Visual Basic Editor”.

The following instructions are from the “WordSR_230.doc”.

Search for: Enter the string to search for here.


Example: =AA123
Replace With: Enter the replacement string here. If you leave this blank the search/replace will remove all
instances of the search string.
Example: =AA123\AA123
File Mask (with path): Specify a 'file mask' to use AND a path. You can use wild card operators. For example, to
search and replace in all .DOC files in the path D:\TEST, specify D:\TEST\*.DOC. Letter case does not matter.
Example: C:\Documents and Settings\All Users\Documents\RSView Enterprise\SE\HMI Projects\cli_01\PAR

Implementation:
Running the project and navigating through each screen will confirm if tags have been updated correctly
and are not in error.

You might also like