Tag Transforms
Reshaping a tag's stream before anything aggregates it — shifting it in time, taking a window around each point, or latching it to a trigger.
Most measures answer "what was this worth over that period". A tag transform answers a different question: what should this tag's stream look like before anything sums it up?
It sits earlier in the chain than aggregation. Where a tag-level calculation computes a new value from tag values, a tag transform leaves the values alone and changes when they count — shifting them in time, widening each one into a window, or holding one until something else says to take a new reading.
That distinction matters because the two are easy to confuse and solve different problems. If the numbers are wrong, you want a calculation. If the numbers are right but land at the wrong moments, you want a transform.
The three types#
A tag transform measure is a Timestamp interval measure, and it takes one of three forms.
| Type | Configure | What it does |
|---|---|---|
| Offset | An Offset | Shifts every point in the stream by a fixed amount |
| Range | An Offset Start and a Range End | Replaces each point with a window relative to it |
| Latch | A Trigger Source, optionally an interval | Holds the tag's value, taking a new reading only when the trigger source fires |
Offset — the stream arrives at the wrong time#
Use it when a tag's timestamps are systematically displaced from the event they describe. A lab result stamped when it was entered rather than when the sample was taken; a meter that reports on the hour for the hour just finished; a historian whose clock runs against a different convention from the rest of the plant.
The fix is arithmetic, not interpretation: shift the stream so its points land where they belong, and every measure built on top of it becomes correct at once. The alternative — compensating inside each calculation that reads the tag — has to be repeated everywhere and is forgotten exactly once.
Range — a point should count for a span#
Where Offset moves a point, Range widens it. Each value is taken to apply from offset start to range end relative to its own timestamp, rather than only at the instant it was recorded.
This is what you want when a reading genuinely represents a period: a density measured once per batch that applies for that batch, a setpoint that holds until the next one, a manual reading that describes the shift it was taken in.
Latch — take a reading when something else happens#
Latch couples one tag to another. The tag's value is held, and a new reading is taken only when the trigger source fires.
That is the shape of most sampling problems: record the line speed at the moment each bottle is rejected; capture the furnace temperature when a charge is tipped; read the tank level on every batch start. Without it, you are left correlating two independently timestamped streams after the fact and hoping their clocks agree.
Where the trigger source carries a time scheme, you can also constrain the latch to an interval.
A latched value persists until the next trigger. The whole point of a latch is that the value is held. That also means a stalled trigger source leaves the last value in place indefinitely, and it will look like a live reading rather than a stale one. If a latched measure stops changing, check whether the trigger is still firing before concluding the process is steady.
Value, quality and exception transforms#
Alongside the tag transforms there is a second family that transforms a measure rather than a tag, selecting what is carried forward:
| Transform | Carries |
|---|---|
| Value | The value itself |
| Quality | The source's quality indication rather than the value |
| Exception | Limit exceptions, configured with a context and a limit |
Quality is the one worth knowing about: it turns "how trustworthy was this reading" into a measure you can trend, limit and report on, instead of a property buried behind the value. On a source that reports quality honestly, a quality measure is often the earliest warning that an instrument is failing.
Choosing between a transform and a calculation#
| You want to | Reach for |
|---|---|
| Correct systematically wrong timestamps | Tag transform — Offset |
| Make a reading apply across a span | Tag transform — Range |
| Sample one tag when another changes | Tag transform — Latch |
| Derive a new number from tag values | Tag-level calculation |
| Summarise a stream over a period | Aggregated measure |
| Combine several measures per period | Calculated measure |
Reaching for a calculation where a transform is meant is the common error, and it produces expressions that are hard to read because they are doing time arithmetic inline that the model could have done once.
Templates#
Every tag transform property — offset, offset start, range end, trigger source, the latch interval — can be locked on a template, so a standard transform is enforced across instances while a site-specific offset stays editable. See Templates: Instantiating and Updating.
Diagnosing#
| Symptom | Likely cause |
|---|---|
| A latched measure stopped changing | The trigger source stopped firing; the held value persists by design |
| Values land in the wrong period | An offset is needed, or an existing one has the wrong sign |
| A reading only counts at one instant | Range is what makes it apply across a span |
| Transform fields are greyed out | The measure is active and not of Timestamp interval type, or the property is locked by a template |
| Two streams will not line up | Latch one to the other rather than correlating them afterwards |