In brief
ERP plans and accounts for the business: sales orders, purchasing, inventory value, order costing and finance. MES runs production on the shop floor shift by shift: it dispatches orders to work centers and collects confirmations, downtime, material consumption and inspection results. The ISA-95 model puts ERP at Level 4 and MES at Level 3. The boundary sits where a plan measured in days turns into execution measured in minutes. Disputes over responsibility are settled by one table: which system is the source of truth for which piece of data.
The ISA-95 model: levels of a plant
ISA-95, also adopted as IEC 62264, describes how enterprise systems integrate with control systems. It splits a plant into five levels, from the physical process to business planning:
| Level | What it covers | Example systems |
|---|---|---|
| 0 | the physical process | machines, furnaces, presses |
| 1 | sensing and manipulating the process | sensors, drives, valves |
| 2 | control and supervision | PLCs, DCS, HMI panels |
| 3 | manufacturing operations management | MES, SCADA, quality system, maintenance |
| 4 | business planning and logistics | ERP |
The model does not tell you which software to buy. It tells you which activities happen at each level and what information has to pass between Level 3 and Level 4. That makes it a good starting point for a conversation between the IT director and the plant manager, because it gives both of them shared names for things each of them calls something different.
What ERP does and what MES does
Both systems touch the same areas, but on a different time scale and with a different purpose.
| Area | ERP (Level 4) | MES (Level 3) |
|---|---|---|
| Planning | production plan, MRP, weekly production order | schedule by machine and shift, order sequence |
| Material | purchasing, stock and its value | issue to the line, consumed raw material batch |
| Quality | batch hold, customer complaint | in-process inspection, control charts, deviations |
| Time and cost | order cost settlement | actual times, downtime and its causes, OEE |
| Master data | item, bill of materials (BOM), routing | work instructions, process parameters, execution recipe |
ERP knows that 5,000 housings have to be made by Friday and what they will cost. MES knows that press number 3 has been idle for 40 minutes waiting for a mold, and that the second-shift operator used a different batch of granulate than the first shift.
The boundary and the source of truth for each piece of data
Most trouble in a plant does not come from missing systems. It comes from the same data living in two places with nobody knowing which version is right. Before you start the integration, assign an owner to each piece of data:
- item, BOM and routing: ERP owns them, MES gets a copy in the version valid for the order;
- production order: ERP creates and closes it, MES executes it and reports status back;
- confirmation of good quantity and scrap: MES is the source, ERP takes the result for costing;
- batch genealogy (which raw material batch went into which finished goods batch): MES, because only MES sees it at the moment of production;
- process parameters and execution recipe: MES or the process engineering system, never a spreadsheet on someone's desktop;
- stock and its value: ERP, even when the physical movements are recorded by MES or a WMS.
The rule is simple: one piece of data, one owner, everything else is a dated copy. How to keep items and business partners consistent across systems is covered in the article on master data management.
Integration: which messages flow between the systems
The typical flows between ERP and MES are:
- Order down: ERP sends the order with quantity, due date, BOM and routing versions.
- Status up: MES reports the start, hold and completion of operations.
- Confirmations: good quantity, scrap with a reason, machine and labor time.
- Material consumption: the actual batches instead of consumption calculated from the BOM after the fact.
- Finished goods receipt: batch, quantity, quality status.
Parts 2 and 5 of ISA-95 describe the objects and transactions between the business level and production, so you do not have to invent a format from scratch. Three technical decisions matter more than the format. The first is frequency: a confirmation per piece loads ERP, one per shift delays costing. The second is resilience: a message must be retryable without double posting, so the integration should be idempotent. The third is working without a connection: the line cannot stop because ERP is in a maintenance window, so MES buffers confirmations and sends them when the connection comes back. Integration patterns are covered in more depth in the article ERP integration.
Machine data reaches MES from Level 2, usually over OPC UA or MQTT. Both protocols are compared in the article OPC UA and MQTT.
Does a mid-sized plant need MES
Not every plant does. The production module in ERP plus a few shop floor terminals is enough when routings are short, the plant runs one shift and the customer does not require batch traceability. MES starts to pay off when several signals show up at once:
- every morning the planner copies the plan from ERP into a spreadsheet, because ERP cannot see machine status;
- order costing waits several days for paper job cards;
- an automotive or food customer demands batch genealogy within hours, not days, as we describe in the article on traceability;
- nobody can explain why the line produces less than the standard says it should.
A sensible order for a mid-sized plant is automated data collection from a few key machines first, then electronic confirmations and downtime, and only at the end full detailed scheduling. Each stage produces a result you can see at the daily production meeting.
An MES rollout is best tested without stopping the line: on controller simulators that reproduce machine signals. That is what MES test automation with virtual machines looks like.
Questions and answers
Can MES replace the production module in ERP?
Partly. MES takes over detailed scheduling, confirmations, downtime and batch genealogy, but it does not replace material requirements planning, purchasing or cost accounting. Those stay in ERP. In practice the ERP production module shrinks to the order and its settlement, while all execution moves to MES. The change should be deliberate and documented, or both systems will start managing the same orders.
What is the difference between SCADA and MES?
SCADA supervises the process in real time: it shows the operator the status of machines and installations, alarms and trends, and sometimes lets them change setpoints. MES manages production as an activity: orders, batches, people, quality and performance. SCADA answers the question of what is happening with the machine right now, MES answers what the plant produced, from what, when and with what result.
Who should own an MES rollout: IT or production?
Production owns the process and decides what the system should do on the shop floor. IT is responsible for ERP integration, infrastructure, backups and security. A rollout run by IT alone ends with a system operators do not use. A rollout run by production alone ends with a data island that has no connection to ERP and no updates.
What determines how long an MES rollout takes?
The number of machine types and how they are connected, the number of processes in the first phase, the quality of master data in ERP and how available production staff are for testing. The most common cause of delay is messy routings and bills of materials in ERP. That is why master data is worth cleaning up before you choose an MES vendor, not during the rollout.