What Is MES? Manufacturing Execution Systems Explained
A manufacturing execution system (MES) governs real-time shop-floor production at ISA-95 Level 3: dispatching work orders, enforcing station interlocks, capturing OPC UA telemetry, and building lot genealogy. Here is the engineering blueprint.

On this page

A manufacturing execution system (MES) is the operational software layer that controls, sequences, and documents physical production on the factory floor in real time, bridging enterprise planning in the ERP and millisecond machine control in the PLCs. Governed by the ISA-95 / IEC 62264 standard, an MES ingests released production orders from Level 4 business systems, dispatches operations to work centers, verifies material lots and recipes before a machine cycles, captures live telemetry over OPC UA, and builds an as-built genealogy record for every unit or batch produced.
Most factories already run an ERP in the office and PLC or SCADA controls on the machines. The blind spot sits between them. An ERP knows a customer ordered 8,000 hydraulic manifolds due on Friday, and the CNC controller knows Spindle 2 draws 14.2 amps right now, but neither system tells the plant manager that Order 4092 is stalled at Operation 30 because three castings failed leak testing and the replacement lot sits in quarantine. Below is the engineering architecture of a modern MES: the ISA-95 five-level hierarchy, the 11 core MESA functions, B2MML ERP-to-MES state sync, discrete vs batch vs regulated eDHR data models, edge resilience, and 2026 build-vs-buy economics.
The short version
- ISA-95 Level 3 execution core: An MES sits at Level 3 of the ISA-95 hierarchy, translating weekly ERP master schedules (Level 4) into station dispatch queues while reading real-time counts and alarms from SCADA and PLCs (Levels 1 and 2).
- Hard station interlocks: A production MES enforces poka-yoke interlocks at the work center, blocking the PLC cycle-start bit if a scanned lot is quarantined, a torque tool calibration expired, or a unit skipped an upstream test station.
- MESA-11 functional architecture: Modern builds decompose the MESA International 11 core functions into event-driven services covering work-order dispatch, recipe download, inline SPC quality holds, real-time OEE calculation, and forward/backward lot genealogy.
- B2MML and idempotent ERP bridges: Rather than locking ERP general-ledger tables on every scan, the MES exchanges structured
ProductionScheduleandProductionPerformancemessages at operation milestones. - Edge buffer resilience: Because a factory line cannot stop during a WAN drop, an MES uses local cell gateways and edge databases that validate scans in under 50ms and spool MQTT Sparkplug B telemetry until connectivity returns.
- 2026 build-vs-buy economics: Low-code apps fit simple manual benches and monolithic suites fit uniform greenfield plants, while custom software development ($120k to $240k for a single-line MVP; $280k to $550k for a full plant) wins when hybrid batch-to-discrete genealogy, brownfield PLC interlocks, or per-station SaaS fees break vendor templates.
Where MES sits in the ISA-95 (IEC 62264) five-level hierarchy
Every architectural failure in shop-floor software starts by violating the boundaries defined in ISA-95 (IEC 62264), the international standard for enterprise-control integration. ISA-95 divides a manufacturing enterprise into five functional levels based on control loop latency and state horizon.
Level 0 and Level 1: Physical process, sensing, and deterministic PLC control (1 ms to 50 ms)
Level 0 is the physical process: molten aluminum filling a die cavity, an SMT head placing resistors on a PCB, or a bioreactor fermenting a batch. Level 1 comprises the field sensors, encoders, servo drives, and programmable logic controllers (PLCs) wired into that process. A Rockwell ControlLogix or Siemens S7-1500 PLC executes deterministic scan cycles every 1 to 20 milliseconds for closed-loop motion, PID regulation, and safety interlocking. Level 1 has no concept of a purchase order, cost variance, or bill of materials; it only knows register states, high-speed counters, and I/O bits.
Level 2: Supervisory control, HMI, and SCADA (100 ms to seconds)
Level 2 supervises a machine cell or continuous line. Local HMIs and SCADA systems read PLC tags over industrial Ethernet, display real-time P&IDs, manage setpoints, and raise process alarms when temperature or pressure drifts out of range. SCADA cannot replace an MES: SCADA watches equipment physics in seconds, whereas an MES tracks work orders, serial numbers, operator qualifications, and material lot genealogy across the floor.
Level 3: Manufacturing Execution Systems / MOM (seconds to shifts)
Level 3 is the domain of the MES (and the ISA-95 Part 3 Manufacturing Operations Management model covering production, maintenance, quality, and plant inventory). When a work order is released, the MES explodes it against the routing and bill of materials from PLM software and the ERP, queues sequenced operations at each work center, downloads CNC programs or PLC recipes, verifies component lot barcodes before unlocking cycle start, records good counts and scrap reasons, and constructs the bidirectional genealogy graph linking raw lots to finished serials.
Level 4: Enterprise Resource Planning and business logistics (days to quarters)
Level 4 is the manufacturing ERP (SAP S/4HANA, Oracle Cloud ERP, Microsoft Dynamics 365, NetSuite) alongside production planning software, managing financial periods, customer orders, purchasing, standard costing, and site inventory balances.
Why blurring Level 3 with Level 1 or Level 4 breaks the factory
In our manufacturing software development audits, two boundary violations recur:
- Pushing Level 3 routing logic into Level 1 PLCs: Hard-coding part numbers, barcode parsing, and station sequences inside PLC ladder logic means every new product variant requires editing live PLC code across work cells, risking safety recertification. PLCs should run parameterized phases; the MES should own the product catalog, routing graph, and barcode rules.
- Stretching Level 4 ERP screens to the shop floor: Bolting barcode scanners directly onto ERP transaction endpoints triggers general-ledger postings and multi-table locks taking 2 to 6 seconds per scan. When 120 stations scan parts every 8 seconds, lock contention causes timeouts and pushes operators back to writing tallies on cardboard for end-of-shift entry.
The 11 core MES functions (MESA-11) in modern software architecture
In 1997, MESA International defined the eleven functional areas of a manufacturing execution system (later expanded into the ISA-95 Part 3 MOM model). In a modern build, these eleven functions are engineered as four cohesive microservices domains backed by PostgreSQL and a time-series historian (TimescaleDB or InfluxDB).
1. Dispatching, finite sequencing, and resource allocation (MESA functions 1, 2, and 3)
Once the ERP or production planning software releases a work order, the MES explodes it into routing operations (Op 10: Laser Cut, Op 20: CNC Mill, Op 30: Anodize, Op 40: Final Torque & Leak Test) and drives the dispatch queue at each station. Before Op 20 starts on CNC-04, the MES checks whether the machine is maintenance-locked in the CMMS software and whether fixture FIX-882 is within calibration limits. It then writes the approved recipe or CNC program ID to PLC registers via OPC UA and verifies the checksum before unlocking cycle start.
2. Data acquisition, performance analysis, and real-time OEE (MESA functions 5, 8, and 11)
Manual clipboard logs overstate availability by 10 to 25 points because micro-stops under two minutes go unrecorded. The MES subscribes directly to machine telemetry: CNCs stream spindle loads and part counts via MTConnect or OPC UA, while presses and brownfield PLCs publish state changes via gateways into an MQTT Sparkplug B broker. Joining machine state with order ideal cycle time lets the MES compute Availability, Performance, and Quality continuously per ISO 22400-2:2014, as detailed in our guide to OEE (Overall Equipment Effectiveness).
3. Product genealogy, document control, and labor management (MESA functions 4, 6, and 10)
Every material consumption and station completion writes an immutable record linking Who, What, Where, When, and Why. When an operator badges in via RFID, the MES checks their active training matrix; if a brazing certification lapsed, the HMI stays locked. The terminal renders effectivity-dated drawings and 3D work instructions pulled from PLM software, while linking parent serials to child component lots, tool serials, and process curves for IATF 16949 and medical compliance.
4. In-line quality gates and maintenance triggers (MESA functions 7 and 9)
Digital gauges, checkweighers, and vision cameras stream measurements into the MES operation record. If a dimension violates Statistical Process Control (SPC) rules or spec limits, the MES places an immediate QUALITY-HOLD on the lot, blocks downstream stations from scanning the part, and opens an NCR in the quality management software. Simultaneously, accumulated press strokes and fault codes feed predictive maintenance software and the CMMS.
Engineering the ERP-to-MES boundary: B2MML, backflushing, and WIP reconciliation
The highest-risk interface in any MES project is the Level 3 to Level 4 bridge to the ERP. To avoid brittle custom scripts, ISA-95 Part 2 and Part 5 standardize four transaction exchanges in B2MML (Business To Manufacturing Markup Language):
- Product Definition (
SyncProductDefinition): ERP or PLM pushes approved item masters, mBOMs, and routings with standard setup and run times to the MES. - Production Schedule (
ProcessProductionSchedule): ERP or APS sends released work orders (OrderID,SKU,TargetQuantity,PlannedStart,AllocatedMaterialLots) to the MES. - Production Capability (
SyncProductionCapability): MES reports work-center availability, maintenance windows, and capacity constraints back to planning. - Production Performance (
NotifyProductionPerformance): MES posts operation confirmations containing good count, scrap by reason code, labor/machine hours, and consumed component lots back to the ERP.
Solving the inventory backflush and WIP reconciliation trap
Completion backflushing in the ERP fails on multi-day orders whenever mid-routing scrap, lot substitutions, or partial yields occur. In our manufacturing inventory software and MES builds, we enforce operation-milestone consumption with idempotent ERP settlement:
- Line-side staging custody: When a forklift moves raw castings to
Line-2-Staging, the ERP transfers stock to the WIP zone and the MES takes lot-level custody. - Scan-verified consumption: At Operation 10, the operator scans Lot
L-8841, and the MES deducts consumed and scrapped quantities against that lot immediately. - Transactional outbox with idempotency keys: Every confirmation sent to SAP (
CONF21IDoc / BAPI) or NetSuite/Dynamics REST APIs carries a deterministicidempotency_key({work_order_id}:{op_seq}:{milestone_batch_id}). If the ERP locks during a nightly batch run, the MES outbox retries safely without double-deducting inventory.
Discrete vs batch/process vs regulated eDHR/eBR: three distinct MES data models
An automotive assembly line, a chemical batch reactor plant, and an FDA-regulated implant facility require different database graphs.
1. High-volume discrete and job-shop manufacturing
Discrete manufacturing tracks countable parts or serialized assemblies (unit_serial or tote_lpn) across a directed acyclic graph (DAG) with rework loops (Op 30 Fail -> Op 35 Repair -> Op 30 Re-test). When a PCB barcode is scanned at conformal coating, the MES verifies in under 30ms that AOI and ICT tests both passed. At marriage stations, it links child motor serials to parent housings and captures peak torque (24.6 Nm) and angle (42.1 deg) directly from nutrunner controllers over Open Protocol or OPC UA.
2. Batch and continuous process manufacturing (ISA-88 / IEC 61512)
Process manufacturing follows the ISA-88 (IEC 61512) Batch Control standard, separating the Physical Model (Process Cell -> Unit -> Equipment Module -> Control Module) from the Procedural Control Model (Procedure -> Unit Procedure -> Operation -> Phase). If an incoming acid lot is at 96.2% potency instead of 98.0%, the MES scales the phase charge weight and neutralizing buffer automatically. Because reactor batches split across holding silos with existing heels and feed continuous bottling lines, the genealogy engine models a weighted material flow DAG with residence-time windows rather than a simple tree.
3. Regulated medical device (eDHR) and pharmaceutical (eBR) manufacturing
Under FDA 21 CFR Part 820 (harmonized with ISO 13485 under the FDA QMSR) and FDA 21 CFR Part 11, the MES governs the electronic Device History Record (eDHR) or electronic Batch Record (eBR). Critical steps require Part 11 cryptographic dual signatures (Performed By and Verified By) with append-only audit trails. Enforcing range checks and gauge calibration locks at entry enables review-by-exception, cutting QA batch release from a week of paper checks to hours.
Shop-floor connectivity and edge resilience: OPC UA, Sparkplug B, and surviving WAN drops
Treating an MES as a pure-cloud web app means a severed fiber line or cloud DNS outage freezes every station interlock in the plant. Following NIST Smart Manufacturing Systems guidelines, a production MES separates local edge execution from cloud aggregation.
- Edge protocol normalization: Modern CNCs and PLCs connect via OPC UA (IEC 62541) or MTConnect. Brownfield PLCs (Siemens S7, Allen-Bradley, Omron) are polled read-only via DIN-rail gateways over EtherNet/IP, S7comm, or Modbus TCP, publishing normalized tags into an Eclipse Sparkplug B MQTT Unified Namespace with Report-by-Exception and
NBIRTH/NDEATHstate certificates. - Two-tier store-and-forward autonomy: A local edge node caches 72 hours of released orders, BOMs, routings, and recipes. Station HMIs, GS1-128 barcode scanners, ZPL printers, and PLC handshakes run over the local LAN in under 50ms. During a WAN outage, transactions buffer to a local write-ahead log and drain chronologically once connectivity returns.
The fastest way to lose the trust of a production director is to let a cloud outage stop a physical assembly line. When a press cycles every six seconds, the station interlock, barcode check, and PLC handshake must execute locally on the plant network in under 50 milliseconds. Use the cloud for multi-plant visibility, long-horizon analytics, and ERP orchestration, but keep the execution loop anchored to the shop floor.
We apply this pattern in production through our AI industrial reporting and analytics system, consolidating high-volume operational telemetry into auditable intelligence, and AirpartChain, a tamper-evident component traceability ledger combining OCR extraction with cryptographic verification.
Build vs configure vs buy an MES in 2026: TCO and architecture fit
- Buy a low-code frontline app for 10 to 30 manual benches digitizing paper instructions without complex multi-level genealogy or automated PLC recipe downloads.
- Buy a monolithic Tier-1 suite for greenfield semiconductor, automotive OEM, or standard pharma plants where corporate mandates a global vendor template.
- Build a custom or composable MES when your plant mixes batches and packs discrete units; when 180 terminals at $180/station/month would cost $388,800/year in perpetual SaaS fees; when quality release relies on custom test rigs and brownfield PLCs; or when you want phased delivery starting with OEE tracking and smart factory telemetry in 12 to 16 weeks.
Implementation blueprint: rolling out an MES without halting production
We execute MES rollouts in four stages on a single bottleneck line before scaling plant-wide:
- Week 1 to 3: Protocol audit and master-data scrub. Inventory PLC models, Ethernet ports, cycle counters, and gauges on the pilot line while reconciling ERP routings and BOMs against floor reality.
- Week 4 to 8: Read-only edge shadow run. Stream PLC counts and fault codes over OPC UA and Sparkplug B until machine counts match physical output within 0.5%.
- Week 9 to 14: Station UX and parallel cutover. Validate gloved operator screens (barcode scans, 64px targets, sub-50ms checks) alongside ERP confirmations for two weeks.
- Week 15+: Enable hard interlocks and replicate. Turn on PLC cycle-start locks and SPC holds on Line 1, then clone across lines.
Whether you are replacing paper travelers, preparing for an IATF 16949 or FDA Part 11 audit, or connecting shop-floor execution to your ERP and AI software development roadmap, our manufacturing software development team engineers MES systems from the PLC register up to the ledger.

