Skip to main content
Version: Next

Tags

A tag is a named value with engineering metadata. This page is the complete property reference.

Tags hold configuration only. The live value lives in the runtime store; history lives in the historian.

General properties

PropertyTypeDescription
NamestringThe leaf name. Combined with its ancestors it forms the tag path.
EnabledboolA disabled tag is not polled, not evaluated for alarms and not historised. Its configuration is kept.
Data typeenumSee data types.
UnitstringEngineering unit — °C, bar, %, RPM. Used as a label by widgets, trends and exports.
DescriptiontextWhat this value means. Shown in pickers, tooltips and the AI assistant's context. Write it.
WritableboolWhether the tag accepts writes at all. Off by default.
Write level0–3Required operator write-security level. 0 = any writer, 3 = admin. Meaningful only when writable; enforced server-side.
Sourcedevice | internal | expressionDevice-backed (has a binding), a QUBIQ-owned memory tag, or computed from other tags.
Format stringstringDisplay format, e.g. #,##0.00. Applied consistently wherever the tag is shown.

Data types

TypeRange / notes
booleantrue / false
sbyte, byte8-bit signed / unsigned
int16, uint1616-bit
int32, uint3232-bit
int64, uint6464-bit
float32-bit IEEE-754
double64-bit IEEE-754
stringText
datetimeTimestamp
jsonStructured payload
arrayArray, with dimensions carried from the source

Match the tag's data type to the source. A mismatch surfaces as a conversion failure with Bad quality — which is correct behaviour, and much better than a silently truncated number.

Scaling

Scaling converts the device's raw range into engineering units. It is applied after the protocol read and before history, alarms and screens — so everything downstream sees the same engineering value.

PropertyDescription
Raw low / Raw highThe device's range, e.g. 027648, or 420 for a current loop.
Eng low / Eng highThe engineering range, e.g. 0100 °C.
Invert scalingReverses the curve, for sources where raw-high means engineering-low.
Clamp scaledBound the result to the engineering range. On by default.

All four range values must be set for scaling to apply.

Raw 4 – 20 (mA) → Eng 0 – 100 (°C)
raw 12 mA → 50 °C
Scale once, on the tag

Scaling in each widget means the historian stores raw counts, alarms compare against raw counts, and every new screen has to repeat the arithmetic. Do it here.

Quality and validation

PropertyDescription
Quality defaultQuality assumed before the first read: Good, Bad, Uncertain, Unknown.
DeadbandChange threshold. A change smaller than this is not propagated or stored.
Stale after (ms)Mark the value stale if no update arrives within this window.
Validation ruleOptional constraint applied to incoming values.

Quality

Quality travels with every value, through bindings, expressions, alarms and charts.

QualityMeaning
GoodThe value is trustworthy.
UncertainReadable but suspect — a stale value, a degraded source.
BadNot trustworthy — connection down, read error, conversion failure.
NotFoundThe address does not exist on the source.

Widgets show bad quality rather than rendering a stale number as if it were current. Expressions propagate the worst quality of their inputs, so a computed value cannot look better than the data behind it.

Deadband

The single most effective control on both network traffic and history volume.

DeadbandEffect
0Every change propagates. Correct for discrete states and counters.
Small (0.1–0.5% of span)Removes sensor noise; charts are visually unchanged.
Larger (1–2% of span)Substantial storage saving; adequate for slow analogue values.

Set it once here, and every consumer benefits.

Stale after

Push protocols (MQTT, OPC-UA subscribe, TCP) only send on change. A value that never changes is indistinguishable from a dead link — unless you set stale after. When the window expires without an update, quality degrades and the screen shows it.

Set it to a few times the expected update interval. It is the cheapest possible dead-link detection.

History

PropertyDescription
Enable historyStream this tag's values to the historian.
Store interval (ms)Force a stored point at this interval even if nothing changed — proves the signal was alive.
Storage connectionWhich store receives it. Normally the designated system historian.

History respects the tag's deadband, so noise is filtered before it reaches storage.

Historian

Alarming

PropertyDescription
Alarm enabledPer-tag master switch. Alarm definitions are only evaluated when this is on.

Individual alarms — mode, setpoints, priority, delays, deadband, latching — are configured per alarm on the tag. One tag can carry many alarms (Hi, HiHi, Lo, LoLo, Fault).

