Setting up implied tag rules

To automatically assign tags to points, you set up tag rules in your smart tag dictionary that are based on your component naming convention, component type or assigned tags. Building tag rules in the Supervisor station assign implied tags to NiagaraNetwork proxy points or other drivers’ control points (BACnet, Modbus TCP/IP, OPC, etc.).
Prerequisites: You have a component naming convention and have created your own smart tag dictionary under the TagDictionaryService. The tagdictionary palette is open.
Tag rules reside under the TagRules (TagRuleList) component of a smart tag dictionary. The Niagara and Haystack dictionaries have pre-defined tag rules, which apply the tags or tag groups defined in the applicable dictionary as implied tags to components in the station. These dictionaries are frozen dictionaries. You cannot add to, delete from or edit their tag rules. Your goal in this procedure is to create your own rule in your own smart tag dictionary. The framework can then assign the tags defined by your rule automatically to the points and other components in your station.
Perform the following steps:
  1. Expand your smart tag dictionary node under Services > TagDictionaryService.
  2. Expand the Tag Rules folder in the palette and drag a rule, such as the AndRule from the tagdictionary palette to the Tag Rules folder under your smart tag dictionary.
    Image

    In the example, the smart tag dictionary is called MyTagDictionary.

    The palette provides several types of rules including: AlwaysRule, AndRule, BooleanFilterRule, etc. This procedure demonstrates the AndRule.

  3. To open the rule’s Property Sheet, double-click the rule, expand its Condition node, expand the Conditions node in the palette and drag one or more conditions to the and tag rule.
    Image

    In the example, RoomTemp is an AndRule, which checks for two things:

    • The point must be a numeric control point (IsType).
    • The name of the point must contain some form of the words “roomtemp” (BooleanFilter).

    The idea here is that the tag rule might be applied to points named RoomTemp, roomtemp, SpaceTemp, ZoneTemp, etc. All are different naming derivations for a point that represents a zone air temperature sensor reading.

  4. Configure the tag rule conditions.
    n:name like ‘(?i)roomtemp’ is a NEQL predicate, which configures the rule to apply the listed tags to any point that contains “roomtemp” in its name.

    The like key word in the NEQL predicate leverages regular expressions (regex) that specify a search pattern in text. The ‘(?i)’ syntax performs a case insensitive comparison of the following text. In this case, the pattern matches actual names of numeric points in the station, such as RoomTemp, roomtemp, ROOMtemp, ROOMTEMP, roomTemp and other capitalization variations in the name.

  5. To populate the Tag List under the tag rule, copy and paste tags from one of the standard tag dictionaries, such as the Haystack dictionary or the Tags sub folder from the tagdictionary palette.
    Image

    The tags to be assigned are hs:zone, hs:air, hs:temp and hs:sensor.

  6. If you are using a rule in your smart tag dictionary to apply a tag definition or tag group definition from another dictionary, expand the Tag Group List and specify the fully-qualified names, such as hs:zone or hs:zoneAirTempSensor.
    Image

    Without any other action, the framework applies the configured tags and tag group definitions in this tag rule as implied tags to any component in the station whose name matches the conditions defined by the rule.