Creating an indexed addressing set

Scenario

In this scenario, environment data is collected from with four rooms, each equipped with temperature, pressure, and humidity sensors. Data is available as follows:

Room Number

Temperature

Pressure

Humidity

1

Room1-Temperature

Room1-Pressure

Room1-Humidity

2

Room2-Temperature

Room2-Pressure

Room2-Humidity

3

Room3-Temperature

Room3-Pressure

Room3-Humidity

4

Room4-Temperature

Room4-Pressure

Room4-Humidity

Using the indexed addressing feature, you can use a single table format to arrange all data in the HMI device.

Data from the three different sensors can be displayed in a single page where the room number is used as a selector (combo box) to pick the correct set of tags.

How to create an indexed tag set

Path: ProjectView> Tags

To do this you need to create an indexed tag set.

  1. In the Tag Editor, define protocols and tag. Define a tag for each data to be indexed, in this example you must create a tag for each sensor in each room.
  1. Create a tag to be used as index tag. In this example you create a "RoomNumber" tag that could be of type UnsignedInt using Variable protocol.
  2. From ProjectView, select Config> Tags, double-click Indexed Tag Set: the Indexed Tag Set editor is displayed.
  3. Click + to add an Indexed Tag Set. In this example you will call it "Room".
  4. Select the tag "RoomNumber" to use as a selector for the room number.
  5. Create an Index Instance for each set of data. In this example, one for each room.
  6. Create an Alias for each type of data and rename the table columns appropriately. In this example "Temperature", "Pressure" and "Humidity".
  7. Double-click on each cell to associate the correct tag.

Note: The Index Tag datatype can be a number, a string or any type of simple data types.

Note: To reference an array data type use the array index = -1

Index Tag

The "Index Tag" used to select the instance to use can be a Tag or an element of the Global _VariablesWgt widget (Ref.: "Global Variable Widget"). Note that using a Tag the selection will be global for all clients while using the _VariablesWgt widget the selection will be local and any client can have its own selection.

Autofill function

An Indexed Tag Set table may become very complex and filling it may be an error prone procedure. Enable the Autofill feature to make sure aliases are entered correctly.

Click p to enable the Autofill feature: the Autofill Table is displayed.

This function uses regular expression for populating the table with tags trying to match the filter where the keyword $(Instance) will be replaced with the defined Index values and the keyword $(Alias) with the defined alias labels.

See https://en.wikipedia.org/wiki/Regular_expression for additional details regarding regular expressions.

Autofill example

“Room$(Instance)-$(Alias)” will match all tag names:

Room1-Temperature,

Room1-Pressure,

Room1-Humidity,

Room2-Temperature,

“Room0*$(Instance)-$(Alias)” will match all tag names:

Room1-Temperature,

Room01-Pressure,

Room001-Humidity,

Room2-Temperature,

Room02-Pressure,

Room002-Humidity,

Autofill table elements
Element Description
Fill Fills in missing entries in the tag table using the set filter (if any). For example, when new instances or new aliases are added you can use this option to fill in the new entries.
Replace Replace all table entries with those provided by the Autofill table.
Reset Resets the tag filter to empty, no automatic fill is done.
Suggests a valid filter expression for your project.

Note: Filters are saved as project preferences and can be set for the entire table or for a column. Once a filter is set for a column, the table filter is ignored. You can therefore selectively change the filter for handling a particular alias only.

Note: To reference the elements of an array use the \ character to disable the regular expression interpretation of the square brackets (array tags are differentiated by Italic).

Toolbar

Toolbar Element Description
Add a new Indexed Tag Set
Remove the select Indexed Tag Sets
Copy the selected Indexed Tag Sets
Paste the copied Indexed Tag Sets
Export selected Indexed Tag Sets to .xml file
Import Indexed Tag Sets from .xml file