Skip to content
Web Development16 min read

MES Development: How to Build a Manufacturing Execution System

How to build a manufacturing execution system: ISA-95 scope, core modules, machine connectivity, ERP integration, OEE, traceability and build vs buy.

01

The short answer

A manufacturing execution system (MES) runs and records production on the shop floor. It takes work orders from the ERP, releases them to lines and machines, guides operators through each step, captures machine and quality data, tracks which materials went into which batch or serial number, and reports results back to the ERP. Building one well means scoping it carefully, connecting reliably to machines, designing for operators rather than office users, and integrating cleanly with the ERP.

This guide explains what an MES does, how to architect one, when a custom build makes sense, and how to roll it out without stopping production. For connecting the systems a plant already has, see manufacturing software integration.

02

Where an MES fits: the ISA-95 levels

The ISA-95 standard, published internationally as IEC 62264, is the common reference for how plant systems fit together. It splits a manufacturing business into levels. An MES belongs at Level 3, manufacturing operations management, alongside quality, maintenance and inventory-movement operations.

LevelWhat happens thereTypical systemsTime scale
4: Business planning and logisticsOrders, planning, purchasing, inventory value, costingERPDays, weeks, months
3: Manufacturing operations managementDispatching work, recording production, quality, genealogy, performanceMES, quality and maintenance systemsShifts, hours, minutes
2: Monitoring and controlSupervising and controlling the processSCADA, HMI, DCSMinutes, seconds
1: Sensing and manipulationReading sensors, driving actuatorsPLCs, sensors, drivesSeconds, milliseconds
0: The physical processThe actual productionMachines and materialsReal time
03

MES vs ERP vs SCADA

The three are often confused because their features overlap at the edges. The practical test is what each system owns.

ERPMESSCADA
OwnsPlans, orders, stock value, costsExecution: what ran, when, with what, and with what resultLive control and supervision of equipment
UsersPlanners, buyers, financeOperators, supervisors, quality, plant managersControl room operators, engineers
Typical questionWhat should we make this week?What is happening on line 3 right now, and which lot used this material?Is this pump within its pressure limits?
DataTransactionsEvents with full context: order, operation, machine, operator, material, resultHigh-frequency signals
04

What an MES does: the core functions

MESA International, the industry association for manufacturing operations software, has long described MES through eleven functions. In practice they group into a handful of modules. Very few manufacturers need all of them on day one.

ModuleWhat it coversUsually in the first release?
Work orders and dispatchReceive orders from the ERP, sequence and release them to lines, track statusYes
Production recordingStart and stop, quantities, scrap and reasons, labour, machine timeYes
Material tracking and genealogyWhich lots and serials were consumed and produced, at which stepYes, if you need traceability
Quality managementIn-process checks, sampling plans, non-conformances, holds and releaseOften
Work instructions and documentsThe right revision of drawings and instructions at each stationOften
Performance and OEEAvailability, performance, quality and downtime reasonsOften, once machine data is flowing
Detailed schedulingFinite-capacity scheduling by machine and shiftLater; start with simple sequencing
MaintenanceBreakdowns, planned maintenance and equipment historyLater, or integrate an existing system

Pro tip

Pick the first release by the question that costs you most today. If it is 'which batches used this faulty material?', start with genealogy. If it is 'why did line 2 miss its target?', start with production recording and downtime reasons.

05

Build, buy or extend

Commercial MES products are mature, and for many plants they are the right answer. A custom MES is worth considering when the fit is poor or the cost of the product is out of proportion to what you need.

OptionGood fit whenWatch out for
Commercial MESYour processes are close to industry practice; you need validated software quickly; you have the budget and in-house adminsLicence and implementation cost; customisation limits; heavy for small plants
ERP production module plus shop-floor appsSimple routings, few products, modest traceability needsERP screens are rarely usable on the shop floor; real-time data is limited
Custom MESDistinctive processes; mixed machines across plants; tight ERP integration needed; you want to own the roadmapYou own maintenance and, in regulated sectors, validation; needs disciplined scoping
Extend a platformA commercial MES or low-code industrial platform covers most needs, with custom apps for the gapsTwo systems to maintain; check API limits
06

Architecture of a custom MES

