势创智能

news

5 Patterns to Integrate with MES: OPC UA, MQTT, REST, File Drop, Shared Memory

5 Patterns to Integrate with MES: OPC UA, MQTT, REST, File Drop, Shared Memory

All 13 of MVCreate's products integrate with customer MES (Manufacturing Execution Systems) — pushing inspection results (defect type, location, confidence, pass/fail) in real time so MES can trigger sorting, marking, statistics, and traceability. But customer MES varies enormously: some run SAP ME, others Siemens Opcenter, others Yonyou or Kingdee, others a homegrown stack. No single integration pattern fits all. Here are the five we use, and where each one belongs.

1. OPC UA: industrial gold standard

Use when: factory-grade MES + mature OT network + data security matters.

OPC UA (Unified Architecture) is the de-facto standard of the Industry 4.0 era; supports both pub-sub and client-server.

Advantages:
- Standardization: all major MES (SAP ME, Opcenter, Wonderware) support it natively;
- Type system: strong typing carries quality codes, timestamps, units along with values;
- Security: TLS + client certificates;
- Mixed discrete/continuous: events (single-wafer fail) and process (line cycle metrics) on the same channel.

Disadvantages:
- Complex: deep stack, expensive to implement from scratch;
- Hard to debug: arcane error messages; specialized diagnostic tooling needed;
- Customer infra required: an OPC UA Server or gateway.

Our libraries: open62541 (C) + opcua-asyncio (Python). Our products embed a built-in OPC UA Server; customer MES connects and subscribes.

2. MQTT: lightweight IoT default

Use when: distributed deployment + high-frequency data + small-to-mid-scale MES.

MQTT is the IoT industry's de-facto standard — lightweight + pub-sub:

  • Tiny message overhead (tens of bytes);

  • One-to-many distribution out of the box;

  • Auto-reconnect and QoS guarantees.

Advantages:
- Lightweight: protocol header is tiny — ideal for high-frequency data;
- Decoupled: pub/sub separates upstream and downstream — MES upgrades don't disturb inspection equipment;
- Mature ecosystem: Mosquitto, EMQX, HiveMQ.

Disadvantages:
- No native type system: payload is bytes; types via JSON/Protobuf by convention;
- No transport reliability (QoS 0) — or expensive (QoS 2).

Typical deployment: SC-DEL-Drone runs an MQTT broker on its ground station; the drone publishes results, MES subscribes.

3. REST API: simplest, but high latency

Use when: asynchronous reporting + low-frequency data + cross-network integration.

REST (HTTP + JSON) is the easiest pattern: the inspection device acts as HTTP client and POSTs each result to a MES endpoint; MES returns 200.

Advantages:
- Simple: five lines of Python;
- Cross-network: HTTPS traverses firewalls easily;
- Universal: every modern MES supports it.

Disadvantages:
- High latency: handshake + request takes 50–100 ms even on a good link;
- No pub-sub: MES can't push back; client polls;
- Batching is awkward: high-frequency data needs client-side buffering.

Typical deployment: SC-IV-Portable on a plant uses 4G uplink and REST-POSTs to cloud MES every 30 s (cycle permits).

4. CSV file drop: the realist choice for legacy plants

Use when: legacy MES + offline lines + no network.

Many customer MES installations froze in the 2010s — direct DB ingestion, no API — but include "directory monitoring". The simplest integration is CSV files.

Advantages:
- Zero dependency: device just writes files; MES just watches a directory;
- Disconnect-safe: MES restarts don't lose data; files accumulate;
- Audit-friendly: CSV is its own audit log.

Disadvantages:
- High latency: MES poll cycles 30 s – 5 min;
- File-write conflicts: multi-device cases need careful directory layout;
- Coarse typing: everything is string; type conversion lives in MES.

Our implementation: each device writes per-minute CSVs to a shared SMB/NFS directory; filenames carry timestamp + device ID; MES file-watcher triggers ingest.

5. Shared memory: ultra-low-latency line integration

Use when: inspection device and a local PLC/MES service share a host + cycle<100 ms.

Some ultra-high-speed lines (>10,000 wafers/h) consider even OPC UA's 5–10 ms slow — they need the most aggressive option: shared memory.

Implementation:
- Inspection software and MES service run on the same industrial PC;
- Share a POSIX shared memory segment (Linux) or memory-mapped file (Windows);
- The device writes a result struct directly into shared memory;
- The MES service reads via polling or semaphore notification.

Advantages:
- Microsecond latency: pure memory I/O,<10 μs;
- Massive throughput: limited only by CPU cache bandwidth;
- Zero serialization overhead.

Disadvantages:
- Tightly coupled: same host required; MES upgrade affects inspection;
- Cross-language pain: C/C++ struct compatibility with Python takes care;
- Operationally heavy: shared-memory leaks, semaphore deadlocks need expert troubleshooting.

Typical deployment: SC-MC-W (6,000 wafers/h) has a 200 ms cycle SLA on a particular line; we use shared memory to push results into the customer's PLC sorting signals — end-to-end latency<2 ms.

6. Comparison

PatternLatencyThroughputDeploy difficultyCustomer dep.Rating
OPC UA5–50 msMediumMediumOPC UA-aware MES★★★★★
MQTT10–100 msHighLowBroker★★★★
REST50–500 msLowLowAny★★★
CSV30 s – 5 minVery lowVery lowFile watch★★
Shared memory<10 μsVery highHighSame host★ (special)

Decision tree:

  1. Cycle<100 ms and same host? → shared memory

  2. Customer MES OPC UA-capable? → OPC UA

  3. Distributed + high-frequency? → MQTT

  4. Cross-network + async? → REST

  5. Legacy MES with no API? → CSV drop

7. MVCreate's "integration default"

Our 13 products ship OPC UA + MQTT + REST simultaneously by default; the customer enables what fits their MES. CSV and shared memory are project-customized.

The design philosophy: inspection devices should not be locked to customer MES choices — MES turns over every ~5 years; inspection equipment runs ≥8 years. MES upgrades must not require device rework.

For an MES-integration assessment or on-site integration service, contact MVCreate at +86 159-5048-9233.

Originally published by Vision Potential (Nanjing MVCreate Intelligent Technology Co., Ltd.). Reproductions must credit the source.

contact

Be the first to know about our new product launches, latest blog posts and more.
势创智能 Nanjing Vision Potential Intelligent Technology Co.,Ltd.Established based on the Nanjing Xiangning Artificial Intelligence Research Institute, we have brought together a number of outstanding industry...

Any question or request?

Click below, we’ll be happy to assist. contact
Copyright © 2012-2023. All Rights reserved    
微信二维码 关注

电话 联系

+86 15950489233

返回顶部 顶部
势创智能