All posts

Tag groups: direct, leased and driven

Poll rate is the setting most often chosen once, at the start, for every tag at the same value. It is also a setting where a few minutes of thought scales across the whole system.

What a tag group actually governs

A tag group sets the execution rate for OPC tags. It also governs expression and query tags, but only if their Execution Mode is set to Tag Group — the default for those is Event Driven, so a tag group has no effect on them until somebody changes it. Memory tags do not automatically poll or update at all, so a memory tag in any group is unaffected by either rate.

Worth establishing before the modes, because “every tag is read at the group rate” is a tidier model than the real one and it will mislead you during an audit.

Direct: one rate, all the time

A direct group executes at one fixed rate, set in milliseconds by the Rate property. It does not change behaviour based on anything. This is also the mode the default tag group uses on a newly installed gateway, which is why the default group is often doing more work than anyone chose.

It is the right choice for anything whose value must be current regardless of who is watching. It is the wrong choice as a blanket default, because a plant full of tags nobody has open still costs you that execution rate.

One setting changes what that costs. Data Mode can be Polled, where tags are read at each group execution for predictable network load, or Subscribed, where OPC tags subscribe to updates and reduce traffic. On OPC UA the Sampling Interval defaults to -1, meaning it inherits the tag group Rate.

Leased: faster when somebody is watching — usually

A leased group has two rates. Tags being displayed run at the Leased/Driven Rate; tags in the same group that are not displayed run at the base Rate.

The important qualifier is the one people miss in both directions. By default a leased tag is not switched off when nobody is looking — it drops to the base Rate and keeps going. But a Rate of 0 means the tag group will not execute, so a leased group with a base rate of 0 genuinely does stop for undisplayed tags. Both arrangements are legitimate; what matters is knowing which one you configured.

What grants a lease is a component bound to the tag being visible in a client, a session, or the Designer. Inductive Automation is explicit about the limit: viewing the tag only in the Tag Browser will not cause the group to execute at the leased rate. That is worth knowing before you conclude anything from watching a tag while testing.

Driven: faster when a condition says so

A driven group switches rate on a condition you write. A Driving Expression is compared to a Comparison Value using a Driving Comparison operator — the usual six, plus Any Change. While the comparison holds, the group runs at the Leased/Driven Rate; otherwise it runs at the base Rate.

Two options break the two-rate model, and both are useful. With Any Change selected, the group executes immediately whenever the driving expression changes value. With One Shot, the group executes once when the condition becomes true and waits for false-then-true to run again — and the Leased/Driven Rate is ignored entirely.

This is the mode for equipment that only matters while it is doing something: a line that is down, a mixer between batches, a pump outside its duty period. In our experience it is under-used relative to how much load it can remove.

The history question, which is not the one you expect

It is tempting to assume that a historised tag in a leased group gets a sample interval that depends on whether somebody had a screen open. That is true in one configuration and not the others, and the setting that decides is Sample Mode.

On Change stores a value when the tag’s value changes — and the value only changes when the group executes, so here the group rate really does drive the stored interval. Max Time Between Samples belongs to this mode too, counted in group executions, so it stretches with a slow group unless the tag group carries its own non-default value, which overrides the tag’s. Periodic stores at fixed intervals based on the Sample Rate. Tag Group uses the execution rate of a Historical Tag Group you choose — which should not be the leased group itself, or the interval varies with display after all.

Under Periodic and Tag Group the interval stays fixed, but the value stored is whatever the tag currently holds — so a slow-executing group gives you stale values at a regular cadence rather than gaps. Inductive Automation’s own advice covers the interaction: make sure the group’s slow speed is at least as fast as your history tag group speed, and align the evaluation frequency with or slower than the tag’s primary tag group.

Alarms are simpler and less forgiving. All alarms are only evaluated after a tag’s value changes, so alarm evaluation on a slowly executing group is working from data at that slower cadence, whatever the history settings say.

The audit worth doing once

Plenty of gateways we see were commissioned on the default direct group at a rate somebody picked early. That is a reasonable start and a poor permanent arrangement, because it prices every tag at the cost of the most demanding one.

  • Which tags are read fast because they need to be, and which inherited the default group?
  • Which fast tags only matter while a machine is running, and could be driven instead?
  • For anything leased, is the base Rate acceptable for alarms — and is it 0, in which case undisplayed tags are not executing at all?
  • For anything historised in a leased group, what is its Sample Mode, and does the answer change what you thought you were storing?

That last pair is the one most worth checking today. Both are small configuration details with long tails, and neither announces itself.

Common questions

What is the difference between direct, leased and driven tag groups?
A direct group executes at one fixed rate set by the Rate property. A leased group has two rates and uses the Leased/Driven Rate for tags currently displayed. A driven group also has two rates, switching when a Driving Expression compared to a Comparison Value satisfies the Driving Comparison operator — except with Any Change or One Shot, which do not use the two-rate model.
Do leased tags stop being read when nobody is looking?
Usually not: they drop to the base Rate rather than stopping. The exception matters, because a Rate of 0 means the tag group will not execute, so a leased group with a base rate of 0 does stop for tags that are not displayed.
Does viewing a tag in the Tag Browser grant a lease?
No. Inductive Automation states that viewing the tag only in the Tag Browser will not cause the tag group to execute at the leased rate. A lease comes from a component bound to the tag being visible in a client, a session, or the Designer.
Does a leased group change how often tag history is stored?
It depends on Sample Mode. Under On Change the stored interval follows group execution, because the value only changes when the group runs. Under Periodic the interval is fixed by the Sample Rate, and under Tag Group it follows a separately selected Historical Tag Group, so in both of those the interval stays fixed and the values stored simply become staler.
Do tag groups control every kind of tag?
No. They set the execution rate for OPC tags, and for expression and query tags only when Execution Mode is set to Tag Group, which is not the default. Memory tags do not automatically poll or update, so a tag group does not affect them.

References

Gateway working harder than it should? We work on Ignition systems across California’s Central Valley, and poll-rate review is usually the cheapest performance work available on a system that has grown for a few years.

Contact us