A batch record can identify what was produced and when. A historian can show how temperature, pressure, and flow changed. Connecting the two requires more than joining on a batch ID: the measurement may belong to a different vessel, a shared utility, or a time window that does not line up neatly with the MES record.
For an integration engineer, the first useful deliverable is a repeatable way to retrieve the right process history for one batch, with enough context for a reviewer to understand what is missing or uncertain.
Start with one question and one source of each fact
Suppose a quality engineer wants to inspect reactor temperature during the heating phase of batch B-204. Agree on which system owns each piece of information before building the integration:
| Information | Candidate source | Question to settle |
|---|---|---|
| Batch and phase boundaries | MES or batch execution system | Are timestamps actual execution times, planned times, or later corrections? |
| Equipment assignment | MES equipment record and asset mapping | Which physical reactor and which historical identifier were in use? |
| Temperature history | Historian | Which tag and retrieval mode represent the required measurement? |
| Measurement context | Historian metadata and engineering records | Which unit, status, instrument and mapping version apply? |
Ownership is a site decision. An MES may not hold every phase boundary, and a historian tag name alone may not identify a vessel reliably. Document exceptions rather than treating the table as a universal system design.
A reproducible batch-to-history association
The following fictional dataset illustrates an association rule. It is not an ISA-mandated schema or an actual customer system. All timestamps are UTC. For simplicity, the historian is assumed to return the listed archived values without interpolation, and the MES phase interval uses an inclusive start and exclusive end.
MES phase record
| Batch | Phase | Equipment ID | Actual start | Actual end |
|---|---|---|---|---|
| B-204 | Heating | R-101 | 10:00 | 10:40 |
Approved equipment-to-signal mapping, version M1
| MES equipment | Historian | Tag | Meaning and unit | Mapping valid from | Mapping valid until |
|---|---|---|---|---|---|
| R-101 | H1 | R101.TEMP | Reactor temperature, °C | 09:00 | 12:00 |
| R-102 | H1 | R102.TEMP | Reactor temperature, °C | 09:00 | 12:00 |
Archived historian records
| Tag | Time | Value | Status |
|---|---|---|---|
| R101.TEMP | 09:59 | 50 | Good |
| R101.TEMP | 10:00 | 51 | Good |
| R101.TEMP | 10:15 | 65 | Good |
| R102.TEMP | 10:15 | 82 | Good |
| R101.TEMP | 10:25 | 0 | Bad |
| R101.TEMP | 10:40 | 70 | Good |
Rule: select the MES phase, resolve exactly one mapping valid for the equipment and relevant time, retrieve records for the mapped source and tag in [10:00, 10:40), and retain status. Under that rule the associated result is B-204 / Heating / R-101 / H1:R101.TEMP: 10:00 = 51 °C Good; 10:15 = 65 °C Good; 10:25 = 0 °C Bad. The 09:59 record is outside the interval; 10:40 is excluded by the selected boundary rule; R102.TEMP is another reactor. The bad value remains visible as bad, not interpreted as a measured zero. If a display needs a bounding point, show 09:59 separately and label it outside the phase.
Exception: suppose a second approved mapping also claims R-101 for the same measurement from 10:20 to 11:00. Two mappings now overlap at 10:25. Do not choose one by sort order or silently combine them. Mark that portion mapping ambiguous, withhold an unambiguous association, notify the mapping owner, and retain the source rows for investigation. Once corrected, rerun using the approved mapping version and keep the earlier result and reason for revision according to the site’s record policy. A missing mapping, unknown status or late MES correction likewise needs an explicit exception, not an invented value.
This example shows a possible association procedure, not a requirement that a particular MES or historian has these fields or automatically joins them. ISA-95’s enterprise-control integration overview describes the manufacturing operations context. The OPC Foundation ISA-95 model summary describes equipment and other information exchanged among manufacturing systems. Neither specifies this exact schema or interval algorithm; those are the illustrative integration design above.
Build a time-aware equipment mapping
Create a mapping between the MES equipment identifier and historian source references. At minimum capture the site, equipment ID, historian and tag identifier, measurement meaning, unit, effective start and end, owner, and mapping version. Include the source of the mapping and who checked it. When referencing these measurements in TDengine IDMP, consult its metric attribute bindings.
Effective dates matter. If a sensor is replaced or a tag is repurposed, the mapping valid today may not describe a batch from six months ago. Keep the previous mapping available for historical retrieval; if the effective date is uncertain, flag affected results for review rather than silently applying the new mapping to all history.
Shared signals need explicit treatment. A steam header temperature may support the investigation but is not a reactor-specific measurement. Label the relationship and do not attribute a shared measurement to one batch as if it were exclusive to it.
Define the interval before querying
For B-204, suppose the MES records heating from 10:00 to 10:40 UTC. A consistent convention is a half-open interval, [10:00, 10:40): a point at 10:00 belongs to this phase, while one at 10:40 is outside this phase and belongs to the next phase only if that phase starts at 10:40. The actual historian API may use different endpoint rules. Test its behavior and adapt the query; do not assume every system implements this convention.
Keep the original timestamps and time-zone information alongside the normalized time. If the MES records local time, resolve daylight-saving ambiguity using the source’s offset or other reliable evidence. An unresolved ambiguous time should remain an exception, not a guessed timestamp.
For trends, a reviewer may need the last valid point before the window to understand the starting state. If requested, label it as a bounding point outside the phase; do not silently count it as an in-phase observation.
Preserve the meaning of the returned values
Specify whether the consumer needs recorded values, values interpolated at fixed intervals, or an aggregate. These are different products. A smooth, evenly spaced curve is not proof that the source recorded a measurement at each displayed time. Preserve quality or status information when available and make missing, bad, or uncertain intervals visible.
If the MES phase end arrives late or is corrected later, decide whether a previously produced extract is superseded, recalculated, or retained as an earlier version. Record the source revision and extraction time. A historical correction in one system does not automatically update every downstream copy; verify the connector and business process.
Test the link with known batches
Choose a normal completed batch, one with an equipment change or shared utility, and one with a known data interruption. With an MES owner and historian engineer, compare the batch identifier, equipment, boundary times, source tags, units and status against the source screens or approved records. Test a point at each boundary and an intentionally missing mapping.
For each test, record expected and actual results, evidence, reviewer, and resolution. A successful API response is only a connectivity check. Acceptance means the right history is attached to the right batch, exceptions are visible, and a reviewer can trace the result back to its source.
The level of documentation and validation depends on intended use. A troubleshooting view and a record used in a regulated quality decision can require different controls; the site remains responsible for its own validation.
References
- Historian Integration Pattern for Factory Intelligence Systems, Open Factory Initiative: mapping, context, and validation considerations.
- OPC UA Historical Access concepts, OPC Foundation: history, timestamps, interruptions, and modifications for implementations of the specification.
- TSDB for MES Integration in Smart Manufacturing: related background on MES time-series needs.


