Context model¶
A context model is one configuration resource per collection: the project it belongs to, the alarms Alarm Health
reads, and the assets of the area: each with its tags (role, unit, normal range, limits), its alarms, free-text rules
and linked documents: and the relations between assets. It is what lets a run know that PT-101 is the inlet
pressure of pump 3, that 40–60 psi is normal, and which SOP to quote.
{ "project": "Production", "displayName": "Line 2", "aiCutoff": false,
"alarms": { "journal": "MainJournal", "include": ["[default]Line2/*"], "exclude": ["*|Diag*"] },
"assets": [
{ "id": "line2.lact", "name": "LACT", "type": "meter", "parent": "line2",
"tags": [ { "path": "[default]Line2/LACT/Runtime", "role": "measurement", "unit": "h",
"normal": { "min": 0, "max": 6 }, "limits": { "hh": 8 } } ],
"alarms": [ "[default]Line2/LACT/Runtime|HighRuntime" ],
"rules": [ { "id": "r1", "tag": "[default]Line2/LACT/Runtime", "condition": "Runtime > 6 h in one run",
"consequence": "damage to the LACT", "action": "stop and inspect", "source": "operator" } ],
"documents": [ "<document id>" ] } ],
"relations": [ { "from": "line2.oiltank", "to": "line2.lact", "type": "feeds" } ] }
alarms.journalmay be left out when the gateway has one journal. Patterns are case-insensitive,*matches anything, and a pattern holding|matches<tag path>|<alarm name>; an emptyincludemeans every source. The policy'sread.tagProvidersandread.excludeTagPathsstill decide first.- Tag
roleismeasurement,stateorsetpoint; a measurement may carrykind(perPartorcontinuous, see Per-part results); relationtypeisfeeds,controls,measures,sharesUtilityorcontains. - Any tag may carry a
name: the words people at the plant use for that reading ("name": "intensifier response"), at most 100 characters, not blank. Every page names a reading the same way: the Findings list, the finding page's subtitle, the Anomaly Watch queue card, finding titles and texts, the digest email and the Alarm KPIs findings list: the asset'sname, then the tag'sname; with noname, the last part of the tag'spathas the model writes it, split into words (IntResponseMsreads "int response", a trailing unit dropped or turned into the quantity it measures, soMetalTempFreads "metal temperature"). A path listed under several assets is named by the finding's asset; with none, it is led by its folder and uses anameonly when every asset gives the same one. Anameis shown, never matched: no check uses it to find or classify a tag (rules such as the station pump rule read the tag's path), and a finding's identity does not include it, so adding or changing one never changes what is filed. The one exception: on a tag with asource(section 7.7) thenameis also the measurement name the source's rows are matched by. Until 1.5.21 a save refusednameon a tag without asource, and pages that named a reading from the stored, lower-cased path showed "DCM-304 intresponsems". - A
measurementtag may name its setpoint tag and the band it should hold, for Anomaly Watch's setpoint check (section 8.5):"setpoint": "[default]Cell2/DCM-203/MetalTempSp", "tolerance": {"abs": 10}(in the tag's unit) or"tolerance": {"pct": 2}(of the setpoint), not both. With nosetpointnamed, asetpoint-role tag on the same asset is paired by name when the match is unambiguous (MetalTempFwithMetalTempSp). A save refuses asetpointortoleranceon a tag that is not a measurement, a setpoint naming the tag itself, and a tolerance of 0 or less (or 100 % or more). - A
measurementtag held on its setpoint by a controller may declare it, for the controlled-output check (section 8.5, A controller that hides a sensor):"control": {"manipulated": "[default]Plant/Aeration/TotalAirflowScfm", "load": "[default]Plant/Headworks/InfluentFlowMgd", "lab": {"source": "query:Plant/PlantDaily", "name": "avg_do_mgl"}, "acts": "raises"}next to itssetpoint.manipulated(required) is the tag the controller moves;load(optional) is a demand signal that sets how much output is normal (BOD or ammonia load, throughput of the thing being controlled), not a hydraulic flow the output does not follow;lab(optional) is a second reading of the same quantity (a hand-held or lab value) read from a named query or script (query:orscript:source) as a sourced tag is: it returns everymeasurementscolumn,time,asset,product,name,value,unit,recordId(product,unitandrecordIdmay be null but must be there, e.g.NULL AS product; a source missing a column is not read, and the finding's evidencelabProblemnames the missing columns); the lab'sasset, which must be an asset of the model, defaults to the tag's own, and the rows'assetcolumn must name it; a DATE column is read as midnight of that day in the plant's time zone;acts(optional) says whether more outputraisesorlowersthe reading, and the finding says which way the sensor may be off only when it is given. Nothing is inferred: a save refuses acontrolwith nosetpoint, nomanipulated, amanipulatedthat is the measurement or its setpoint, alabwith no name or a malformed source, anactsother than those two, or acontrol(or asetpoint) on a tag markedkind: "perPart"(a per-part result is judged by parts, never held on a setpoint; a tag only inferred to be per part is not covered, so mark it); a lab source is also checked the way a sourced tag's is (policy, project, the query and itsstart/endparameters). aiCutoff: truestops every run on the collection before anything is gathered or sent (SKIPPED,ai-cutoff). Use it to pause a collection without touching its playbooks.- The collection name
gatewayis reserved for Gateway Health and cannot hold a context model.