IMD SolutionComputing LibraryShop main store

Explainer

Historian write timestamp: what the TVQ time proves in an audit

Edge computing and IIoT Published 7 min read

Short answer

No per-record write timestamp exists in the common historian storage model: each value carries only the source-derived TVQ timestamp, and the sole extra time record is the session-level connection event between the sending and receiving components. Keep the TVQ time as measurement time and capture a separate, correlated receipt or commit record at the component whose event your audit must prove.

On this page
  1. The TVQ timestamp is measurement time
  2. The session event is the only extra time record
  3. Match each audit question to its record
  4. Worked example: reading a 7 s gap against a 7 s clock offset
  5. Build the audit record without touching the TVQ
  6. What the screen can and cannot prove
  7. Prove the path with one test measurement
  8. Questions asked

No, there is no second timestamp: the historian stores each value with the timestamp, value and quality (TVQ) supplied by the data source, and the only additional time it records is the session-level event of a sending component connecting with a receiving component. Nothing in the record marks when that individual value reached storage. For an audit that is workable, but only once you stop searching the record for a storage time: keep the TVQ time as proof of when the measurement happened, and capture a separate, correlated receipt or commit record at the component whose event the audit question actually names.

The TVQ timestamp is measurement time #

TVQ stands for timestamp, value and quality, and the timestamp belongs to the measurement event, assigned by whatever clock sits at the data source: a controller, an I/O server or an interface device. It is not the time the historian received the value, committed it, or made it visible to a query.

A trend therefore plots a value at its source time even when buffering delivered it much later. That is deliberate: it preserves the process timeline. The storage timeline is a different timeline, and the record does not carry it. The storage format makes the absence plain: PI3 timestamps count the seconds elapsed since 1 Jan 1970 UTC, one absolute instant per sample, with no separate field beside it for ingestion time.

The event time is also correctable by design. PI administrators have a documented function to correct archive event timestamps for a period that ran on a wrong clock. A field an administrative operation can rewrite after the fact can serve as measurement evidence, but never as evidence that storage happened at that moment.

The session event is the only extra time record #

In the archiving model this question usually comes from, the one additional time record is the connection of the Sender with the Receiver: the component delivering data and the component archiving it. That event happens once per session and covers every tag and record the session carries.

A session can carry an outage-length block of buffered records, so stamping each record with the session's connection time would manufacture a per-record timeline the system never observed. The session record answers exactly one question: was a transfer path established between these two components during this window? It says nothing about any individual value.

Acceptance and storage are distinct events as well. Before treating any successful send as a completed write, confirm from the documentation what the acknowledgment actually means: receipt by the receiving component, or durable storage.

Match each audit question to its record #

An audit fails when it asks one question and keeps evidence for a nearby different event. Define the question first, then pick the record that measures that event.

Audit question Record that answers it Decision
When did the measurement occur? The source-derived TVQ timestamp in the stored record Use it, and label it measurement time in the report
Was a transfer path established? The Sender-to-Receiver session connection event Use it for session scope only, never per record
When did our side receive the value? A receipt record captured at the collector, correlated to the TVQ Capture it, label it receipt, keep it outside the historian record
When was the record committed to storage? A documented per-record completion event from the storage interface Audit it only where the historian documents that event; otherwise scope the audit to receipt
When did a user see the value? The client's retrieval time Record it as viewing time; it qualifies the display, not the data

Where a platform does expose a server-side marker, read it precisely: a receipt timestamp is still not a value timestamp, a distinction worked through in why a PI value timestamp is not a receipt time. The decision rule for the table: name one event per audit line, and keep the record that measures that exact event.

Worked example: reading a 7 s gap against a 7 s clock offset #

An audit test on a live path, built on the documented clock-offset example from the historian time-synchronization guidance.

Inputs #

  • The test measurement's TVQ timestamp, assigned by the I/O Server computer's clock at the moment of measurement: the time the historian stores, unchanged.
  • The receipt record captured at the collector on the historian-side clock: the audit record this article has you build.
  • The clock offset between those two clocks, from the time-synchronization documentation for data acquisition: the example in which the Historian clock runs 7 s ahead of the I/O Server computer's clock, and the SuiteLink interface adds 7 s to every timestamp to compensate.
  • The separation observed in the audit test: receipt record minus source-assigned timestamp = 7 s.

Rule #

Receipt time minus source time equals the clock offset between the two stamping clocks plus the true acquisition and transport delay. The two timestamps alone cannot tell the parts apart.

Arithmetic #

separation = clock offset + acquisition and transport delay
7 s = 7 s + delay
delay = 7 s - 7 s = 0 s

Result #

The full 7 s separation is clock offset and the transport portion is zero. The receipt record still earns its place, because it proves the test measurement was delivered and gives the auditor a correlation anchor, but reading that gap as write latency would be false.

Decision #

