Import Variable Tags from an External Data Source
- Last UpdatedJul 18, 2023
- 5 minute read
Importing tags from an external data source allows you to program an I/O device and then import the tags straight into Plant SCADA, where they are treated as regular tags. Plant SCADA will automatically create a variable tag records for every tag in the I/O device.
Note: Plant SCADA only supports the use of alphanumeric characters, the backslash and underscore characters (see Tag name syntax). Any other characters will be converted to underscores on import. This may result in Duplicate Tag error messages on compilation.
About Importing Variable Tags
Like linking, importing tags is an I/O device specific operation: you import the tags for a particular I/O device. Unlike linking, however, imported tag records are not linked in any way to the tags in the external data source. Therefore, importing is typically a one-time operation. To update imported tags, you need to import them again.
Note: Tags will be imported into the project in which the selected I/O device is defined. This could be either the selected project or one of its included projects.
For most external data sources, the import process involves two steps. First you export the data from the I/O device to a format that Plant SCADA can read, then you import the database into Plant SCADA. However, tag data saved using Unity Pro can be read directly by Plant SCADA. This means that no export is necessary.
Some characteristics of the import are defined in the format files in the Config directory (with the extension .fmt). There is one format file for each database type, and each file specifies how external data is converted to Plant SCADA variable data. In general, imported tags are either added to the Plant SCADA variable database if the tag does not already exist, or updated if the tag exists. However, if a field is listed in the [EditableFields] section of the format file corresponding to the import database type:
-
If the tag already exists, the Plant SCADA field for the tag will not be updated with the external value.
-
If the tag does not yet exist, the Plant SCADA field for the tag will be updated with the external value.
For example, if a tag has 10 fields to be imported and five of them are listed in the [EditableFields] section of the format file, then if the tag already exists in Plant SCADA the tag will be updated with the external values for the five fields that are listed in [EditableFields]. If the tag does not already exist then the tag will be created with the external values for every 10 fields.
Fields marked as editable in this way can be changed by Plant SCADA. To avoid internal changes being lost, changes to these fields in the external database are ignored.
Note: If the external database supports to LiveUpdate and the LiveUpdate Link has been selected for the I/O device, existing Plant SCADA tags will be synchronized with the external database and the tags will be updated for the imported fields regardless of whether it is marked as an editable field. An I/O device configured as Linked or Auto-refreshed Linked will behave as in a normal import and will not update fields marked as editable.
When you import tags into Plant SCADA, you have two options for dealing with existing tags:
-
Delete tags associated with that I/O device prior to the import.
-
Update existing tags on import. Tags found in Plant SCADA and in the external data source are updated in Plant SCADA. Tags found in Plant SCADA but not in the external data source will remain untouched. New tags are appended.
If you import a data source that is already linked, every tag in the data source are duplicated. That is, you will have two copies of each tag: one local and one linked.
See Imported Tags for information about levels of support between Unity and Plant SCADA.
Some properties defined for the external tags will not be relevant to Plant SCADA. Also, some will not be in a format that Plant SCADA can read. To define what information is copied to Plant SCADA's variable tags database and how this information is to be converted, you need to edit the I/O device's format file.
To import variable tags from an external database:
-
In the Topology activity, select I/O Devices.
-
On the Command Bar, select Import Tags.
-
Complete the Import Variable Tags dialog box.
See Import Variable Tags Properties below for a description of the information required in each field.
Import Variable Tags Properties
|
Property |
Description |
|---|---|
|
I/O Device |
Note: If an I/O device is linked to an external data source the Database Type, External Database, Connection String, and Tag Prefix fields will be greyed out. The Import Variable Tags dialog has the following fields: The I/O Device for which you are importing tags. Use the menu to select an I/O Device that has been defined using Plant SCADA. Note: Tags will be imported into the project in which the selected I/O Device is defined. This could be either the project selected in the Explorer, or in one of its included projects. |
|
Database type |
The format of the data referenced by the external data source. |
|
External database (128 Chars.) |
References the source for the external database. Click the Browse button to either navigate to the file or to specify configuration options. The external database can be:
|
|
Connection string (128 Chars.) |
Connection details for the data source. This is similar to an ODBC connection string. For example: UserID = XXX; Password = YYY or ServerNode=111.2.3.44; Branch=XXX Only certain drivers require a connection string:
|
|
Add prefix to imported tags |
Select this box to insert a prefix in front of the names of imported tags in your Variable.DBF. |
|
Tag prefix |
The prefix (8 characters max.) that is inserted in front of the names of imported tags in the variable tags database. |
|
Delete I/O Device tags prior to import |
Select this box to delete every one of the I/O Device's tags (from the variable tags database) before importing. If this check box is not selected, tags found in Plant SCADA and in the external data source are updated in Plant SCADA. Tags found in Plant SCADA but not in the external data source remain untouched. New tags are appended. |
|
Purge deleted tags not found in data source |
Select this box to delete tags which have been removed from the external database. In other words, if a tag is still part of the I/O Device in your project, but not in the external database, it is deleted from your project. |