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.
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.
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.
| Level | What happens there | Typical systems | Time scale |
|---|---|---|---|
| 4: Business planning and logistics | Orders, planning, purchasing, inventory value, costing | ERP | Days, weeks, months |
| 3: Manufacturing operations management | Dispatching work, recording production, quality, genealogy, performance | MES, quality and maintenance systems | Shifts, hours, minutes |
| 2: Monitoring and control | Supervising and controlling the process | SCADA, HMI, DCS | Minutes, seconds |
| 1: Sensing and manipulation | Reading sensors, driving actuators | PLCs, sensors, drives | Seconds, milliseconds |
| 0: The physical process | The actual production | Machines and materials | Real time |
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.
| ERP | MES | SCADA | |
|---|---|---|---|
| Owns | Plans, orders, stock value, costs | Execution: what ran, when, with what, and with what result | Live control and supervision of equipment |
| Users | Planners, buyers, finance | Operators, supervisors, quality, plant managers | Control room operators, engineers |
| Typical question | What 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? |
| Data | Transactions | Events with full context: order, operation, machine, operator, material, result | High-frequency signals |
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.
| Module | What it covers | Usually in the first release? |
|---|---|---|
| Work orders and dispatch | Receive orders from the ERP, sequence and release them to lines, track status | Yes |
| Production recording | Start and stop, quantities, scrap and reasons, labour, machine time | Yes |
| Material tracking and genealogy | Which lots and serials were consumed and produced, at which step | Yes, if you need traceability |
| Quality management | In-process checks, sampling plans, non-conformances, holds and release | Often |
| Work instructions and documents | The right revision of drawings and instructions at each station | Often |
| Performance and OEE | Availability, performance, quality and downtime reasons | Often, once machine data is flowing |
| Detailed scheduling | Finite-capacity scheduling by machine and shift | Later; start with simple sequencing |
| Maintenance | Breakdowns, planned maintenance and equipment history | Later, 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.
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.
| Option | Good fit when | Watch out for |
|---|---|---|
| Commercial MES | Your processes are close to industry practice; you need validated software quickly; you have the budget and in-house admins | Licence and implementation cost; customisation limits; heavy for small plants |
| ERP production module plus shop-floor apps | Simple routings, few products, modest traceability needs | ERP screens are rarely usable on the shop floor; real-time data is limited |
| Custom MES | Distinctive processes; mixed machines across plants; tight ERP integration needed; you want to own the roadmap | You own maintenance and, in regulated sectors, validation; needs disciplined scoping |
| Extend a platform | A commercial MES or low-code industrial platform covers most needs, with custom apps for the gaps | Two systems to maintain; check API limits |
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.
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
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.
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
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.
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.
A phased rollout
Treat this as an illustration of the order of work, not a fixed plan.
| Phase | Scope | Exit criteria |
|---|---|---|
| 1. Discovery | Walk the floor, map routings, data flows, machines and ERP touchpoints | Agreed first-release scope and success measures |
| 2. Pilot line | Work orders, production recording and scanning on one line | Operators use it every shift; counts match the ERP |
| 3. Machine data | Edge gateways on pilot machines; downtime reasons; OEE | Automatic counts reconcile with manual counts |
| 4. Quality and genealogy | In-process checks, holds, lot tracking | A full forward and backward trace in minutes |
| 5. Roll out | Remaining lines and plants, in waves | Each wave signed off by the plant team |
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.
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
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.
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.