Appearance
Quality checks
A tag's quality says whether Nexus could read a value. It does not say whether the number is believable. A 4–20 mA transmitter on a broken wire reads full scale, a frozen scanner repeats its last reading, and a level that jumps 40 % in one scan is noise. All three arrive with Good quality.
Quality checks catch those readings. Each check is switched on per tag, and each one lowers the reading's quality when it fails. The value itself is never changed.
| Check | Fails when | Quality |
|---|---|---|
| Range | the value is below the minimum or above the maximum | Bad |
| Rate of change | the value moves faster than the limit, per second | Uncertain |
| Stuck value | the value has not changed for longer than the limit | Uncertain |
Only numeric tags are checked. A reading that already arrived Bad or Stale is left alone. Leave the stuck check off for values that are legitimately static, such as an E-stop or a mode selector.
Where to set them
In Studio, open Edit Tag… and go to the Quality checks category. Each check has its own switch. Changes apply as soon as you save, with no gateway restart. Editing quality checks needs the gateway-configuration permission.
In the project file the checks sit under the tag's quality object:
json
{ "path": "Tank1/Level", "dataType": "float",
"quality": {
"min": 0, "max": 100,
"maxRatePerSec": 25,
"stuckAfterSec": 300,
"alarm": { "enabled": true, "priority": "high" }
} }Every key is optional. A missing key switches that check off. Nexus refuses a quality object it cannot read (a misspelled key, a number written as text, a minimum above the maximum), and while it is refused no check runs on that tag.
Raise an alarm when a check fails
Lowering the quality changes how the value looks on screens, but nobody is told. To put a failing check in the alarm list, switch on Raise an alarm when a check fails in the Alarm section of the same category and choose a priority. The switch is available once at least one check is on.
With the alarm on:
- A failing check makes one alarm active for the tag. Its message says which check failed, for example
[DEFAULT]Tank1/Level implausible: value outside its plausible range. - If a different check starts failing (the value comes back into range but then freezes), the same alarm is updated. A second alarm is not raised.
- The alarm clears with the next credible reading. As with any alarm, an operator who has not acknowledged it can still do so after it clears.
- It is acknowledged, shelved, journaled and notified like every other alarm. In the alarm table and the journal its limit is
plausibility. - It is separate from the tag's own alarm limits (
hiHi,hi,lo,loLo). Neither one suppresses or clears the other. - Setting the tag's
AlarmEvalEnabledmember to false silences it, like every alarm on the tag.
Switching the alarm off, removing the tag's checks or deleting the tag clears an active alarm right away. The journal entry says why, for example (cleared: alarm when implausible turned off).
After a gateway restart, an alarm that was active is closed with (cleared: gateway restarted). If the tag is still failing a check, the alarm is raised again as soon as Nexus judges the tag. For a stuck value that is after the stuck time has passed again, counted from the restart.
In the project file the option is quality.alarm: enabled is true or false (false if missing) and priority is one of diagnostic, low, medium, high or critical (low if missing), spelled exactly as for alarm limits. An alarm that is switched on with no check is refused.