ERP-MES Integration Using B2MML/XML to Control Systems

Extending ERP-MES integration using B2MML/XML to Control Systems brings real-time visibility, automation, and process optimization across all levels of manufacturing. By leveraging middleware (OPC UA, MQTT), APIs, and IoT integration, manufacturers can achieve a fully connected end-to-end digital factory with seamless enterprise-to-shop-floor data flow.

Based on our experience, we briefly explain how to establish seamless integration between ERP, MES, and control systems (SCADA/PLC) using B2MML/XML schemas aligned with ISA-95 (IEC/ISO 62264). By following the below-mentioned structured approach, organizations achieve a unified digital manufacturing ecosystem, aligning with global standards and enabling real-time decision-making.


1. Core Concepts

ISA-95 Framework

  • Hierarchy: Defines four automation levels:
    1. Level 4 (ERP): Business planning (e.g., SAP, Oracle).
    2. Level 3 (MES): Execution management (e.g., production scheduling, quality control).
    3. Level 2 (SCADA): Supervisory control.
    4. Level 1 (PLC): Real-time machine control.
  • Scope: Focuses on data exchange between ERP and MES (Levels 3–4) but can extend to SCADA/PLC via middleware.

B2MML (Business To Manufacturing Markup Language)

  • Definition: XML implementation of ISA-95 for structured data exchange.
  • Key Schemas:
    • ProductionSchedule.xsd: Production orders from ERP to MES.
    • MaterialLot.xsd: Material tracking.
    • Equipment.xsd: Equipment status updates.
  • Data Flow:
    • ERP → MES: Sends production orders (e.g., <ProductionRequest>).
    • MES → ERP: Returns performance data (e.g., <ProductionPerformance>).

2. Integration Workflow

Step 1: Align with ISA-95 and B2MML

  • Map ERP/MES Data: Identify key objects (e.g., Production OrdersEquipment Status).
  • Define Scope: Decide between real-time or batch updates.

Step 2: Define Use Cases and Data Mapping

  • Example Use Case:
    • ERP sends a production order (OrderIDProductCodeQuantity).
    • MES maps to B2MML fields (e.g., ProductionRequest/ProductID).
  • Data Mapping Sheet: Document fields for maintainability.

Step 3: Plan Middleware/Integration Layer

  • Tools: Apache Camel, MuleSoft, or custom REST/SOAP services.
  • Workflow:CopyDownloadERP → (B2MML XML Generator) → Middleware → (B2MML Parser) → MES
  • Real-Time vs. Batch: Use asynchronous messaging (e.g., Kafka) for real-time needs.

Step 4: Customize B2MML Schemas

  • Extensions: Add custom fields (e.g., <CustomField>Batch123</CustomField>).
  • Version Control: Track changes in Git to avoid conflicts.

Step 5: Build ERP Interface

  • Data Extraction: Use ERP APIs (SAP IDoc, Oracle REST) to avoid direct database access.
  • XML Generation: Validate using tools like XMLSpy.

Step 6: Build MES Interface

  • Parsing: Use DOM/SAX APIs to extract B2MML data (e.g., ProductionRequest/Quantity).
  • Integration: Map B2MML EquipmentID to MES tags via APIs (e.g., Siemens Opcenter).

Step 7: Test with Realistic Data

  • Scenarios:
    • Normal cases (valid XML orders).
    • Edge cases (missing fields, large volumes).
  • Tools: Postman for API testing, JMeter for load testing.

Step 8: Error Handling and Logging

  • Retry Strategies: Exponential backoff for failed messages.
  • Logging: Centralize logs using ELK Stack/Splunk.

Step 9: Security (ISA/IEC 62443)

  • Encryption: Use HTTPS/TLS for data in transit.
  • Access Control: Role-based permissions for ERP/MES endpoints.

Step 10: Deployment and Monitoring

  • Phased Rollout: Start with pilot lines.
  • KPIs: Track latency, error rates, and schema validation failures.

3. Extending Integration to Control Systems (SCADA/PLC)

Middleware Protocol Translation

  • B2MML ↔ SCADA/PLC:
    • ERP/MES → Control Systems:
      1. MES sends B2MML production order.
      2. Middleware (e.g., OPC UA Server) converts XML to PLC commands (e.g., Modbus registers).
    • Control Systems → MES:
      1. PLCs send real-time data (e.g., temperature) to SCADA.
      2. Middleware packages data into B2MML <ProductionPerformance>.

Example: B2MML to PLC Command

  • B2MML:xmlCopyDownloadRun<ProductionRequest> <ID>PR-2023-001</ID> <ProductID>Part_X</ProductID> <Quantity>100</Quantity> </ProductionRequest>
  • Translation:
    • ProductID=Part_X → Load CNC program “G-Code_X” on Machine 3.
    • Quantity=100 → Set Modbus register 40001 to 100.

Edge Computing & IoT

  • IoT devices (e.g., smart meters) feed real-time data into B2MML for MES/ERP analytics.

4. Compliance and Tools

  • Standards:
    • ISA-95 Part 2 (object models), Part 4 (operations).
    • ISA/IEC 62443 (cybersecurity), FDA 21 CFR Part 11 (pharma).
  • Tools:
    • Validation: XMLSpy, Oxygen XML.
    • Middleware: MuleSoft, Apache Camel.
    • Monitoring: Grafana, Splunk.

5. Conclusion

The integration framework ensures:

  • Interoperability: B2MML bridges ERP, MES, and control systems.
  • Efficiency: Automated workflows reduce manual intervention.
  • Scalability: Supports high-volume production environments.
  • Security: Complies with industrial cybersecurity standards.

×

Hello!

Click one of our engineer below to chat on WhatsApp

× Call/ Text Anytime