Skip to content

eaxTags local tags

eaxScadaReferenceStarterProEnterpriseView as Markdown

eaxTags are local tags: tags that no device produces. A script, an operator (for a writable tag) or nothing yet gives them their value. They live in the tag engine like driver tags: on the UNS, in the historian, under alarm evaluation and on screens. The scripts that drive them are described in eaxTags script reference.

Definitions are plant-wide: on a server with the embedded NATS broker they are kept in its Key-Value store (EAX_TAGS, with history; see Unified namespace), so every node of a high-availability pair has the same ones. A server without it keeps them in a file, without version history.

Open Drivers, then Local tags (eaxTags). The Tags (n) tab lists every local tag you may read in the data grid; the Scripts (n) tab holds the scripts. The toolbar has + Tag, + Script, Export and Import, and the box Filter tags… matches the path, description, unit, kind and who changed the tag.

Column What it shows
Path The tag’s UNS path, sorted by default.
Value The live value, updated in place. A tag waiting for its first value shows a muted dash, never 0, with the tooltip “No value yet: waiting for a script, a driver or an operator to write it”.
Quality The tag’s quality, for example “Bad (waiting for initial data)”. It can be filtered and exported.
Unit, Range (Min, Max) From the definition.
Kind The markers SIM (simulated), WRITABLE and E-SIG EXT (e-signature required for external writers).
Changed Who changed the definition last, and when. Shown when at least one tag records it.
Actions (pinned right) comments (when eaxCollab is on), used, edit, history, delete.

delete is rose and asks first; when the tag is in use, the question lists the screens, alarms, recipes and scripts that use it (Find where a tag is used). history lists the stored versions of the definition.

The actions column is as wide as its labels in the Studio language. When the grid is too narrow for its columns and every action (typically at 1366 px), each row keeps edit and a ⋯ button instead. Its accessible name is “More actions for path”.

  • The ⋯ button opens a menu with the other actions: comments, used, history and delete. delete stays rose and still asks first.
  • Enter, Space or a click opens the menu with the focus on its first item. Arrow Up and Arrow Down move (and wrap), Home and End go to the first and last item.
  • Escape, Tab or a click outside closes the menu and gives the focus back to the button. Choosing an item closes the menu before the action runs, so its confirmation is on top.
  • Open comments on the tag show as a badge on ⋯.
  • The layout follows the window and the column widths: widen the grid or narrow a column and every action is back in the row.

The edit, history and delete buttons have accessible names that name the tag (“Edit path”, “History of path”, “Delete path”).

+ Tag opens New local tag; edit opens Edit path (the path cannot be changed there).

Field Member Notes
Path (UNS) path Letters, digits and _ . -, separated by /.
Description description
Unit, Initial value, Deadband unit, initial, deadband Initial value is 0 and cannot be edited while No value until written is ticked.
Range min, Range max min, max The engineering range.
No value until written no_initial See no_initial.
Writable by operators (a setpoint or mode; the value is kept) writable
Simulated (marked SIM everywhere: not a plant value) simulated
E-signature required for external writers esign_external
Write range, Edit range… write_range Saved with the tag: click Save too. See Limit tag writes.

A new tag starts as a measured value:

  • Simulated off. A simulated tag invites made-up values marked SIM; tick it only for a value a simulation script produces.
  • Writable by operators off.
  • No value until written on: from every start the tag is Bad, “waiting for initial data”, until a script, a driver or an operator writes it.

Ticking Writable by operators (a setpoint or a mode) turns No value until written off, so the tag starts with its initial value; unticking it turns the option back on. Once you set No value until written yourself, Writable no longer changes it. The dialog says so under the options: “A new tag is not simulated and has no value until written (a measured value). Ticking “Writable by operators” (a setpoint or mode) gives it its initial value instead.”

An existing tag opens with its own flags, and Writable does not change No value until written for it.

A definition is a JSON object. The API, the export file and the history use the same members. Members that are false, 0 or empty are left out of the server’s answers, except initial.

