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. Start the Workbench, then expand your project. Next, expand the Platform Services node to show the Unified Data Manager provider.

  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.

-OR-

Select the Groups node, then click on the Add Group button, shown below, in the Edit section of the Home ribbon in the Workbench.

Add Group Button

  1. The Group properties window appears, as shown below, beneath the Project Details section in the Workbench.

Group Properties

  1. Enter a unique name in the Group Name text entry field.

  2. Specify the Data Type via the pulldown 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.
     

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

  4. In the Group Tags section, you can assign one or more tags to the group.

    • To add one tag at a time, click the button on the line where you are adding it. (Note that to enable the button, you must first click in the Tag Name column.) Clicking the button opens the Data Browser where you can select a tag and click OK. The tag gets added to the Group Tags tab.

    • To add several tags at once, click the Click toAdd Multiple Tags link. This opens the Data Browser, where you can:

      1. Right-click on a tag in the Data Browser and click Enter Up. The tag gets added to the Point Name box.

      2. Continue to add tags. The Point Name box will accumulate the tags you add to it.

      3. Click OK to close the Data Browser and return to the Group Tags tab. All of the accumulated tags will appear on the tab.

  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. In the Parameters section, 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.

  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 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:

  • Fully qualified data tag name (parameters or regular expressions can also be used) represented as a string

  • Boolean flag that specifies whenever the tag is an array

  • Array length – integer, valid when array flag is set to true

  • Array lower bound - integer, valid when array flag is set to true

Using the Group

  1. Launch GraphWorX64 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