4

I've been reading about these two protocols lately and wasn't quite able to understand why to use MQTT when we have MODBUS (or vice versa).

Since, MODBUS is used to transmit data over serial communication between PLC's under low bandwidths, but as far as i understood, MQTT does the same using its PUBLISH/SUBSCRIBE methodology (I know MQTT uses a broker and MODBUS doesn't, but that's not the point).

Can somebody provide a clear distinction between them?

hardillb
  • 54,545
  • 11
  • 67
  • 105
Suyash Bakshi
  • 59
  • 1
  • 6

3 Answers3

5

They are quite different, but both are popular in their own era.

Modbus is originally published in 1979, it is designed mainly for control/monitoring software to communicate with filed devices in a limited scale, e.g. a factory/building. So it has the following key considerations,

  • One-to-many topology, there is always one master to poll multiple slaves
  • Simplicity over flexibility, it only support request-response pattern
  • deterministic timing over performance, it is to support the strict real time requirement in control system

MQTT started in 1999, large-scale network and internet becomes much more popular and more complex communication ways between software and devices are needed since then, like event-based, machine-to-machine communication. So MQTT emerges to meet the following needs,

  • Many-to-many topology, all participants can communicate each others via the common broker.
  • Large scale, it works well in large network, e.g. internet.
  • Flexibility, all participants are decoupled, and it provides QoS to meet different delivery agreement.

In a nutshell,

  • If you are a software architect, use MQTT if possible, because it is well designed for modern IoT world,
  • If you are designing a smart device, you may consider Modbus for compatibility with traditional PLC/SCADA system.

Bonus: You can consider to bridge Modbus to MQTT world, like this modpoll tool.

balun
  • 1,191
  • 1
  • 7
  • 12
3

Normal Modbus is a serial communications protocol often used for connecting industrial electronic devices.

MQTTis a messaging protocol for use on top of the TCP/IP protocol often used for sending measurements from electronic devices to another party.

Maybe this link help a bit. A Comparison of IoT Gateway Protocols: MQTT and Modbus

pan
  • 1,899
  • 1
  • 16
  • 24
1

Modbus has lots of varients. But if we will compare one Modbus varient with MQTT, it should be Modbus TCP.

*MQTT is a newer protocol than Modbus and developed as Internet of Things(IoT) in mind. Some old devices doesn't support MQTT but just support Modbus TCP.

*With MQTT, you can send data to multiparts by message broker, but Modbus TCP just send data to the its server.

*MQTT is more secure than the Modbus TCP protocol.

*MQTT is supported by many software languages and main cloud service providers such as Amazon AWS, Microsoft Azure, IBM Bluemix and Google Cloud.

*As a result, if your devices and system support MQTT, use it instead of Modbus TCP.

hopeTo
  • 223
  • 5
  • 15