Groups

Grouping simplifies work with a large set of data tags. Groups can be used to distribute a value written to one tag to a collection of tags. Groups can be used within a group.

 

Grouping allows you to write a single variant value to a group of data tags. Each group of tags is represented by a group data tag. Group data tags are organized in a tree structure of folders and group items. Since each group is represented as a data tag, a group data tag may also be included in other groups. Group values are written synchronously to target OPC servers.

 

Any write to a group data tag distributes written values to all data tags included in the group; all included data tags will have the same value as the group data tag. Once you have configured groups, they can be accessed from many applications via the appropriate tab in the Unified Data Browser. This topic describes how to define a new group, and then provides an example that shows how to use the group.

Adding a Group

To add a new group:

  1. In the Workbench's Project Manager, click the Unified Data Manager button in the tray at the bottom or the Unified Data Manager provider bar. Expand the active configuration database to expose the nodes in the navigation tree.

  2. Right-click the Groups node and select the New Group command from the context menu.

Adding a New Group

 

NOTE: You can also create a new Folder instead of a new Group. Folders are used to logically organize the groups.

  1. The Group Properties tab appears. The Properties tab for a new group item is shown in the figure below.

Group Properties

  1. Enter a unique name In the Name field.

  2. Enter a description in the Description field (optional).

  3. Specify the data type from the Data Type drop down menu; select from the following data types: Native, Float, Double, Boolean, Byte, Word, DWord, Character, Short, Long, String.

    Each group must have a data type that will be used a base data type for grouped data tags. All the data tags in the group are requested with this base data type, so the OPC server has to allow its conversions. When a data tag cannot be requested with a specified data type, then it will be ignored. An error then will be reported to the GenEvent Server.
     

  4. Enter any parameters desired assigning them a name, type (number or string), padding alignment (none, left or right), the characters used to pad with (for example, 0s), and the number of places that the parameter will be padded up to (optional). Parameters are explained in the Parameters section below.

  5. Click on the Group Tags tab (shown below) to assign one or more tags to the group. (Group tags are explained in the Group Tags section below.)

Group Tags

Using the Enter Up Option for Adding Multiple Tags

  1. Back in the Group Tags tab, for each tag you add, define whether the tag is an array of values, limit the low value, and set the length of the value returned (optional).

  2. For additional help, you can refer to the Examples for Working with Groups section, below.

  3. Click the Apply button to enforce your settings.

Parameters

Parameters are client-driven, and they do not change the number of requested data tags in runtime. Parameters can replace parts of data tag names by values passed in the group data tag name. Each parameter can be an integer or a string data type with optional formatting. If you had a number of models of a certain type and wanted to add a description to the front of each model number, you could do so with a parameter. Each data tag may support parameters) that could modify names of the data tags. Each parameter can be integer or string data type with optional formatting. The table below shows possible formatting for each supported data type.

 

The client application passes configured parameter values as a part of the full data tag name. Parameters are client driven, and they do not change the number of requested data tags in runtime. Parameters can be integer or string values. These values are then formatted using pre configured format data, and then they replace specific parts of a data tag name by values passed in the data tag name. Parameters are delimited with specific characters (e.g., << and >>) and specified by their names (e.g., ICONICS .Simulator.1\SimulatePLC\Ramp<<Parameter1>>) in the data tag name.

Group Tags

A group data tag can contain an unlimited number of data tags. Since each group is represented as a data tag, a group data tag may also be included in other groups. In the Group Tags tab you can specify a list of tags that will be included in the group data tag. You choose tags from connected OPC servers and databases.

 

Each data tag consists of the following attributes:

Examples for Working with Groups

Below is a sample for working with a group.

Creating a Group

  1. Launch the UDM by going to Start > Programs > ICONICS > Tools > Unified Data Manager. This will open the Workbench with the UDM provider.
  2. Create a new configuration database by right clicking on your server at the root of the tree and select New Database.
  3. Follow the Create Database Wizard to create a new configuration database. You can check or uncheck “Include Sample Data” checkbox.
  4. You should now have a new configuration database. Right click it and select Make Active.
  5. In the tree-control in the left-hand pane, expand this new configuration, right-click on Groups, and select Group.

Adding a New Group

 

NOTE: You can also create a new Folder instead of a new Group. Folders are used to logically organize the groups.

  1. Enter SimpleGroup in the Name field.
  2. Select the Group Tags tab.
  3. You can individually add a new tag to the group by clicking the ellipsis button on each line as shown below.

Adding individual tags


Alternatively, you can click the Add Multiple Tags button to add all your tags in one shot.

  1. Once you have selected all your tags you want to write to, click Apply to save your changes.

Using the Group

  1. Launch GraphWorX by going to Start > Programs > ICONICS > GENESIS64 > GraphWorX64 > GraphWorX64.
  2. Insert a Data Entry dynamic and open the Data Browser.
  3. Under OPC Servers > My Server > Groups > Select Group you just created.

Selecting new Group from Data Browser

  1. Enter Runtime and you will see the point with a zero value.
  2. Enter a value. This value will be downloaded to all grouped tags.

NOTE: If the value appears to be an * for a value, it could be that the value is not initialized. As long as the tag has good quality you can write to it, which will then provide a visible value.

 

Group with a Parameter

Often you may want to have one group of tags that would control several collections of identical tags (e.g. different floors). In this case, it is advantageous to use parameter in tag names.

  1. Create a New Group and enter a name of ParamGroup.
  2. Add a parameter under Group Properties tab and call it Param1 with a Type of Number as shown below.

Adding a new parameter

  1. Modify your grouped tag names so that the parameter is in the right place. The parameter name must be enclosed by <<>> delimiters.

Grouped tags with parameters

  1. The group is ready for use. Open a GraphWorX64 display and add some Data Entry dynamics. Make sure you have some objects that show the different OPC tags that can be written to from the group depending on the parameter.
  2. Browse for the new Group that contains a parameter.

Browsing for Group that has parameters

  1. Since the parameter used was a Number, some possible Group tags could be:

@grp64:ParamGroup(1).Value

@grp64:ParamGroup(2).Value

  1. Enter runtime, and test the Groups by writing a value to each and seeing the appropriate tags change.

 

See also:

Unified Data Manager