The short answer
Bad Quality
Every value in a SCADA system carries a quality that says whether it can be trusted: good, uncertain, or bad, with a substatus that says why, such as communication failure, configuration error, device failure, sensor failure, or last known value. Quality originates at the driver from the device response, or from the device itself where the protocol carries it, and it propagates through every tag, calculation, display, alarm, and historian record that uses the value. Bad quality is caused by lost communication, a wrong address or data type in the tag configuration, a license or tag limit, a script error, a device reporting a sensor failure, or a value out of range, and the rules are that a bad value is never shown or used as a number, that alarms on bad quality are distinct from process alarms, and that the historian stores the quality with the value.
Key points
- Quality is part of the value: good, uncertain, or bad, with a reason. A number without quality is incomplete.
- Quality propagates: a bad input makes every calculation, display, alarm, and record that uses it bad.
- Communication failure is the usual cause; configuration errors are the usual cause on one tag among many.
- A bad value is shown as a marker, never as a number, and never used by a controller or a script as if it were good.
- Alarm on bad quality separately from the process alarm, and suppress the process alarm while quality is bad.
- The historian stores quality with the value so that a gap or a bad period is visible in the trend.
What quality means
| Class | Common substatus | Meaning |
|---|---|---|
| Good | Good; local override | The value is current and trusted; an override means a person substituted it |
| Uncertain | Last usable value; sensor not accurate; engineering units exceeded; sub-normal | The value may be usable with care; the device or driver has doubts |
| Bad | Communication failure; not connected; configuration error; device failure; sensor failure; last known value; out of service; waiting for initial data | The value cannot be trusted; the reason says where to look |
The class is what displays, alarms, and logic act on. The substatus is what the technician uses. A tag with bad quality and a communication failure substatus is a lost link; one with configuration error is a wrong address; one with device failure or sensor failure is the device telling the system that its own measurement is not valid, which a smart transmitter or a protocol such as DNP3 can do.
Where quality comes from and where it goes
The driver assigns quality from the outcome of each poll: a response sets good, a timeout after retries sets bad with communication failure, an exception from the device sets bad with configuration error or device failure. Protocols that carry quality from the device, such as OPC UA and DNP3 with its flags, pass the device quality through. The tag holds the value with its quality. A calculated tag or a script that uses the tag inherits the worst quality of its inputs, if the platform is configured to propagate it, and a display that shows the tag shows the quality as a marker. An alarm on the tag is suppressed or replaced by a bad-quality alarm. The historian stores the quality with the sample, so that a trend can show a bad period as a gap or a marked segment rather than a line.
Causes by layer
| Layer | Cause | Pattern |
|---|---|---|
| Device | Sensor failure, out of range, device fault, not initialized after power up | One tag or a group from one device; substatus device or sensor failure |
| Link | Lost communication, timeouts, retries exhausted | Every tag from the device at once; substatus communication failure |
| Driver configuration | Wrong address, register, data type, or unit ID; a register that does not exist; a block request that includes one bad register | One tag or one request block bad while the device is otherwise fine; substatus configuration error |
| Server | License tag limit reached, driver stopped, OPC server down, a subscription dropped | Many tags across devices; the ones added most recently, or everything through one driver |
| Calculation and script | Division by zero, a missing input tag, a script error, a renamed tag | Derived tags bad while their inputs are good |
| Client | Display bound to a tag that no longer exists, a project version mismatch | Bad on one client or one display, good elsewhere |
Rules
- Never show a bad value as a number. The display replaces it with a marker and a color, and the trend shows a gap.
- Never use a bad value in control. A controller reading a remote setpoint checks its status and holds or reverts; a script that computes a total skips bad samples and flags the total.
- Alarm on bad quality as its own alarm, with a priority that reflects what the value is for, and suppress the process alarms on the tag while it is bad.
- Propagate quality through calculations; a platform setting usually controls it, and it should be on.
- Store quality in the historian and show it in trends; a reporting query filters on it.
- Trend the fraction of time each critical tag is bad; a tag that is bad five percent of the time has a link or a device that needs attention.
Diagnosing one bad tag
- 1
Read the substatus
Communication failure, configuration error, device failure, or something else. It halves the search.
- 2
Check the scope
Every tag from the device bad, or one? Every device through one driver, or one device? The scope points at the layer.
- 3
Configuration error: check the address
Register or tag name, data type, unit ID, and whether the register exists on the device. A request block that includes one register the device lacks fails the whole block.
- 4
Communication failure: check the link
Driver statistics, then the network, the medium, and the device, as for any lost communication.
- 5
Device failure: read the device
Its own diagnostics say what is wrong: a sensor fault, an out-of-range input, a module fault.
- 6
Derived tags: check the inputs
A calculated tag bad with good inputs is a script or expression error; look at the calculation log.
Frequently asked questions
- The tag shows bad quality but the device is responding to other tags. Why?
- Configuration error on that tag: the address, data type, or unit ID is wrong, or the register does not exist. If the tag is part of a block request, one bad register fails the block and every tag in it. Check the substatus and the address against the device register map.
- Can a value be bad quality at the server and good on the display?
- Only if the display is not showing quality, which is a display design fault. Every value on a display should carry a quality marker. Check the display configuration; a value that ignores quality will show the last number forever.
- What should a controller do with a bad remote value?
- Not use it. The controller receives a status bit or a quality with the value, or derives one from a heartbeat, and its logic holds the last good value for a limited time, then reverts to a local default or a safe state, and alarms. A controller that uses whatever number arrives will act on a zero the day the link fails.
- Why does the tag go bad briefly every few minutes?
- A poll cycle that occasionally exceeds the timeout, a device that is slow to answer under load, or a link with intermittent loss. Look at the driver statistics for response time and error counts; lengthen the timeout if the response time is close to it, and fix the link if the errors are real.
Related topics
- How to Diagnose a Bad Quality TagTrace a bad quality indication from the SCADA screen back to its source: the tag configuration, the driver and device connection, the controller tag, and the field signal, using the diagnostics each layer provides, and separate a stale value from a bad one.
- Tag Shows Bad QualityA tag flagged bad or uncertain by the driver. What the quality codes mean, the difference between a device that is not answering and an address that does not exist, and how to clear each.
- Lost CommunicationsWhat should happen when SCADA loses a device, a site, or everything, how the pattern tells which, the diagnostic order from the server outward through network, firewall, medium, and site, and the design that makes a lost link an alarm rather than an incident.
- Frozen ValuesWhy a SCADA value stops changing while looking normal: the five layers where it can freeze, from a transmitter holding its output to a client that lost its server, how to find the layer by comparing each, and the heartbeat that makes a freeze announce itself.
- Signal ValidationCatching a failed analog input in logic before it runs a pump on a dead transmitter: range checks, module status bits, frozen-value detection, rate checks, and what the program does with a bad value.
- Historian Data CollectionDeciding what the historian stores and how often: polled versus exception collection, the deadband per tag, rates for control loops, levels, totals, and compliance values, timestamps at the source, quality codes, calculated tags, and the tag list review that keeps a historian from filling with noise and missing what matters.
Direct contact
Have a controls question?
Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.