CTO and Co-founder at Idealogic. Directing engineering, systems architecture, security, and full-stack delivery across web, mobile, and blockchain.
Frequently asked questions
A manufacturing execution system (MES) is the operational software layer at ISA-95 Level 3 that controls, tracks, and documents shop-floor production in real time. It ingests released production orders from the ERP, dispatches sequenced operations to work centers, enforces station interlocks and recipe parameters, captures cycle counts and quality readings from PLCs and operators, and constructs an as-built genealogy record linking every raw material lot to each finished unit.
An enterprise resource planning (ERP) system operates at ISA-95 Level 4 to manage financial ledgers, customer orders, procurement, and master schedules across days and weeks. A manufacturing execution system (MES) operates at Level 3 to govern physical production across seconds, minutes, and shifts. ERP determines what products to build and when materials arrive; MES enforces how each unit is built at every station and reports actual quantities, scrap, and lot consumption back.
PLCs sit at ISA-95 Level 1 and Level 2, executing deterministic ladder logic in 1 to 20 milliseconds to control motors, valves, and safety relays. SCADA sits at Level 2, supervising real-time process variables, PID setpoints, and equipment alarms across seconds. An MES sits at Level 3, organizing production around work orders, routings, serial numbers, operator sign-offs, and material lots while reading machine states from SCADA and PLCs via OPC UA.
The MESA-11 model defines eleven core shop-floor functions: resource allocation and status, operations and detailed scheduling, dispatching production units, document control, data collection and acquisition, labor management, quality management, process management, maintenance management, product tracking and genealogy, and performance analysis. Modern MES architectures implement these capabilities as modular microservices connected to a shared shop-floor event bus and time-series historian rather than a single monolithic database.
Discrete MES tracks serialized units moving through sequential routing stations with pass/fail interlocks and torque verification. Batch and process MES follows ISA-88 state machines to govern reactor vessels, recipe scaling, potency adjustments, and lot splits or blends. Regulated medical device and aerospace MES enforces electronic Device History Records (eDHR) and 21 CFR Part 11 cryptographic signatures, locking work orders automatically if an operator certification or gauge calibration expires.
A production-grade MES never makes synchronous cloud round-trips in the critical path of a machine cycle or barcode scan. Instead, an on-premise edge cluster or cell gateway caches active work orders, routings, BOMs, and recipe setpoints locally in SQLite or PostgreSQL, validates station scans in under 50 milliseconds, and buffers outbound OPC UA and MQTT Sparkplug B store-and-forward queues until enterprise or cloud connectivity returns.
In 2026, a focused single-line MES MVP covering PLC connectivity over OPC UA, work-order dispatching, glove-friendly operator terminals, and ERP confirmation sync typically costs $120,000 to $240,000 over 12 to 16 weeks. A full-plant custom MES with lot genealogy, inline SPC quality holds, and multi-protocol brownfield machine integration ranges from $280,000 to $550,000, while multi-site regulated eDHR platforms with FDA Part 11 validation run $600,000 to $1,100,000+.
Off-the-shelf MES suites or low-code frontline work-instruction apps fit standard assembly cells with uniform routings and minimal PLC interlocks. Custom MES development wins when your manufacturing process combines batch mixing with discrete packaging, requires sub-second station interlocks across mixed legacy PLCs, enforces proprietary inline test algorithms, or involves hundreds of operator stations where per-seat SaaS fees and vendor consulting change orders exceed the cost of owning the codebase.
More from the journal

Quality Management Software: Modules, Integration, eQMS
Quality management software runs the quality system: document control, non-conformance, CAPA, audits, SPC, and supplier quality. Here are the modules, how they close the loop, how the QMS integrates with ERP and MES, what validation demands, and when to build instead of buy.

Production Planning Software: MRP vs APS and Finite Scheduling
Standard ERP material requirements planning assumes infinite machine capacity and static lead times. Here is how modern Advanced Planning and Scheduling software uses constraint programming, setup matrices, and real-time MES telemetry to build executable factory schedules.

PLM Software: BOMs, Engineering Change, Integration
PLM software manages the product definition: CAD data, the engineering and manufacturing BOMs, and engineering change. Here is what it is, how the eBOM becomes the mBOM, how change flows through ECR-ECO-ECN, where the ERP boundary sits, and when to build instead of buy.