Subtract the measured offset from every receipt-minus-source figure before calling anything delay. Above the offset, the excess is genuine acquisition or transport time and belongs in the audit as delay; at or below it, the clocks explain the gap and the receipt record stands as proof of delivery, not of latency.

Build the audit record without touching the TVQ #

  • Pick the capture point that matches the audit question: the source's exit, the collector's receipt, or confirmed storage completion. Application-side logging proves receipt or submission; historian-side instrumentation is the only choice for proving a storage event, and only where its event semantics match the requirement.
  • Leave the historian record alone: tag identity, source timestamp, value and quality stay exactly as delivered.
  • Give the record a correlation identifier that travels with it from capture through delivery, and write that identifier into the audit line. Tag name plus timestamp cannot distinguish a retry, or two records sharing a timestamp.
  • Write the audit event's own time and the identity of the component that generated it into every line, and name the event for what it is (received at collector, session opened), never as a write.
  • Define up front how retries, duplicates, rejections and delivery failures appear in the audit log.
  • Give the audit store controlled access, retention that covers the whole audit period, and offset monitoring against the same time reference as the source clocks.

The build passes when one test measurement can be matched unambiguously to its audit line without any source timestamp being replaced or relabeled.

What the screen can and cannot prove #

Renaming the TVQ field on a screen to write time changes a label, not the evidence; adding the client's current clock produces a viewing timestamp. Neither is a storage event, and an auditor will ask which one the screen shows.

Separate display faults from data faults before changing anything. If the underlying query result is right and the screen differs, fix the binding or the time formatting. If the underlying TVQ itself is wrong, the fault sits at the source clock, the driver's timestamp handling or the quality; for a stored value sitting hours from reality, the UTC offset is the first check, as covered in historian value hours off: check the UTC offset.

Prove the path with one test measurement #

Run two tests, because normal delivery and delayed delivery fail differently.

  • Generate one identifiable test measurement and record its source TVQ.
  • Send it through the normal path, retrieve it from the historian, and compare tag identity, timestamp, value and quality against what was sent.
  • Repeat with delivery delayed, through the store-and-forward path whose outage behavior is covered in MQTT store and forward backfill after a connection outage. The historian must keep the original measurement time; the receipt line in the audit log is what shows the value arrived late, and that difference is the evidence that buffering occurred.
  • Match each test to its audit line by the correlation identifier, then read the separation by the worked-example rule: offset first, residual second.

The audit path is proven when both tests match unambiguously, the delayed test shows late receipt in the audit log, and the stored timestamp never moved.

Questions asked

Does any historian expose a per-record storage time?

A few interfaces expose more than the event time. The PI AF SDK, for instance, returns a server receipt timestamp alongside a value, and that marker is still a receipt, not proof of a durable commit. Before an audit promises a commit time, confirm from the historian's documented interface which event it actually reports, and write that event's name into the audit scope.

What should the audit report say when no commit time exists?

State the limitation as a scope line, not an apology: name the events that are recorded (measurement time from the source, receipt at the collector, session establishment between components), name the event that is not recorded (per-record commit), and attach the correlated receipt log as the delivery evidence. An auditor can test a precisely scoped claim; a relabeled measurement time presented as storage evidence fails the first question.

How do retries appear in the audit log?

Give every acquisition attempt its own audit line carrying the same correlation identifier and its own outcome, so one stored value that needed two attempts shows two lines against a single TVQ record. Tag name plus timestamp cannot distinguish a retry from a duplicate, which is exactly the confusion an auditor will probe first.

How long should the audit records be kept?

As long as the audit question can reach back, and never shorter than the historian retention covering the values they qualify: an audit line that outlives its data proves nothing, and data that outlives its receipt proof drops back to measurement-time-only evidence. Set the retention in the audit requirement itself, then verify both stores against it in every audit path test.

Keep reading

  • Explainer

    Why a PI value timestamp is not a receipt time

    No, an AFDataPipe event carries one timestamp — the value's event time, assigned by whatever wrote it — and the PI Data Archive exposes no per-value server receipt time. A sync over a one-way diode therefore restarts from the earlier of the two readers' last sent timestamps minus an overlap margin, journals every event locally before sending, and reconciles archives on a schedule. Treat 0% data loss as a requirement you validate, not something AFDataPipe guarantees.

    Edge computing and IIoT

  • Explainer

    Why Historian replaces a client-set ReceivedTime

    Yes, it is expected: Historian assigns ReceivedTime itself, as a UTC receipt stamp, when the server accepts the event, and no option preserves a client value. EventTime is the field your application owns — set it to the occurrence time, drop the ReceivedTime assignment, and carry any third timestamp as a custom property.

    Edge computing and IIoT

  • Explainer

    What decides time correlation in multi-device test data logging

    At roughly 1 Hz sampling, host receipt timestamps correlate camera frames, serial commands and thermocouple readings well enough for any skew budget of 100 milliseconds or wider. The budget itself is the deciding input. Only tolerances tighter than your measured transaction and transfer delays force a shared clock.

    Edge computing and IIoT