Quality
Every signal value in YTCC comes with a quality. The quality tells you whether the value can be trusted: whether the driver could read it and whether the connection to the device is up. It is not the age of the value. A value that does not change keeps its Good quality for as long as communication works.
Quality reported by drivers
Drivers report one of six qualities. The interface shows them with these texts:
| Code | Quality | Shown as | Meaning |
|---|---|---|---|
| 0 | Good | Good | The value was read and is valid. |
| 1 | Uncertain | Uncertain | The value is doubtful. For a simulated signal the text is Uncertain · Simulated. |
| 2 | Bad | Bad | The device reports the value as invalid. |
| 3 | Not connected | Bad · Not connected | There is no connection to the device, or the driver is not running. |
| 4 | Overflow | Uncertain · EU exceeded | The value is outside its engineering range. |
| 5 | Substituted | Good · Substituted or Good · Local override | The value was entered manually, in the field or in YTCC. It is valid and is not a fault. |
Good, Uncertain and Bad can carry a reason after them: Comm failure, Sensor failure, Config error, Stale (last usable) or Initial value.
When a driver stops sending its heartbeat, all of its signals change to Bad · Not connected. The last value stays on screen with that quality. When the driver loses the connection to a device, it marks that device's signals the same way.
Quality bits
Drivers that use IEC 60870-5 style quality also pass on these bits, which the interface lists with the value:
| Bit | Meaning |
|---|---|
| IV | Invalid |
| NT | Not topical: the value is not current |
| SB | Substituted: the value was set manually. YTCC also sets SB for signals in a manual mode. |
| BL | Blocked |
| OV | Overflow |
Quality on screens and in screen scripts
Screens and screen scripts use a simpler scale in the quality value:
quality | Meaning |
|---|---|
| 0 | Good |
| 1 | The browser has no connection to the YTCC server. |
| 2 | The driver or device is not connected. |
| 3 | Signal failure: the driver reported Uncertain, Bad or Overflow. |
| 4 | Manual value (Substituted) |
| 5 | Simulated value |
Objects treat 0, 4 and 5 as usable values. For any other quality, a bound object shows what its binding defines for an unavailable value instead of the value.
Quality in alarms and server scripts
The alarm service evaluates a value only when its quality is Good, Substituted or simulated Uncertain. For any other quality it does not raise a new alarm and does not clear an active one, so an alarm stays as it was until a trusted value arrives. A lost connection raises its own communication alarm, one per device.
Server scripts get the quality as a name: good, uncertain, bad, not_connected, overflow, substituted, or
unknown when there is no value yet. Server scripts do not filter values by quality; the script decides what to do.