OPC Solutions · ASP ENGINEERING LIBRARY

OPC UA Data Quality and Timestamps: Avoiding Stale-Value Decisions

In this article 6 sections

A process value is useful only when the receiver can tell whether it is valid and current enough for its purpose. In OPC UA, keep the value, StatusCode, and timestamps together through the gateway, historian, dashboard, and integration layer. A number without its quality context can look plausible after the data source has failed.

OPC UA Data Quality and Timestamps: Avoiding Stale-Value Decisions — Observe → Preserve → Evaluate → Present.
OPC UA Data Quality and Timestamps: Avoiding Stale-Value Decisions — Observe → Preserve → Evaluate → Present. View full size

Design the requirement before the configuration

Distinguish source time from server time and arrival time. They describe different points in the data path and may not all be available. A Good status does not by itself satisfy an application-specific freshness requirement. Equally, a stable process value does not need a new source timestamp every display refresh. Define stale-data detection using the source behavior, communication health, and required update policy. Show Bad or Uncertain quality explicitly rather than silently retaining a normal-looking last value.

Worked scenario

Consider a tank level that remains at 42% before a network interruption. A client that shows 42% in its normal color can imply a current measurement. A better display preserves the last observation but marks it unavailable or stale, shows when it was last confirmed, and prevents dependent analytics from treating it as a new sample. The acceptable age must come from the use case, not this example.

What to verify

CheckEvidence to record
ValuePreserve native data type and engineering unit
StatusCodeRetain severity and useful diagnostic detail
Source timestampKeep UTC semantics and source availability
Arrival timestampUse for transport diagnostics, not as fabricated process time

Acceptance and handover

Test a constant value, a changing value, a disconnected source, an invalid sensor reading, and a clock offset. Compare the OPC client against the final consuming application. Confirm that exports and calculations preserve the same quality rules shown to an operator.

A conceptual OPC UA client/server path. Application certificates establish application trust; user authorization controls what a connected user may do.
A conceptual OPC UA client/server path. Application certificates establish application trust; user authorization controls what a connected user may do. View full size

Continue the engineering work

Use the related technical library for deeper background, or follow an ASP project guide to plan the implementation sequence.

Primary references and further reading

Use the original specifications and product documentation for implementation details. The examples in this guide are illustrative engineering scenarios, not published project results.

Use this guide in context. Examples are engineering starting points. Confirm device documentation, site requirements, and acceptance criteria before implementation. How this library is maintained · Suggest a correction

FROM REFERENCE TO REAL PROJECT

Bring your next automation challenge.

PLC and DCS engineering, OPC connectivity, and digital transformation. Start with your installed systems, your constraints, and what you need to achieve.

Talk to ASP OTOMASYON