OPC UA vs MQTT vs Modbus is not simply a choice between three competing industrial protocols. Each technology solves a different part of the factory-connectivity problem.
Modbus is commonly used to read registers from PLCs, drives, meters and industrial devices. OPC UA provides structured industrial information with security and interoperability features. MQTT efficiently distributes events and telemetry from edge systems to dashboards, applications and cloud platforms.
Direct answer: Use Modbus for simple communication with supported industrial devices. Use OPC UA when applications need structured machine information, discovery and secure client-server integration. Use MQTT when data must be distributed efficiently from gateways to multiple applications. Many practical factories use all three at different layers.
This guide explains how the protocols differ, where each one fits and how to select an architecture for PLC data acquisition, Industrial IoT, ERP integration and mobile factory applications.
| Area | Modbus | OPC UA | MQTT |
|---|---|---|---|
| Primary role | Read or write device registers and coils | Exchange structured industrial information | Publish and distribute messages through a broker |
| Communication pattern | Client-server request and response | Client-server and PubSub options | Publish and subscribe |
| Typical location | Device and PLC connectivity | Machine, line, SCADA, MES and edge integration | Edge-to-platform, application and cloud messaging |
| Data meaning | Numeric registers require external mapping | Supports structured information models | Payload meaning must be defined by the application |
| Traditional security | Traditional Modbus does not provide built-in authentication or encryption | Supports certificates, authentication, signing and encryption | Security depends on broker configuration, authentication and protected transport such as TLS |
| Hardware support | Very common in PLCs, drives, meters and instruments | Common in modern PLCs, machines, SCADA and industrial software | Common in gateways, embedded devices and IIoT platforms |
| Best fit | Simple, predictable device access | Interoperability and contextual industrial data | Scalable distribution of telemetry and events |
The correct protocol should be chosen for each communication layer. Trying to force one protocol across the complete architecture may create unnecessary complexity or security risks.
Modbus is an application-layer messaging protocol widely used for communication with industrial automation equipment.
The official Modbus Application Protocol specification defines a client-server request-and-response model using function codes. Modbus can operate over serial communication or TCP/IP networks.
Common forms include:
A Modbus device normally exposes information through addresses representing coils, discrete inputs, input registers and holding registers.
For example, a power meter might expose:
The protocol does not automatically explain the business meaning, unit, scale or data type of every register. The integrator needs the device’s register map and must implement the correct conversion.
Modbus remains useful because it is simple and widely supported. Its limitations should be handled through gateways, documentation, network controls and a suitable data-processing layer.
OPC Unified Architecture, or OPC UA, is an industrial interoperability framework developed by the OPC Foundation.
Unlike a basic register protocol, OPC UA can represent data as structured objects with relationships, properties, methods, alarms and events.
The OPC Foundation describes OPC UA as a platform-independent architecture supporting information modelling, discovery, data access and security.
Suppose a machine exposes a value of 72. Modbus may tell the application that register 40021 contains 72. The application still needs a register map to determine what that value means.
An OPC UA server can expose the information with context such as:
This context makes integration easier for SCADA, MES, historians, Industrial IoT platforms and enterprise applications.
OPC UA supports more than one communication approach:
The right model depends on the equipment, supported OPC UA profiles and the project architecture.
The OPC UA security specification covers application authentication, user authentication, message integrity and confidentiality.
OPC UA can support:
These capabilities do not make every OPC UA deployment automatically secure. Certificates, trust lists, users, permissions and security policies must be configured and maintained correctly.
MQTT is a lightweight client-server publish-and-subscribe messaging transport protocol.
According to the OASIS MQTT 5.0 specification, MQTT is designed for efficient messaging, including constrained devices and networks where bandwidth may be limited.
MQTT contains three primary roles:
A factory gateway might publish a machine event to a topic structured like:
factory/chennai/line-2/cnc-07/status
Approved subscribers could include:
The machine gateway does not need a direct connection to every consuming application. The broker manages message distribution.
MQTT provides three Quality of Service levels:
QoS does not remove the need for application-level validation. An ERP integration should still use event identifiers, timestamps and duplicate protection before creating a production or maintenance transaction.
No. They frequently operate at different layers.
A common brownfield factory architecture is:
Industrial device → Modbus → Edge gateway → OPC UA information model or data normalisation → MQTT → IIoT platform → ERP and mobile apps
Not every implementation requires every step. Examples include:
The architecture should match the equipment and business requirement, not a predetermined protocol preference.
| Requirement | Likely option | Reason |
|---|---|---|
| Read registers from an energy meter | Modbus RTU or TCP | Simple and commonly supported by industrial meters |
| Read structured data from a modern CNC machine | OPC UA, if supported | Machine data can include names, hierarchy, types and status |
| Send data from 20 factories to one platform | MQTT through secure gateways | Broker-based distribution decouples sites from applications |
| Connect PLC data to SCADA | OPC UA or a supported industrial driver | Depends on PLC capability, SCADA support and control requirements |
| Collect data from a legacy PLC | Modbus or vendor-specific protocol through a gateway | Older controllers may not provide modern interfaces |
| Standardise data across machine brands | OPC UA information model or edge canonical model | Normalisation provides common names and structure |
| Send machine alerts to multiple applications | MQTT | Multiple authorised subscribers can receive an event |
| Create ERP maintenance tickets | Gateway or middleware plus ERP API | Raw industrial messages must be validated and converted into business events |
The central difference between Modbus and OPC UA is the amount of structure and context they provide.
Modbus is effective when the application knows exactly which register to read and how to interpret it. OPC UA is more suitable when different applications need to discover and understand structured machine information.
| Decision | Choose Modbus when | Choose OPC UA when |
|---|---|---|
| Device capability | The device exposes a documented Modbus map | The device includes an OPC UA server |
| Data complexity | A small number of values must be read | Machines expose many related parameters and events |
| Interoperability | The integration is device-specific | Several applications need a common model |
| Security | The connection remains inside a protected segment or uses additional protection | Application authentication, signing and encryption are required and supported |
| Engineering effort | A reliable register map is available | Browsing and structured discovery reduce manual mapping |
OPC UA may offer a stronger long-term integration model, but it cannot create capabilities that the machine or controller does not support.
OPC UA and MQTT overlap in some publish-subscribe scenarios, but they are not equivalent.
OPC UA provides an industrial information model and a collection of services. MQTT transports application-defined messages between clients through a broker.
| Decision | OPC UA | MQTT |
|---|---|---|
| Main strength | Industrial context and interoperability | Efficient message distribution |
| Data model | Built into the OPC UA architecture | Defined by the implementing applications |
| Typical connection | Application-to-machine or application-to-industrial server | Gateway and applications connected through a broker |
| Security | OPC UA security policies, certificates and user controls | Broker authentication, topic permissions and protected transport |
| Cloud distribution | Possible but depends on architecture and supported profiles | Frequently used for edge-to-platform messaging |
A practical architecture may use OPC UA inside the factory and MQTT for transferring selected information to an enterprise or cloud platform.
Modbus communicates with industrial devices. MQTT distributes application messages.
An edge gateway may act as the bridge:
Replacing Modbus with MQTT is only possible when the device itself supports MQTT or an additional gateway is installed. MQTT cannot directly read a Modbus register without a component translating between the protocols.
Odoo should not normally communicate directly with every PLC, meter or CNC controller.
A safer architecture is:
Machine protocol → Industrial gateway → Normalisation and rules → Secure integration API → Odoo ERP
The gateway or integration layer can convert industrial data into business events such as:
Odoo can then update Manufacturing, Maintenance, Quality, Inventory or other approved workflows.
Tech4Lyf combines Odoo development with smart-factory integration for projects that require both industrial connectivity and ERP workflows.
A mobile app should generally consume approved information from an application API, not connect directly to a PLC or MQTT broker on the factory network.
A recommended flow is:
PLC or machine → Gateway → IIoT platform → Application API → Mobile app
The mobile application may display:
This approach allows the business to apply user authentication, permissions, audit logs and data filtering before sending information to the device.
Explore Tech4Lyf’s mobile app development services for factory dashboards and ERP-connected applications.
Protocol selection should not be based on claims that one technology is always faster than another. Actual performance depends on:
Collect data at the frequency required for the business use case. An OEE dashboard may not need millisecond values, while a control loop may require a dedicated deterministic industrial network rather than an ERP or cloud integration.
| Security area | Modbus | OPC UA | MQTT |
|---|---|---|---|
| Authentication | Not included in traditional Modbus | Supports application and user authentication | Implemented through broker and client configuration |
| Encryption | Not included in traditional Modbus; separate Modbus Security specification is available | Supports message encryption | Can use TLS depending on deployment |
| Authorisation | Usually handled by network and gateway controls | Can support roles and permissions | Broker access-control rules can restrict topics |
| Certificate management | Required when using Modbus Security | Important for trusted OPC UA applications | May be used for broker and client authentication |
| Public internet exposure | Not recommended | Not recommended without a carefully secured architecture | Use a secured broker, authentication, TLS and restrictive access controls |
The NIST Guide to Operational Technology Security recommends protecting OT while considering its safety, reliability and performance requirements.
Record every PLC, CNC controller, drive, meter and device. Identify available Ethernet, serial and vendor-specific interfaces.
Review official device manuals, firmware versions, runtime licences and controller configuration. Do not assume that a protocol shown in a product family brochure is enabled on the installed machine.
Identify whether the objective is OEE, energy monitoring, predictive maintenance, production counting, quality traceability or ERP integration.
Collecting one production count per cycle requires a different architecture from collecting high-frequency vibration data.
For every required point, document:
Define which systems remain in the machine network, which data reaches the edge gateway and which approved information can reach enterprise or cloud applications.
Begin with one machine or line. Test normal operation, network loss, device restart, invalid values, certificate expiry and application downtime.
Establish naming rules, MQTT topic structure, OPC UA modelling conventions, units, timestamps and gateway configuration templates before connecting additional machines.
None is universally better. Modbus is useful for straightforward device access, OPC UA provides structured industrial information and MQTT efficiently distributes messages through a broker.
Only when the industrial device directly supports MQTT or a gateway translates its device protocol into MQTT. MQTT cannot automatically read Modbus registers without a bridge.
OPC UA may replace Modbus for applications supported by modern devices, but many meters, drives and legacy PLCs provide only Modbus. A gateway can expose Modbus data through OPC UA.
Traditional Modbus does not provide authentication or encryption. The Modbus Organization publishes a separate Modbus Security protocol using TLS and certificates. Legacy Modbus should be protected through segmentation, restrictive firewall rules and secure gateways.
MQTT can be deployed securely when the broker uses strong authentication, TLS, certificate or credential management and restrictive topic permissions. An MQTT deployment is not automatically secure simply because a broker is used.
Yes. OPC UA includes security mechanisms for authentication, message signing and encryption. These controls must be correctly enabled and maintained.
MQTT is frequently suitable for distributing selected edge data to central platforms. The correct architecture still depends on security, data volume, connectivity and cloud-platform requirements.
Use a protocol supported and licensed on the installed PLC. Modbus is common for simple access, OPC UA can provide richer structured information, and vendor-specific protocols may be necessary for some controllers.
Yes, through a suitable gateway, middleware or custom integration service. Odoo should generally receive validated business events rather than communicating directly with every industrial device.
Not always. A small monitoring project may use only Modbus and a gateway. A multi-site IIoT platform may use Modbus or OPC UA inside each factory and MQTT for central message distribution.
The best result in an OPC UA vs MQTT vs Modbus evaluation is rarely a single winner. The objective is to assign each protocol to the layer where it provides the most value.
Tech4Lyf helps manufacturers audit machine interfaces, connect PLC and CNC data, configure industrial gateways, build IIoT dashboards and integrate selected events with ERP and mobile applications.
Read more about PLC data acquisition, industrial IoT gateways and connected manufacturing platforms.
Not sure which protocol your machines support? Contact Tech4Lyf for a machine-connectivity and Industrial IoT assessment.