A custom MES is a set of connected layers. Keeping them separate makes it possible to add machines, plants and features without rewriting the core.

  • Edge connectivity. Gateways near the machines read data using OPC UA where controllers support it, or PLC protocols and simple I/O signals for older equipment. The gateway buffers data locally so a network drop doesn't lose counts.
  • Messaging. An MQTT broker or message queue carries machine events to the central system. Sparkplug, now published as ISO/IEC 20237, adds a standard topic structure and payload format on top of MQTT, which helps when many devices are involved.
  • MES core services. Work orders, routings and operations, materials and lots, equipment, people and skills, and quality rules. This is where the business logic and the genealogy record live.
  • Data storage. A relational database for orders, lots and events, plus a time-series store for high-frequency machine signals if you need them. Keep raw signals separate from the business record.
  • Applications. Operator screens at stations (tablets, panel PCs or handheld scanners), supervisor and plant dashboards, and quality and engineering tools.
  • ERP integration. Orders, bills of materials and routings come down; completions, consumption, scrap and labour go up. IEC 62264 defines standard objects and transactions for this exchange, and the B2MML schemas are a common way to implement them.

Scoping an MES?

ZSpace Labs designs and builds custom manufacturing software, shop-floor mobile apps and ERP integrations, starting with the module that solves your most expensive problem.

Start a Project
07

The data model that makes traceability work

Traceability depends on recording every production event with its full context, not just totals at the end of a shift. At minimum, each event should record:

  • The work order and operation (which step in the routing)
  • The equipment or work centre
  • The operator, and their qualification where it matters
  • Materials consumed, with lot or serial numbers and quantities
  • Materials produced, with new lot or serial numbers
  • Results: quantity good, quantity scrapped and the reason, measurements and check results
  • Timestamps for start, end and any pauses, with the reason for each stop
08

OEE: what it is and how to calculate it

Overall equipment effectiveness (OEE) is the most common performance measure an MES produces. It multiplies three ratios: Availability (run time ÷ planned production time), Performance (actual output ÷ the output possible at the ideal cycle time) and Quality (good units ÷ total units).

An illustrative example: a machine is planned to run for a 480-minute shift but stops for 60 minutes, so availability is 420 ÷ 480 = 87.5%. Its ideal cycle time is one minute, so in 420 minutes of running it could make 420 parts; it makes 378, so performance is 90%. Of those, 360 are good, so quality is about 95.2%. OEE is 0.875 × 0.90 × 0.952, or roughly 75%.

A figure of 85% is often quoted as world class, but it is a rule of thumb rather than a standard, and comparisons across different processes mislead. The value of OEE is in the downtime and scrap reasons behind it, so make capturing those reasons quick for operators.

09

Designing for the shop floor

Most MES projects that fail do so because operators avoid the system. Screens designed for office users don't work for someone wearing gloves, standing at a noisy machine, between cycles.

  • Large touch targets, high contrast and as few taps as possible per action
  • Barcode or QR scanning for orders, materials and equipment instead of typing
  • Local languages where the workforce needs them
  • Clear behaviour when the network drops: queue entries locally and sync, never lose data silently
  • One screen per station that shows the current order, the next step and any quality check due
  • Sign-off with a badge scan or PIN where a record must be attributed to a person
10

Regulated manufacturing: data integrity

In pharmaceuticals, medical devices and some food sectors, MES records are regulated records. Requirements vary by product and market, but they share common themes: every change is attributable to a person, time-stamped and kept in a secure audit trail; electronic signatures are controlled; and the software is validated, with changes under change control.

Examples include US FDA 21 CFR Part 11, which requires secure, computer-generated, time-stamped audit trails for electronic records; India's revised Schedule M good manufacturing practice rules, which larger firms had to meet in 2024 and smaller firms by 31 December 2025; and the EU GMP guidance on computerised systems (Annex 11), which was under revision in draft at the time of writing. This isn't legal or regulatory advice; confirm requirements with your quality and regulatory team before scoping.

11

Notes for Indian manufacturers

Many Indian plants run a mix of modern CNC machines and older equipment with no network interface, on an ERP such as Tally, SAP Business One, Microsoft Dynamics or Odoo. That shapes the design: simple edge devices that count cycles and detect run/stop on older machines, operator apps that work on low-cost Android tablets, and an integration layer that posts completions and consumption to the ERP in the format it expects.