Member Type Meaning
path string The UNS path. Required.
unit string Engineering unit.
description string Shown with the tag. A simulated tag’s description gets “(simulated)” when it does not say so.
initial number The value the tag starts with, Good, when it is new and at every start (a writable tag then gets back its operator value).
no_initial boolean No value until written. See below.
deadband number Changes smaller than this are not published. At least 0.
min, max number Engineering range, used when min < max.
writable boolean An operator may write it through the normal tag write. The value written is kept plant-wide and restored after a restart or a failover. A write to a tag that is not writable is refused: “path is set by a script, not written”.
simulated boolean The value is a simulation, not the plant. Each value is marked simulated, as a value from an accepted simulated eaxPLC is: /api/tags, the live data socket, SIM on screens and trends, history samples and alarm events. A screen interlock that reads it is active unless it is ticked Allowed in commissioning; as a limit tag it refuses every write; as the plant e-stop signal it reads as unknown. See On (commissioning only): accepted and marked. Turning it on writes the held Good value again at once, marked; turning it off leaves the held value marked until the next write.
esign_external boolean An external writer (a NATS command, a non-session API caller, an AI agent) must sign every write.
write_range object The values a write may carry: min, max, step, values. eaxTags are numeric: max_length and texts are refused.
placeholder boolean A measured value a starter template brings, waiting for a device. It changes nothing about who produces the tag; a driver mapping refused on its path proposes Hand over to driver first. See Template tags waiting for a device.
updated_at, updated_by number, string Set by the server on every save (Unix seconds, user name).
{ "path": "Line1/Tank1/Level", "unit": "%", "initial": 0, "no_initial": true, "min": 0, "max": 100 }
{ "path": "Line1/Tank1/HighSetpoint", "unit": "%", "initial": 80, "min": 0, "max": 100, "writable": true,
"write_range": { "min": 0, "max": 100 } }
  • The initial value must be 0. A definition with "no_initial": true and another initial is refused: “path: a tag with no initial value (no_initial) has initial 0”.
  • At every start the tag has no value: Bad, “waiting for initial data”, with timestamp 0. A script’s tags.set from Good inputs makes it Good; a writable tag gets back the value an operator wrote. Its alarms are held until the first real value (Local tags with no initial value).
  • A save that leaves the member out keeps the stored value. POST /api/dev/eaxtags/tags (one tag or {"tags": [...]}) keeps no_initial of an existing tag when the body does not name it, as it does for esign_external and write_range. Only "no_initial": false clears it. The Studio always sends it.
  • Export and import carry it. An import saves each definition as the file has it: a tag in the file without no_initial is saved without it.

Tags fed by an eaxPLC that stops reporting

Section titled “Tags fed by an eaxPLC that stops reporting”

A tag written by a script pinned to an eaxPLC (its node names the PLC, see What a script reads and writes) holds that PLC’s value. When nothing feeds it any more, the tag says so:

  • After 20 s with neither status nor values from the PLC, the tag goes Bad. eaxScada looks every 5 s, so it is Bad 20 to 25 s after the PLC’s last message. Its last value is kept. Its timestamp is the last reading’s plus 1 ns (the same millisecond on screen), so the last Good reading stays in the history. Reason: “eaxPLC node not reporting”.
  • The same when the PLC reports but not that the script runs. The script is stopped or crashed on the PLC: after 20 s with no status saying it runs (Running) and no values from it, its tags go Bad the same way. Reason: “script id not running on eaxPLC node”. A running script that does not change a value stays Good: its status keeps saying it runs.
  • A script that no longer runs on that PLC: disabled, unpinned, deleted or pinned to another PLC. Its tags go Bad the same way at the next look, within 5 s. Reason: “script id no longer runs on eaxPLC node”.
  • The reason is carried on the tag as quality_reason in the tag’s JSON (r in the live data socket’s TAG_UPDATES, see TAG_UPDATES). The next write clears it. Screens do not show it: the quality badge still reads “Bad”. The log warning below names the PLC and the script too.
  • The PLC’s next value makes it Good again.
  • Only a tag still holding the script’s last write goes Bad. A tag that an operator or a script on eaxScada wrote since is left alone. A writable tag last written by the PLC goes Bad like the others.
  • With or without no_initial, writable or not: the rule is the same.
  • The historian gets one Bad point per silence under the default policy. A logging rule logs the change to Bad at once too, whatever its deadband, as for driver tags (Quality of periodic and triggered samples). Before 29 November, a rule ON_CHANGE with a deadband did not log a change of quality alone.
  • Alarms are held on the Bad value: they neither trip nor clear, and an alarmed tag raises its “Signal unreadable” alarm (Values that cannot be read). An interlock that reads the tag blocks its command, unless If the interlock reads a Bad value is Allow (Decide what a Bad value does).
  • The log has one warning per script per silence: “eaxTags script not running on its eaxPLC: the tags it wrote are Bad, last value kept”, with the PLC, the script, the number of tags and the reason. For a script that no longer runs there: “eaxTags script no longer runs on its eaxPLC: the tags it wrote are Bad, last value kept”.

