The problem: two worlds that don't talk to each other
Most plants run two universes that rarely communicate automatically. On one side, the IT world: the ERP (SAP, Microsoft Dynamics, Odoo, Sage…) that manages production orders, inventory, purchasing and costs. On the other, the OT world: the PLCs, drives, scales, controllers and sensors that run the physical process in real time.
When these two worlds are not integrated, the outcome is always the same: someone fills in a production report by hand, someone else transcribes it into a spreadsheet and, hours or days later, that data ends up in the ERP with errors and no traceability. The ERP "thinks" 1,000 units were produced when in reality 940 were made and 60 were scrapped. Decisions are taken on old, inaccurate data.
Integrating the ERP with plant floor data is precisely about closing that gap: letting orders flow down to the machines automatically and letting the reality of production flow back up to the ERP with no paper and no transcription.
What you gain by integrating
- No more manual entry: production reports, consumption and scrap are recorded automatically from the PLC or the scale.
- Reliable inventory: stock is deducted in real time based on actual raw material consumption, not theoretical figures.
- Real-time order closing: the ERP knows the exact status of every order without waiting for the end of the shift.
- Full traceability: which raw material batch went into which product, with which process parameters and on which machine.
- Real costs: energy consumption, machine times and rejects attributed to each production order.
- Data to improve: a solid base for calculating OEE, planning maintenance and spotting bottlenecks.
The missing layer: MES and ISA-95
Connecting an ERP directly to a PLC is almost never a good idea. They work at very different rhythms and languages: the PLC updates variables every few milliseconds and speaks in bits and registers; the ERP reasons in orders, materials and accounting documents. Between them you need a layer of translation and aggregation.
That intermediate layer is the MES (Manufacturing Execution System), and the framework that defines how responsibilities are split is the ISA-95 standard (IEC 62264). ISA-95 describes a hierarchy of levels worth keeping in mind before designing any integration:
| Level | System | Function | Time horizon |
|---|---|---|---|
| Level 4 | ERP | Business planning and logistics | Days / months |
| Level 3 | MES | Production execution and tracking | Shifts / hours |
| Level 2 | SCADA / HMI | Supervision and control | Seconds |
| Level 1 | PLC / control | Process control | Milliseconds |
| Level 0 | Sensors / actuators | The physical process | Real time |
ERP-to-plant integration is essentially the dialogue between Level 4 and Level 3 (and from Level 3 downward). ISA-95 even defines the standard messages for that dialogue: the production orders flowing down and the production, consumption and quality confirmations flowing up.
The data flows: what goes down and what comes up
A well-designed integration is bidirectional. It is not just about reading machine data, but about closing the full loop:
From the ERP to the plant (downstream): production orders with their material, quantity, recipe or formula, sequence and dates. In recipe-based processes (food, chemical, pharma), the ERP can even send the product parameters so the PLC loads them automatically.
From the plant to the ERP (upstream): production confirmations (good units and rejects), actual raw material consumption, machine and downtime, batches and traceability, quality parameters and, increasingly, energy consumption per order.
Integration architectures
There is no single right way. The choice depends on the size of the plant, the ERP and the existing digital maturity. These are the four most common architectures:
1. MES as intermediary (the recommended one)
The PLC exposes its data via OPC-UA, the MES collects it, contextualizes it with the ERP orders and consolidates the information it returns to the ERP through an API or standard connector. It is the most robust and scalable architecture, and the one that best respects ISA-95. Solutions such as Ignition (with its MES module), SAP Digital Manufacturing or custom platforms fit here.
2. IIoT broker with MQTT
Plant data is published to an MQTT broker (often using the Sparkplug B standard, which adds semantics and connection state) and consumed from there by the ERP or a cloud platform. It is lightweight, decoupled and perfect for distributed or multi-site architectures. It pairs very well with Edge Computing.
3. Middleware / iPaaS
An integration layer (Node-RED, Mulesoft, Azure Integration Services…) translates between the plant protocol and the ERP API. Useful when the ERP has a well-documented REST API and the data volume is moderate.
4. Direct OPC-UA connection (simple cases only)
Some modern ERPs accept OPC-UA clients or direct connectors. It works for simple cases (one line, few variables) but does not scale well nor provide the contextualization an MES gives. Use it with care.
Key protocols and standards
- OPC-UA: the de facto standard for extracting PLC data securely and with semantics. It is the foundation of almost any serious integration.
- MQTT / Sparkplug B: lightweight, publish-subscribe oriented, ideal for IIoT and distributed architectures.
- ISA-95 / B2MML: defines the model and the standard XML messages for ERP-MES exchange.
- REST / OData: the usual way to talk to a cloud ERP (SAP uses OData; Dynamics and Odoo expose REST APIs).
How to approach the project, step by step
Step 1 — Define the use case. What specific problem are you solving? Eliminating the manual report? Batch traceability? Real costs? Start with a measurable goal, not with "connect everything".
Step 2 — Map the data. Which variables exist in the PLC, which fields the ERP expects and how they correlate with the orders. This is where project success is decided.
Step 3 — Choose the architecture. MES, MQTT broker, middleware or direct connection, depending on the scope and existing maturity.
Step 4 — Solve IT/OT security. The traffic crosses the boundary between the plant network and the corporate network. You need segmentation, an industrial DMZ, certificates and per-variable permissions.
Step 5 — Start with a pilot. One line, one use case, clear metrics. Validate and then scale to the rest of the plant.
Common mistakes worth avoiding
- Connecting ERP and PLC directly with no contextualization layer: fragile and unmaintainable.
- Sending raw data with no context: a machine value with no idea of which order, batch and product it belongs to is useless.
- Ignoring data quality: if the scale is poorly calibrated or the operator does not declare the downtime, the ERP will carry garbage that looks precise.
- Forgetting OT security: opening the plant network to the corporate one without segmentation is an open door to incidents.
- Trying to integrate everything at once: the projects that start with a scoped pilot are the ones that succeed.
Conclusion
Integrating the ERP with plant floor data is one of the highest-return steps in any Industry 4.0 project: it eliminates manual work, makes inventory and costs reliable, and opens the door to analytics and continuous improvement. The key is to respect the ISA-95 hierarchy, rely on a well-designed MES or integration layer and protect the IT/OT boundary.
At Bluemation we design and implement integrations between the plant and management systems, from extracting PLC data via OPC-UA to connecting with your ERP. Tell us about your case and we will help you close the gap between the machine and the office.