To associate a laboratory result with historian process data, identify the sample and sampling location, then retrieve the relevant process records using the actual collection time or collection interval. Keep result release and system arrival times separately. A result arriving at noon may describe material sampled hours earlier; joining it to the noon process values changes the question being answered.
For an integration engineer, the useful deliverable is a traceable association between one accepted laboratory result and a clearly defined slice of process history. Start with one sampling point and one downstream investigation. A connected LIMS interface alone does not establish that the right process conditions accompany each result.
Separate the sample from the result and the process signal
A PI Square discussion about LIMS assay modeling describes a concrete industrial need: users want assay results by sample, production line and batch, with the original sample time retained. That is a data-association task, distinct from making a PI Analysis trigger when two inputs arrive.
Keep three identities explicit: the physical sample, the particular test result, and the historian measurement used for context. A sample can have several analytes or repeat tests. A batch can contain multiple samples. A historian tag can describe equipment without identifying the material sample.
Retain the source-system namespace and sample ID, analyte/test identifier, result revision, unit and accepted status. Preserve the original sample location and collection record. Do not merge results solely because their batch IDs or dates match. If the source supplies only a nominal daily timestamp, label that limitation; midnight is not evidence that collection occurred at midnight.
Choose the time that answers the investigation
| Time | What it describes | Role in the association |
|---|---|---|
| Actual collection time or interval | When material was taken from the process | Selects the process context, subject to the sampling method |
| Analysis time | When the laboratory performed the test | Explains laboratory activity; usually a different process moment |
| Release time | When a result became accepted or available under the source workflow | Determines which result may be used under the consumer’s policy |
| Integration arrival time | When this receiving path obtained the result | Measures that path’s availability and delay |
Oracle’s Process Manufacturing sample documentation distinguishes drawn and received dates and supports sample/source context. It also documents date defaults. A populated field therefore needs its meaning checked against the actual collection record; a default or scheduled time should not silently become an observed collection time.
An industrial refining report hosted by Emerson identifies lab timestamp alignment as a practical data-preparation problem and distinguishes collection from analysis and reporting time. It is a historical example, not evidence of current product behavior or a TDengine deployment.
If the question is what an operator could have known at 11:00, use a separate availability cutoff. A result released later cannot be treated as known at 11:00 merely because its sample time is earlier. Reconstructing that view requires retained release, access and revision history; today’s current result table may be insufficient.
Map the sampling point before selecting a tag
Map the sample location to the measurement that provides useful context. For a concentrate assay, the relevant flow tag might measure the concentrate stream on the identified line, rather than feed flow or a neighboring line. Confirm that choice with the process owner.
Retain the source location, historian/provider, tag, measurement meaning, unit, mapping version and effective interval. Resolve the mapping at collection time, not result arrival. Reused names and changed sampling points need reviewed history; an ambiguous location should produce an association exception.
The broader industrial contextualization article explains asset and semantic relationships. Here, the additional test is whether those relationships identify the material location and process period represented by the laboratory sample.
Work through two results arriving in reverse order
This synthetic example uses one verified sampling point, L1-CONC, mapped throughout the example to H1:L1.CONC.FLOW, in tonnes/hour. Both are grab samples. Collection times and historian times are trustworthy UTC values, and collection health is established. The association rule is deliberately limited: return the latest recorded process value at or before collection, no more than 30 seconds old. Select the record first, then check its quality; do not search past a newer Bad record to find an older Good one.
| Sample | Collected | Accepted result released | Assay result |
|---|---|---|---|
| S42 | 10:00:00 | 12:10:00 | Au 8.2 g/t |
| S43 | 10:15:00 | 11:40:00 | Au 7.9 g/t |
Selected recorded flow data are:
| Historian time | Flow, t/h | Quality |
|---|---|---|
| 09:59:50 | 100 | Good |
| 10:00:05 | 140 | Good |
| 10:14:50 | 110 | Good |
| 10:15:02 | 0 | Bad |
| 11:40:00 | 180 | Good |
| 12:10:00 | 90 | Good |
S42 associates with 100 t/h at 09:59:50, ten seconds before collection. S43 associates with 110 t/h at 10:14:50, also ten seconds before collection. Their release order changes when each result becomes available, not which process record it selects. Joining on release time instead would attach 90 t/h to S42 and 180 t/h to S43.
The two later process records at 10:00:05 and 10:15:02 are outside the example’s backward-only rule. The Bad zero remains visible in the underlying history; it is not evidence that flow was zero at collection. If the selected record were Bad, too old or unavailable, this rule would return an explicit exception.
The 30-second limit is illustrative, not an engineering recommendation. A preceding recorded value is contextual evidence, not a measurement proven simultaneous with sampling. Choose the retrieval method and permitted age for the actual process. For TDengine TSDB implementations, check the ASOF JOIN time-matching rules. Interpolation or a time-window summary may suit another task, but must be labeled and tested under that task’s assumptions.
Do not invent the period represented by a sample
A grab sample and a composite collected over an interval need different context. For an industrial wastewater example, the EPA’s sampling manual distinguishes time- and flow-based composites; the applicable sampling plan defines the actual method. Preserve a composite’s actual collection interval and sampling method. Do not assume it represents the time since the previous result or that a simple historian average reproduces its physical weighting.
Likewise, matching a downstream sample to upstream operating conditions may require a separately established residence-time relationship. A common timestamp does not prove that the measurements describe the same material parcel. If that relationship is unknown, retain the local sampling context and flag the proposed upstream association as unvalidated.
For time-series representations, inspect interpolation settings. Seeq’s SQL Connector documentation distinguishes signal time/value queries from interval-based conditions and exposes interpolation configuration. That demonstrates a representation choice, not a guarantee that connecting two sources automatically gives them the correct physical relationship.
Verify one association before expanding
Give the laboratory and process owners a record showing the sample/test/revision, original collection evidence, approved status, location mapping, selected historian record or window, quality, retrieval rule and any time offset. Include the original process-record time rather than presenting an aligned display time as a new measurement.
Test reversed result arrival, multiple samples in one batch, an unavailable or Bad process value, an uncertain collection time and a changed sampling-point mapping. A retest must remain linked to the same physical sample when appropriate, without silently replacing its audit history. Correction propagation is a separate integration responsibility.
Acceptance means the result can be traced to the intended sample and a defensible process context, with uncertainty visible. This association procedure does not change PI Analysis triggering, validate a laboratory method or establish that a process condition caused the assay result.


