Tagging and hierarchies in Niagara 4: a practical guide
How tags, dictionaries, implied tags and tag rules work in Niagara 4, how to search with NEQL, and how to build hierarchies for a sensible navigation tree.
Tagging is the biggest change from Niagara AX to Niagara 4, and the one most often skipped on real jobs. That’s a shame, because a well-tagged station is far quicker to engineer, easier to navigate, and ready for analytics. Templates, hierarchies and plenty of search tools all depend on tags.
What a tag is
A tag is a small piece of metadata on a component. It says what the thing is, rather than where it sits in the station tree. A point might carry tags saying it’s a sensor, that it measures temperature, that it’s on supply air, and that it belongs to AHU 3.
Some tags are markers (just present or absent, like hs:ahu). Others carry a value (like a floor number or a geographic location).
Dictionaries
Tags come from tag dictionaries, managed by the Tag Dictionary Service under Services. A station can use several at once:
- The Niagara dictionary (
n:) comes built in. It supplies implied tags automatically, so every component already knows things like its name, its type, and whether it’s a point. - The Haystack dictionary (
hs:) is based on Project Haystack, the open standard for building data. It’s the obvious choice for equipment and point tags, especially if analytics might be added later. - Custom dictionaries hold your own company or client tags. Each dictionary has its own short namespace, like
acme:.
Dictionaries can also define tag groups, which apply several tags in one go (an “AHU” group, say), and tag rules, which apply tags automatically to components that match a condition.
Applying tags
Every component has an Edit Tags view, and the driver manager views let you tag lots of devices or points at once. The most efficient approach is to tag as you go: when you add a device or discover points, apply the tags straight away rather than leaving it for the end of the job.
Agree a tagging standard at the start of the project. Decide which dictionary you’re using, which tags every AHU, FCU, boiler and meter gets, and how you’ll mark the site, building and floor. Consistency matters more than perfection.
Searching with tags
Workbench’s Search can find components by tag using NEQL, the Niagara Entity Query Language. For example:
hs:ahufinds everything tagged as an AHUhs:temp and hs:sensorfinds temperature sensorshs:point and hs:writablefinds writable points
That turns jobs like “check every supply air sensor on site” from an afternoon of clicking into a single query.
Hierarchies
The station tree is organised however the engineer built it, often by driver and device, which means very little to a facilities manager. Hierarchies let you build a separate, logical navigation tree from tags, for example Site › Building › Floor › Equipment, or System › Equipment type › Unit.
Hierarchies are defined under the Hierarchy Service using level definitions:
- query levels pull in whatever matches a NEQL query
- group and list levels split the results into branches, for example one branch per floor or per equipment type
- relation levels follow relationships between components, such as points that belong to a piece of equipment
The order of the level definitions sets the shape of the tree. The results appear in the Hierarchy container in the Nav tree. After changing tags or definitions, right-click and refresh it.
Why it’s worth the effort
- Navigation. Hierarchies give each type of user a clean, logical tree, which you can tie to their role (see users, roles and nav files).
- Templates. Niagara 4 templates can link themselves automatically to existing points by matching tags, so good tagging makes template deployment almost hands-off (see templates and bulk deployment).
- Bulk changes. Find every point of a type with one query and change them together.
- Analytics. Tagged data is far easier to feed into analytics and energy tools, Niagara’s own or third-party ones.
Common mistakes
- Tagging only some of the site, so queries miss half the equipment.
- Mixing dictionaries for the same idea, such as Haystack on one floor and a custom tag on another.
- Spelling mistakes in custom tags. Queries are exact, and case-sensitive.
- Building hierarchies before the tags are finished, then wondering why branches are empty.
Next: bringing data in from field devices with Modbus and BACnet.