Exporters often face traceability demands from overseas customers, such as automotive and pharmaceutical buyers, before any regulation requires it. Genealogy is often the module that pays back first. Purchasing and supplier records connect upstream; see procurement management system development and supplier portal development.

12

A phased rollout

Treat this as an illustration of the order of work, not a fixed plan.

PhaseScopeExit criteria
1. DiscoveryWalk the floor, map routings, data flows, machines and ERP touchpointsAgreed first-release scope and success measures
2. Pilot lineWork orders, production recording and scanning on one lineOperators use it every shift; counts match the ERP
3. Machine dataEdge gateways on pilot machines; downtime reasons; OEEAutomatic counts reconcile with manual counts
4. Quality and genealogyIn-process checks, holds, lot trackingA full forward and backward trace in minutes
5. Roll outRemaining lines and plants, in wavesEach wave signed off by the plant team
13

A hypothetical example

This scenario is illustrative, not a client project. An auto-components maker with two plants records production on paper and enters totals into its ERP the next day. A customer quality complaint takes three days to trace to the material lot involved.

The first release puts tablets at each station: operators scan the work order and material lots, record quantities and scrap reasons, and complete inspection checklists. Completions post to the ERP every few minutes. A second phase adds cycle counting on the main presses and a downtime dashboard. Tracing a complaint to the lot, operator and machine settings now takes minutes, and supervisors see the shift's progress without waiting for paperwork.

14

Common mistakes

  • Trying to deliver every MESA function in the first release
  • Designing screens in a meeting room instead of at the machine
  • Treating the ERP integration as an afterthought, so counts never reconcile
  • Connecting machines before agreeing what data is needed and why
  • No plan for network outages on the shop floor
  • Using OEE to compare dissimilar lines, instead of to find and fix losses
15

Conclusion

An MES succeeds when it is scoped to the plant's most expensive problem, connected reliably to machines, designed for the people at the line, and integrated tightly with the ERP. Start with one line, prove the data is right, then expand. For the wider picture of connecting plant systems, read manufacturing software integration, and for AI on the shop floor, AI agents in manufacturing.

Machine data collected by an MES can also feed predictive maintenance.

For automated defect detection at stations, see AI visual quality inspection.

Building manufacturing software?

Tell us about your plant, machines and ERP. ZSpace Labs will suggest a practical first release. Discuss your MES requirements.

Start a Project
FAQ

Common questions.

Software that manages and records production on the shop floor as it happens: which work orders run on which machines, what materials and people are used, the results of each step and quality check, and how equipment is performing. In the ISA-95 model it sits at Level 3, between the ERP (planning and finance) and machine control systems such as PLCs and SCADA.

The ERP plans and accounts: sales orders, purchasing, stock value, production orders and costs, typically working in days and weeks. The MES executes: it dispatches work to lines, records what actually happened minute by minute, enforces the process and quality steps, and reports completed quantities, scrap and material consumption back to the ERP.

Buy, or extend a commercial MES, when your processes are close to industry standard and you need validated, supported software quickly. Build when your process is distinctive, you have several plants with different machines, the commercial options are too heavy for your scale, or you need an MES layer tightly shaped around your ERP. Many manufacturers start with a focused custom system covering work orders, data capture and traceability, and grow it.

Modern machines and controllers often support OPC UA, an industrial interoperability standard (IEC 62541). MQTT, often with the Sparkplug specification, is common for sending machine data to a central broker. Older machines may need an edge gateway that reads PLC registers or simple signals such as cycle counts and run/stop status.

OEE (overall equipment effectiveness) is Availability × Performance × Quality. Availability is run time divided by planned production time, Performance is actual output divided by what the machine could make at its ideal cycle time, and Quality is good units divided by total units. An MES calculates it automatically from machine and operator data.

Yes. Electronic batch records and audit trails must meet data-integrity rules such as US FDA 21 CFR Part 11 and the GMP rules of each market, including India's revised Schedule M. The software must be validated, and every change controlled. Take regulatory advice for your specific products and markets.

Get in touch

Have a project in mind?

Whether you're building a new digital product, improving an existing website, or looking to automate part of your business — let's talk.