Configuring alarms

Write security

Two independent gates protect device writes:

  1. Writable — off by default. A non-writable tag rejects every write.
  2. Write level (0–3) — the minimum runtime operator level required. Enforced server-side in the write gate, so a modified client cannot bypass it.
LevelTypical use
0Unrestricted for anyone with write capability — HMI setpoints of no consequence
1Routine operator actions
2Supervisor actions — recipe changes, mode switches
3Administrator only — calibration, safety-adjacent parameters

LiveView authentication

Internal (memory) tags

Set source to internal for a value QUBIQ owns:

  • Operator setpoints and targets
  • Counters and accumulators
  • Computed KPIs written by a script or pipeline
  • Mode and state flags

Internal tags have no binding, are persisted without expiry, and are written from scripts (system.tag.write), pipelines or screens. An initial value can be supplied at creation to seed them.

Expression tags

Set source to expression for a value computed from other tags. The expression engine recalculates it whenever an input changes, and the result behaves like any other tag: it can be bound to a widget, trended, alarmed and read from a script.

Line1/Filler/Motor1/Power = Speed * Torque * 0.105
Line1/OEE = Availability * Performance * Quality
Line1/Filler/Motor1/Overspeed = Speed > 2800

An expression tag is a read-only projection. It has no protocol binding and rejects external writes — there is nowhere for a written value to go, because the next input change would overwrite it.

Settings

SettingValuesPurpose
ExpressiontextThe formula. Reads other tags by absolute path.
Evaluation modeon_change (default) · intervalRecompute when an input changes, or on a fixed period.
Evaluation intervalmsRequired for interval mode. Also the tick period when the expression reads the clock.
Minimum intervalms, 0 = unlimitedRate-limits the output. A fast input does not have to mean a fast output.
Quality policyworst_of_inputs (default) · always_good · explicitHow the result's quality is derived.

Dependencies are worked out for you

You never list the inputs. They are extracted from the expression when you save it, and the engine indexes by them, so a tag recomputes only when something it actually reads changes.

That index answers the other direction too: what breaks if I delete this tag? is a question the system can answer before you delete it, rather than after.

Quality is not an afterthought

The default worst_of_inputs means an expression reading one Bad input produces a Bad result. That is almost always what you want — a computed KPI built on a dead sensor should not look healthy.

Reach for always_good only when the expression genuinely does not depend on input quality (a constant, or a pure clock reading), and explicit when the expression decides quality itself.

Expression functions for the built-in function reference.

Using the clock

An expression that reads the current time is recognised as such and subscribed to a periodic tick, so it keeps recomputing even when no input tag changes. Set the evaluation interval to control how often — a "minutes since last batch" tag does not need to tick every second.

When not to use one

Arithmetic, unit conversion, bit unpacking, thresholdsAn expression tag
Anything with a database round trip, an API call, or a loopA pipeline
A value a human or a screen setsAn internal tag

An expression that needs a comment to explain it has usually outgrown being an expression.

Reading and writing tags in scripts

Python (pipeline / gateway)
result = system.tag.read("Line1/Filler/Motor1/Speed")
if result["quality"] == "Good" and result["value"] > 2800:
system.tag.write("Line1/Filler/Motor1/SpeedSetpoint", 2500)
JavaScript (designer / client)
const r = await system.tag.read("Line1/Filler/Motor1/Speed");
if (r.quality === "Good" && r.value > 2800) {
await system.tag.write("Line1/Filler/Motor1/SpeedSetpoint", 2500);
}

Always check quality before acting on a value. A Bad-quality read still returns a value — the last known one — and acting on it is how a dead sensor drives a live process.

Batch where you can: system.tag.readAll([...]) is one round trip, a loop of read is N.

Scripting API

Permissions

Reading tags and their bindings needs View the namespace. Creating, editing, deleting and bulk-deleting tags all need Manage tags; changing a binding needs Bind a tag to a protocol.

Checklist for a well-formed tag

  • Data type matches the source
  • Unit set
  • Description written in plain language
  • Scaling configured if the device sends raw counts
  • Deadband set for analogue values
  • Stale-after set for push sources
  • History enabled only where someone will look at it
  • Writable off unless it needs to be on — and a write level if it is

Next

Protocol bindings