MES PLC Tag Mapping: Data Contracts Between Machines and MES
Define what each machine signal means, how it becomes a manufacturing record, and who controls the contract throughout its lifecycle.

On this page · 11 sections
- 1What MES PLC Tag Mapping defines—and what it does not
- 2Name signals without confusing identity with meaning
- 3Specify types, units, scaling, and manufacturing context
- 4Choose acquisition and acknowledgement semantics
- 5Preserve event time and recover without duplicating records
- 6Map U.S. obligations without making them universal
- 7Control mapping versions and their effective use
- 8Verify the complete tag-to-record path
- 9Assign ownership for exceptions and access
- 10Diagnose failures that look like valid data
- 11Review the evidence before activating a mapping
How does MES PLC Tag Mapping apply to your shop floor?
Pick your industry and scale — Ask V5 rewrites the definition in your context, gives a worked example, and shows what V5 does on day one.
01What MES PLC Tag Mapping defines—and what it does not
MES PLC Tag Mapping is the definition and controlled maintenance of a data contract between PLC variables and MES record fields, including meaning, units, transformations, timing, quality, and ownership.
A PLC is a programmable logic controller; an MES is a manufacturing execution system. A machine variable can change continuously, while a manufacturing record captures an observation in context. The contract determines which observation becomes which field, under which interpretation. For example, a vessel temperature reading becomes meaningful in a batch record only when its source, unit, observation time, and relevant manufacturing step are understood.
| Activity | Primary output | Boundary |
|---|---|---|
| MES PLC Tag Mapping | Versioned source-to-record contract | Not merely a connection |
| Tag naming | Identifiable signal names | Not complete semantics |
| Protocol configuration | Message exchange | Not record meaning |
| Historian collection | Time-series observations | Not necessarily batch association |
| MES contextualization | Manufacturing associations | Not a substitute for source interpretation |
Start with the intended record use: operator awareness, process trending, or evidence within a batch execution history. Then identify the observations needed to support that use. Do not assume that every PLC variable belongs in a manufacturing record or is a regulated record merely because MES can read it. These are practical engineering distinctions, not statutory definitions.
Successful delivery means a value can be interpreted and traced—not simply that a network read succeeded. An incomplete contract can deliver a plausible number into the wrong field, associate it with the wrong operation, or leave its meaning ambiguous after a machine change. Define success at the destination record, rather than at the communications interface.
02Name signals without confusing identity with meaning
Use a site-defined naming grammar for navigation, not as the signal’s sole identity. For example, SITE1.LINE2.MIXER03.TEMP_PV identifies site SITE1, production line LINE2, equipment MIXER03, and temperature process value TEMP_PV. This is an illustrative engineering convention, not an ISA requirement or universal naming standard.
| Identity field | Purpose |
|---|---|
| source_system_id | Identifies the originating system namespace. |
| controller_id | Distinguishes controllers within that source system. |
| tag_id | Provides a stable signal identifier within a documented scope. |
| symbolic_name | Stores the readable PLC symbol used by engineers. |
| source_address | Stores the physical or logical location used to access the signal. |
| description | Explains the signal’s physical or operational meaning for people. |
For machine data acquisition, resolve signals using the documented identity fields together. Two controllers can expose the same symbolic name; a readable name alone should not distinguish them. Keep addresses separate so an address change is not mistaken for a new measurement meaning.
Assign each signal a role: measured value, setpoint, operating state, event indicator, counter, or command response. Record whether it is read-only or belongs to a separately designed command interface. A setpoint associated with a site recipe is not, merely by its name, permission for MES to write it.
Include source_semantics_owner, destination_record_owner, and interface_implementation_owner fields. These identify responsibility for what the PLC signal means, what the MES record represents, and how the mapping is implemented.
An alias can retain a familiar display label after equipment replacement, but keep its resolved source identity visible. Preserve the previous association rather than letting an unchanged label conceal a different controller or signal.
03Specify types, units, scaling, and manufacturing context
Treat each mapping as a typed contract, not merely an address paired with an MES field. The following is an illustrative engineering design, not a regulatory prescription. Define these elements before interpreting an observation:
| Contract element | What to specify |
|---|---|
| Raw representation | Storage type, signedness, bit width and, when decoding bytes or registers, byte order and word order. |
| Engineering representation | Destination numeric type, source unit, destination unit, scaling expression, offsets and rounding policy. |
| Conversion domain | Valid raw range and any reserved codes; distinguish representable storage values from convertible observations. |
| Enumeration dictionary | For discrete signals, each code and meaning, dictionary version, and treatment of unmapped codes; mark not applicable for continuous signals. |
| Missing-value behavior | Define absent, null and sentinel handling. Specify whether to reject, quarantine or retain a flagged observation; do not silently substitute zero. |
Worked conversion: counts to temperature
Assume an unsigned 16-bit integer signal, a configured conversion domain of 0–32,000 counts representing 0–160 °C, zero offset and no other correction. The source unit is counts; the destination unit is °C. Use a decimal engineering value, rounded once to the nearest 0.1 °C, with ties to even. At 14,800 counts: temperature = 14,800 × 160 ÷ 32,000 = 74.0 °C. Retain the raw observation, conversion version, engineering value and unit as traceable components.
A raw value of 32,767 counts fits unsigned 16-bit storage but falls outside this configured conversion domain. Apply the contract’s exception policy rather than inventing a temperature. The mapping’s valid representation range is not a product acceptance limit; product acceptance is a separate assessment.
Quality and manufacturing association
Keep source_quality—the status accompanying the source observation—separate from freshness derived from observation time, assessment time and a defined age rule. A plausible number alone does not establish usability. If classifying an observation as invalid, unknown or unsuitable for its intended use, preserve the source status, relevant timestamps, rule version and reason. These are project-defined categories, not universal protocol status names.
Structure the accompanying data model into observation fields, conversion fields and context fields. Attach equipment_id for the machine, batch_id for the manufacturing batch, operation_id for the process step, and the applicable mapping version. This production context association is MES interpretation, not the observed value itself. Preserve the association basis; unresolved context should remain explicit rather than defaulting to whichever batch is currently active.
Tag Definition
Identifies the source signal and representation.
- tag_id
- source_system_id
- plc_program_version
- address
- raw_type
- source_unit
Mapping Version
Defines conversion into the destination field.
- mapping_id
- mapping_version
- target_field
- scale_expression
- effective_from
- change_id
Captured sample
Preserves observations, timing, and source quality.
- sample_id
- tag_id
- raw_value
- source_timestamp
- received_timestamp
- source_quality
Contextualized Value
Connects the sample to manufacturing context.
- record_id
- sample_id
- mapping_version
- engineering_value
- engineering_unit
- batch_id
- operation_id
Verification Evidence
Connects results and decisions to the baseline.
- test_id
- mapping_id
- mapping_version
- expected_result
- actual_result
- review_decision
04Choose acquisition and acknowledgement semantics
Choose a machine data acquisition pattern for the intended record use. These are engineering choices, not regulatory categories:
- Periodic reads sample current state. A signal that turns on and off between reads can leave both samples unchanged; polling alone cannot establish that the transition occurred.
- Change-driven observations report detected changes. Specify detection location, filtering and deadbands so consumers know which changes produce observations.
- Explicit machine events represent occurrences such as cycle completion. Define event identity, trigger, payload, sequence, manufacturing context and delivery behavior—not merely a value and destination address.
Draw the logical boundary: PLC → interface service or middleware → MES, with an optional historian branch or intermediate store. For MES–historian integration, identify whether MES consumes stored history or the live stream. Assign scaling, unit conversion, context attachment and destination-field mapping to named components. Give each transformation one owner; avoid converting or relabelling the same quantity independently at several layers.
Distinguish four outcomes: transport receipt, successful parsing, destination-record persistence and downstream business acceptance. Define exactly which outcome each acknowledgement confirms. A receipt must not imply a saved MES record, and persistence must not imply business approval. Specify timeout behavior and what the sender may retry. For repeatable delivery, retain the same message identity and define duplicate handling before allowing retries after an ambiguous response.
In Part 11 terminology, 21 CFR 11.3(b)(9) defines an open system by whether system access is outside the control of those responsible for electronic-record content. Assess that access responsibility; do not substitute a protocol name or network location for the assessment.
05Preserve event time and recover without duplicating records
As engineering practice, keep three timestamps distinct: source timestamp—when the machine says the observation occurred; interface receipt timestamp—when the acquisition layer received it; MES persistence timestamp—when the destination stored it. Record each clock’s reference, synchronization method, and uncertainty or known limitations. Use clock drift monitoring to expose disagreement rather than silently correcting historical times.
FDA Part 11 Scope and Application guidance, footnote 5 advises implementing timestamps with a clear understanding of the time-zone reference used. This is time-zone advice, not a PLC-specific timestamp mandate.
Specify whether ordering uses timestamps, sequence numbers, or both, and within which stream. Receipt order does not necessarily reproduce machine-event order. An illustrative replay identity is (source_system_id, boot_id, sequence_number): change boot_id on restart before sequence numbers are reused. Compare repeated identities for conflicting payloads; matching identity alone should not conceal changed values.
- Define freshness from observation age, with a stated allowance for clock uncertainty. Treat replayed observations as historical, not automatically current.
- Document clock-disagreement limits, late-arrival handling, buffer capacity, and the action at buffer exhaustion. Choose thresholds for the intended use; these are not universal regulatory numbers.
- Reconcile missing sequence ranges against source or buffer records. Route observations that cannot be safely contextualized to an exception queue for assigned review; preserve unresolved gaps rather than silently filling missing values.
Worked case: a bounded outage
Assume uninterrupted sampling twice per second during a 90-second communications outage, including the interval’s starting sample but excluding its endpoint. The expected population is 2 × 90 = 180 samples. If recovery delivers 200 messages containing 20 identified duplicate messages, the result is 200 − 20 = 180 unique samples.
Count reconciliation alone does not prove value, sequence, or context accuracy. Compare identities with the expected sequence range, inspect payloads and batch association, and record late arrivals and unresolved exceptions in the process event log.
06Map U.S. obligations without making them universal
This article maps the cited U.S. provisions and FDA guidance, not every manufacturing jurisdiction or product regime. Before assigning obligations to a PLC tag stream, establish the applicable product rules and intended record use. As an implementation practice, assess the destination record and its purpose rather than treating every machine signal as having the same regulatory significance.
| Jurisdiction and product context | Source and status | Relevance to mapping | Scope boundary |
|---|---|---|---|
| U.S. drug-product operations governed by the cited Part 211 provisions | 21 CFR Part 211—binding law | Record changes, accuracy checks, and procedure controls discussed in the following sections | Check the current applicable provisions; do not extend this drug-product discussion to every product. |
| U.S. systems and documentation maintained under Part 11 | 21 CFR 11.1(e)—binding law | Inspection availability | Systems, controls, and attendant documentation maintained under that part |
| FDA interpretation of Part 11 | FDA Part 11 Scope and Application—guidance | Interpretation and stated enforcement policy | Policy applies only as explained in the guidance. |
| Supplements, food, devices, chemicals, and non-U.S. operations | Separate product and jurisdiction assessment | Identify applicable rules before allocating mapping controls. | Do not import drug-product provisions as a universal framework. |
Inspection availability has a defined scope
Under 21 CFR 11.1(e), computer systems, including hardware and software, controls, and attendant documentation maintained under Part 11 must be readily available for, and subject to, FDA inspection. Keep that scope attached to the obligation when assessing mapping documentation. The broader 21 CFR Part 11 overview and Part 211 reference provide separate contexts for this assessment.
Guidance is not a repeal
FDA guidance, section I, states that guidance documents do not establish legally enforceable responsibilities. It describes FDA’s intent not to take enforcement action to enforce Part 11 requirements for validation, audit trails, record retention, and record copying, as explained in the guidance. Both limitations matter: Part 11 remains in effect, and enforcement discretion applies only as identified in that guidance; records must still be maintained or submitted in accordance with underlying predicate rules.
A practical applicability worksheet can identify the product, jurisdiction, destination record, intended use, applicable rule, and responsible reviewer. Use it to distinguish legal obligations from recommended mapping controls—not to create additional legal requirements or presume an exemption.
07Control mapping versions and their effective use
For drug-product operations subject to Part 211, 21 CFR 211.68(b) requires controls over computer or related systems so changes in master production and control records or other records are instituted only by authorized personnel.
For production and process-control written procedures, 21 CFR 211.100(a) assigns drafting, review, and approval to the appropriate organizational units, and review and approval to the quality control unit. This is not an identical statutory approval route for every tag edit. Use change control to identify which records and procedures a proposed edit affects.
Worked case 3: the number stays, the meaning changes
Assume controller program A defines dimensionless state code 2 as Running; program B defines 2 as Paused. A successful numeric read cannot distinguish those meanings. The following lifecycle is an engineering recommendation, not a prescribed regulatory checklist:
- Request the change: identify the controller, tag, old and proposed enumerations, reason, and owner. Define compatible baselines A/mapping-A and B/mapping-B.
- Assess impact: identify state observations, duration calculations, reports, and affected electronic batch records. Preserve each historical observation’s original interpretation rather than silently relabeling it under mapping-B.
- Collect test evidence: retain the program and mapping identifiers, injected code, expected label, recorded result, and pass/fail decision. Demonstrate both compatible pairs and rejection or flagging of mismatched pairs.
- Authorize activation: have designated personnel approve the baseline and record its effective boundary, such as a controlled stop/restart with a source event sequence. Bind observations to that baseline; receipt time alone should not assign delayed observations to the new mapping.
- Plan exceptions and rollback: flag observations whose version cannot be established and withhold semantic use pending investigation. Restore only a tested compatible program-and-mapping pair; record the rollback boundary without rewriting intervening history.
- Define useIdentify the record purpose and process consequence.
- Assign ownershipName source, record, and interface owners.
- Specify ContractSet units, context, timing, quality, and transformations.
- Approve baselineAgree the version and acceptance criteria.
- Verify pathsChallenge normal values, faults, and recovery.
- Authorize ActivationRecord the human decision and effective version.
- Monitor changesInvestigate exceptions and assess revisions before activation.
08Verify the complete tag-to-record path
Where Part 211 applies, 21 CFR 211.68(b) requires accuracy checks on input to and output from computer or related systems for formulas, records, or data. The degree and frequency of input/output verification must be based on the complexity and reliability of the computer or related system.
For mapping verification, distinguish connector connectivity from semantic correctness: receiving a value does not establish that the resulting MES field represents the intended measurement, unit, equipment, or manufacturing context. Challenge the complete path from source condition to stored destination record.
Use the following selected engineering scenarios—not a test list prescribed by the regulation. Define expected behavior against the approved mapping baseline before execution.
| Scenario | Observable destination check |
|---|---|
| Normal observations | Correct field, value, unit, and context. |
| Configured conversion boundaries | Boundary and out-of-range results match configured behavior. |
| Invalid quality | Record handling follows the defined invalid-quality rule. |
| Absent context | Unassigned observations follow the specified exception route. |
| Restart | Resumed acquisition preserves the defined recovery position. |
| Duplicate replay | Repeated events follow the agreed duplicate-handling rule. |
| Late arrival | Stored time and disposition match the lateness policy. |
| Version transition | Records use the mapping version effective for the test condition. |
Capture test objective, approved baseline, injected or observed source condition, expected destination result, actual result, discrepancy reference, and review decision. Link failures to a CSV deviation report; retain enough detail for a reviewer to reconstruct the comparison rather than relying on a connection-status screenshot.
For decisions about audit trails or other appropriate measures, FDA guidance, section III.C.2, recommends considering predicate-rule requirements, a justified and documented risk assessment, and potential effects on product quality and safety and record integrity. These are guidance recommendations. Connect the resulting control decision to the audit trail review workflow where applicable.
09Assign ownership for exceptions and access
Use an explicit responsibility model for daily operation. The following allocation is illustrative; site procedures should identify accountable people and escalation routes:
- Automation owns source semantics: what each PLC signal represents.
- Manufacturing owns process context: which operation, batch, or equipment state applies.
- MES administration owns destination configuration: where mapped values become records.
- Interface support owns delivery diagnostics: locating transport failures and explaining recovery status.
- Designated reviewers decide whether changes and unresolved record exceptions are acceptable under site procedures.
For an exception handoff, include affected equipment, record identifiers, mapping version, observed symptom, time interval, investigation owner, and disposition. Mark disposition as pending until decided. Link the handoff to the relevant batch execution history so reviewers can locate affected records. Interface support should report restored communications without closing a record-quality issue solely on that basis; restored delivery does not establish the acceptability of earlier records.
For access, use least-privilege permissions, identifiable service accounts with named owners, and controlled configuration deployment. Separate routine observation from configuration changes so diagnosing a fault does not require editing the mapping.
Keep exception acceptance, change approval, and product release with authorized people. Technical status should inform the exception-based review, not stand in for its decision. Record who owns the next action when technical recovery and record disposition remain on separate tracks.
10Diagnose failures that look like valid data
Use this practice-based matrix to isolate plausible causes, not to declare a root cause from a symptom alone. A credible number is not enough to establish that an observation belongs in the intended record.
| Observed symptom | Likely failure mechanism | Isolation check | Responsible handoff |
|---|---|---|---|
| Credible value from the wrong machine | Duplicate symbolic names across controllers | Compare immutable source identity with the mapping baseline | Automation and interface owners |
| Impossible quantity after a deployment | Representation mismatch | Compare raw bytes or raw value with the agreed type | Automation owner |
| Value associated with the neighboring operation | Context changed between separate reads | Reconstruct the context boundary | Manufacturing and MES owners |
| Intermittent historical gaps after recovery | Buffer loss or incomplete replay | Compare expected identities with persisted identities | Interface owner |
| Failures only after configuration restoration | Incompatible restored baseline | Compare controller, mapping, and destination versions | Change owner |
Containment addresses affected observations: flag the suspect population, preserve diagnostic evidence, and prevent unreviewed use in manufacturing decisions. Configuration correction addresses the cause; it does not by itself resolve records already affected. Coordinate their assessment through the relevant MES–QMS workflow.
For remediation, return to the contract sections for identity, representation, or context errors; the recovery section for missing events; and the change-control section for incompatible restored versions. Where history crosses another interface, include the MES–historian boundary in isolation checks. Keep record disposition and configuration correction as separate decisions for authorised owners.
11Review the evidence before activating a mapping
Use this engineering acceptance checklist separately from the source-specific legal requirements above. It is a practical implementation aid, not an exhaustive regulatory review list. The accountable owners below are suggested roles; assign named people locally.
For each artifact, ask: are its version, owner, acceptance status, and unresolved issues identifiable?
| Artifact | Suggested accountable owner |
|---|---|
| Intended-use and scope decision | Process owner |
| Source inventory with stable identities | Automation engineer |
| Approved semantic contract | Process engineer |
| Compatible controller-and-mapping baseline | Automation lead |
| Destination-field and context definition for the batch record | MES record owner |
| Completed verification results | Verification lead |
| Exception and recovery instructions | Operations lead |
| Ownership and access assignments | System owner |
| Activation and rollback record | Authorized activation approver |
Distinguish a missing document reference from a known behavioral defect. Both need a recorded decision, but not necessarily the same response: a reference gap may need reconciliation; incorrect behavior may need correction and retesting before activation. Record the impact, disposition, decision owner, and any conditions on use rather than treating every open item as equivalent.
Can an authorized reviewer trace a selected MES value back to its source observation, interpretation, context, and verification evidence without guessing?
Frequently asked questions
Q.Can one PLC tag populate several MES fields without creating conflicting records?+
Yes—as an interface-design practice, define each destination’s meaning and reuse one identified observation rather than presenting each copy as an independent measurement. Distinguish a live display from a captured process result: specify when each field updates, its units, and whether later readings can replace it. Preserve the source identity and capture event across destinations. A [traceability data model](/glossary/traceability-data-model) should explain these relationships; the [batch execution history](/glossary/batch-execution-history) should distinguish captured results from subsequent corrections.
Q.How should a calculated MES value be mapped when no single PLC tag contains the result?+
Define a derived-value mapping with named inputs, input units, an equation version, output units, rounding rules, and invalid-input handling. Specify whether inputs must represent the same sampling instant or an explicitly defined interval. For example, assuming net mass is 12 kg and volume is 10 L, calculated density is 1.2 kg/L. Retain the input observations alongside the result. Link the calculation to its [density checkpoint](/glossary/density-checkpoint), and define separately how authorised [recalculation](/glossary/recalculation-e-signature) affects previously recorded results.
Q.What should happen when the PLC does not provide a batch identifier?+
Define an explicit context-assignment step outside the PLC, such as an authorised operator confirming the active order against the equipment. Record the assignment’s effective start and end, its origin, and who confirmed it. Keep unassigned observations pending rather than silently attaching them to the latest batch. Design [production context tagging](/glossary/production-context-tagging) around this association, and specify how delayed observations are handled during order changes. An [electronic work instruction](/glossary/electronic-work-instruction) can describe the confirmation and exception steps.
Q.How should a mapping handle shared equipment serving overlapping manufacturing orders?+
Model the equipment-to-order relationship at the resource level that actually distinguishes usage: vessel, channel, transfer route, or connection point. Define whether a reading describes the shared asset or an individual order. For a common utility measurement, identify each order’s association without relabelling the reading as an order-specific measurement. Use a [process event log](/glossary/process-event-log) to capture connection changes. Treat the [production schedule](/glossary/production-schedule-board) as planned context, and confirm actual resource use before assigning observations.
Q.Does reading PLC tags establish a safe contract for writing commands back to the machine?+
No—treat command writing as a separate engineering contract, not an extension of a read mapping. Specify permitted commands, authorised initiators, machine-state prerequisites, value bounds, acknowledgement meaning, timeout behaviour, and recovery after communication loss. Distinguish command receipt from successful execution. Decide how duplicate requests are recognised and which commands must never be retried without a fresh decision. Address machine protection and control authority with the equipment controls team; document the boundary in the [MES and SCADA integration](/glossary/mes-scada-integration) design.
Q.How should a replacement controller be introduced without inheriting the retired controller's identity?+
Keep the enduring equipment identifier separate from the controller-instance identifier. Assign the replacement its own identity and record the cutover event, program version, mapping version, and verification outcome. Preserve the retired identity on historical observations, even if the replacement reuses its network address or tag names. Before accepting production data, test representative values, scaling, status handling, and time behaviour. Manage the transition through [change control](/glossary/change-control), with an authorised decision to activate the replacement and a defined rollback approach.
Q.Which diagnostic or temporary PLC tags belong in the controlled mapping inventory?+
Use downstream influence as the inventory criterion: include diagnostic or temporary tags when their values determine whether production observations are accepted, rejected, transformed, attributed, or presented for a decision. Record each tag’s purpose, owner, consumers, and intended removal condition. For troubleshooting-only tags, document the boundary preventing their use as production evidence. Test what happens when a temporary tag disappears or becomes stale. This keeps the [machine data acquisition](/glossary/machine-data-acquisition) design focused on dependencies rather than tag names alone.
Q.What should an equipment supplier hand over when its PLC program is proprietary?+
Specify an interface handover package in the purchase agreement: exposed tag identifiers, meanings, data types, units, scaling, enumerations, update behaviour, timestamp origin, quality indicators, and access permissions. Request interface version identification, change-notification arrangements, representative test cases, and a contact responsible for resolving ambiguities. Define acceptance tests that exercise the interface without depending on access to internal program logic. Put these deliverables in the [user requirements specification](/glossary/urs), and resolve undocumented behaviour before approving the mapping for production use.
Primary sources
Want to see how MES PLC Tag Mapping could fit into your own records and workflows? Explore the related V5 pages or talk to our team about what applies to your operation.
