MES Integration with Automation Systems — A Practical Approach

Manufacturing Execution Systems (MES) bridge the gap between enterprise resource planning (ERP) and shop-floor control systems. Successful MES integration requires careful design of data interfaces, process workflows, and exception handling between the MES platform and the underlying automation layer (PLCs, DCS, SCADA).


ISA-95 Functional Hierarchy (Levels 0–4)

The ISA-95 / IEC 62264 standard defines a functional hierarchy that structures manufacturing operations into levels. The boundary between Level 2 (Control) and Level 3 (MES / Manufacturing Operations Management) is the most critical interface for integration:

  • Level 0 — Physical process: sensors, actuators, pumps, valves, motors.
  • Level 1 — Sensing and manipulating: I/O devices, transmitters, final control elements.
  • Level 2 — Control: PLCs, DCS controllers, RTUs, PACs. Executes regulatory and sequential control logic directly on the process.
  • Level 3 — Manufacturing Operations Management: MES, batch management, laboratory information management (LIMS), warehouse management (WMS). Coordinates production execution, tracks materials and work orders, and collects production data.
  • Level 4 — Business Planning and Logistics: ERP, supply chain management (SCM), customer relationship management (CRM). Sets production targets and receives production results.

The Level 2–3 boundary is characterised by a time horizon shift: control systems operate in milliseconds to seconds, while MES operates in seconds to hours. The integration must handle this temporal gap through buffering, decimation, and event-based data exchange.

MES-to-Automation Communication Patterns

OPC DA / HDA for Real-Time and Historical Data

OPC Data Access (DA) provides real-time read/write access to automation tags. MES uses OPC DA to read production counters, machine states, and process values, and to write commands or recipe parameters. OPC Historical Data Access (HDA) retrieves archived data for OEE calculation, trend analysis, and batch genealogy.

OPC UA for Structured Data Exchange

Modern MES integrations use OPC UA to exchange structured information beyond simple tag values. The ISA-95 companion specification for OPC UA models equipment, material, and personnel as OPC UA objects. This enables an MES to query "which equipment is in production?" or "what material is loaded in Unit 3?" through standardised Browse operations.

B2MML (Business to Manufacturing Markup Language)

B2MML is an XML implementation of the ISA-95 information models. It defines standard schemas for exchanging production schedules, production performance, material definitions, and maintenance information between Level 3 and Level 4 systems. B2MML messages can be transmitted via web services, message queues, or file transfer.

REST APIs and Web Services

For lightweight, service-oriented integrations, REST APIs allow MES modules to query and command automation systems over HTTP. This pattern is common when integrating MES with modern cloud-based analytics platforms. The API typically exposes endpoints for current production status, batch records, and machine parameters.

Recipe Management Integration

Recipe management is one of the most important MES-to-automation functions, particularly in batch and discrete manufacturing. The workflow follows the ISA-88 recipe model:

  1. Recipe creation: A process engineer defines a Master Recipe in the MES (ingredients, process parameters, equipment requirements, steps).
  2. Recipe download: The MES sends the Control Recipe (site-specific version) to the DCS or PLC via OPC UA write operations or B2MML messages. Parameters include setpoints, time durations, temperature profiles, and material quantities.
  3. Recipe execution: The automation system executes the recipe, raising events at each phase transition (e.g., "Charging Complete," "Reaction Phase Started").
  4. Batch data collection: The MES collects actual process values, timestamps, and equipment states to build the Electronic Batch Record (EBR).

Best practice is to keep recipe execution logic in the automation layer (where deterministic control is guaranteed) and recipe management in the MES (where flexibility and version control are needed).

Production Tracking and Material Genealogy

MES tracks production at the unit level: which unit produced what, when, from which materials, and under which conditions. Key tracking mechanisms include:

  • Unit dispatch: MES assigns a production order to a specific unit or line. The unit confirms readiness, and production begins.
  • Material tracking: Barcode or RFID scans at each production step feed material consumption data to the MES. The MES maintains a lot genealogy that traces each finished good back to its raw material lots.
  • Lot genealogy: When a quality issue is detected, the MES can perform a forward trace (which products contain a suspect material lot?) and backward trace (which lots contributed to a specific finished product?). This capability is essential for regulatory compliance in pharmaceutical, food, and aerospace industries.

OEE and KPI Calculation from Automation Data

Overall Equipment Effectiveness (OEE) is calculated as Availability × Performance × Quality. The MES derives each component from automation data:

  • Availability = (Operating Time / Planned Production Time). Machine states (Running, Idle, Downtime) come from PLC/DCS status words.
  • Performance = (Actual Production Rate / Ideal Rate). Counts and cycle times are read from production counters.
  • Quality = (Good Count / Total Count). Quality counts may come from inline inspection systems or LIMS.

By integrating OPC DA/HDA for state and count data, LIMS for quality data, and MES for production targets, the OEE calculation is fully automated and available in real-time dashboards.

Exception Handling — Buffered Production Mode

When the MES becomes unreachable (network outage, server maintenance, unplanned downtime), the automation layer must continue production safely. The buffered production pattern addresses this:

  • The DCS or PLC stores production events (batch completions, quality results, material consumptions) in a local FIFO buffer.
  • When MES connectivity is restored, the automation replays buffered events in sequence to the MES.
  • The MES reconciles the buffered data with its own records, handling duplicates via idempotency keys (e.g., sequence numbers or batch IDs).

This pattern ensures that production is never interrupted by an MES outage. The buffer size must be sized for the maximum expected outage duration and production rate. For typical deployments, a buffer capable of holding 24–48 hours of events is recommended.

ASP OTOMASYON A.Ş. and its subsidiaries OPCTurkey and ASP Dijital provide end-to-end industrial engineering solutions for process automation, data operations and AI.


References & Further Reading

  1. ISA-95 / IEC 62264 — Enterprise-Control System Integration — International standard defining the functional hierarchy, information flows, and integration patterns between MES and automation systems across all manufacturing levels.
  2. OPC UA Companion Specification for ISA-95 — Official OPC Foundation companion specification implementing ISA-95 information models in OPC UA address space for standardised MES-to-automation integration.
  3. ISA-88 / IEC 61512 — Batch Control Standards — International standard for batch process control providing the recipe management and equipment models used in MES-to-DCS batch integration.
  4. MESA International — MES/MOM Functional Model — Manufacturing Enterprise Solutions Association's standard model for Manufacturing Operations Management, defining the functional scope of MES systems.
  5. OPC Foundation — OPC UA for MES Connectivity — Official OPC UA technical documentation on using DA, HDA, A&C, and Pub/Sub services for MES-to-plant-floor integration.