A tag written by a script that runs on eaxScada takes the quality of the tags the script read. The full rules are in Quality of a script’s values.

  • Good inputs, Good value. An Uncertain input stores the value Uncertain. A Bad or missing input keeps the tag’s last value and makes it Bad. A disabled channel makes it out of service. A simulated input marks the value SIM.
  • The reason names the script and the input, for example “script id: input path Bad (…)”, in quality_reason. A script that keeps failing gives “script id failing: error”; a disabled or deleted one, or one pinned to an eaxPLC, gives “script id no longer runs”.
  • Only a tag still holding the script’s last write is marked, once per spell. A tag no script has written since eaxScada started is left as it is while its inputs wait for their first values.
  • A writable tag is never marked. A script’s write to it from inputs that are not Good is not applied.
  • Only a value written from Good inputs makes the tag Good again.
  • Alarms, interlocks and history treat it as any Bad or Uncertain tag: alarms held and “Signal unreadable” raised, interlocks blocked unless set to Allow, one history point per change of quality.

The member marks a starter template’s measured value as waiting for a device.

  • Every starter template’s measured value carries it: the tags that are not writable and have no_initial. Plants that applied a template earlier keep their tags unchanged.
  • It changes nothing about who produces the tag. The tag stays an eaxTag until an engineer hands it over to a driver mapping.
  • A save that leaves the member out keeps the stored value, as for no_initial. Only false clears it. The API and the export carry it.

A driver mapping on a path a local tag produces is refused with 409 OWNED_BY_LOCAL_TAG, the local definition and the handover’s plan. Hand over to driver moves the path to the mapping and keeps the definition in the mapping’s handed_over record; Return to local tag puts it back. See Connect a device to an eaxTag.

A save is refused, with HTTP 400 and the reason in error, when:

  • the path is not letters, digits and _ . - separated by /, or has //, .., or a trailing / or .;
  • a number is not finite, or deadband is negative;
  • min or max is set and min is not less than max;
  • the write range is invalid or textual;
  • the path belongs to a driver: “path is produced by producer: an eaxTag cannot take a field tag”.

Saving an existing tag changes its definition and leaves its current value alone (turning simulated on only marks it, see the table). A new tag starts at its initial value, or with no value when it has no_initial.

Reads need a signed-in user and return only the tags the caller may read. Changes need the engineer role or above. Every change writes its audit record first (EAXTAG_SAVED, EAXTAG_DELETED, EAXTAG_IMPORTED); when the record cannot be written the change is refused with 503 AUDIT_NOT_WRITTEN and nothing is stored. The record of a single tag save names writable, simulated, esign_external and no_initial. Route list: HTTP API routes, /api/dev.

Request Answer
GET /api/dev/eaxtags {"tags", "scripts", "status", "store", "active"}: the definitions, the scripts with their status on this node, the store’s name, and whether this node runs the scripts.
GET /api/dev/eaxtags/tags The tag definitions, by path.
POST /api/dev/eaxtags/tags (or PUT) with one definition The saved definition.
POST /api/dev/eaxtags/tags with {"tags": [...]} {"saved": [...]}. All or none: every definition is checked before any is saved; a path twice in the list is refused.
DELETE /api/dev/eaxtags/tags?path= {"deleted": "<path>"}; 404 when there is no such tag. The tag engine keeps its last value; nothing produces it any more.
GET /api/dev/eaxtags/export The file eaxtags.json: {"tags": [...], "scripts": [...]}.
POST /api/dev/eaxtags/import An export (at most 8 MiB): the tags all or none, then each script, checked with a dry run. Answers {"tags": n, "scripts": n}.
GET /api/dev/eaxtags/history?kind=tag&key=<path> The stored versions, newest first: revision, time (Unix seconds), deleted, value (the definition). kind=script&key=<id> for a script. 403 without read access to the tag. An empty list on a server that keeps the definitions in a file.

A body that is not JSON is refused with 400 "invalid JSON"; a tag body is limited to 1 MiB. An operator’s write to a writable eaxTag goes through POST /api/tags/write like any tag write, under the write policy.