What are MODBUS Protocol and all its features?

MODBUS RTU / TCP DATA COLLECTION NODE-RED HUBBOX X1 & X2

Modbus is a serial communication protocol developed in 1979 by Modicon for use with PLCs. Modbus TCP/IP uses TCP/IP and Ethernet to carry the data of the Modbus message structure between compatible devices. In other words, Modbus TCP/IP is a standard method of representing data over a physical network (Ethernet) using a network standard (TCP/IP). A Modbus TCP/IP message is simply a Modbus communication encapsulated in an Ethernet TCP/IP packet.

HUBBOX Expert Note: HUBBOX Connect X1 and HUBBOX Connect X2 devices collect data from legacy or next-generation Modbus RTU and Modbus TCP devices in the field. Thanks to Edge Computing and the built-in Node-RED visual flow engine, you can process and filter field Modbus data at the edge and transfer it directly to MQTT and Cloud systems without writing code.

1. Essential Terms to Know

The basic automation components frequently encountered in data collection processes with the Modbus protocol are as follows:

SCADA & HMI SCADA: Centralized systems that control and monitor all sites remotely.
HMI (Human Machine Interface): A user interface display panel connecting a person to a machine, system, or device.
AUTOMATION BRAIN
PLC, RTU & PDU PLC: Automation device used in controlling operations like production lines in factories.
RTU: Remote terminal unit used for remote monitoring of various systems.
PDU: A specific unit of information transmitted over a network.

Example Application: Modbus enables devices in a system to transmit the results of temperature and humidity meters connected to the same network to a controller computer or PLC.

2. Modbus Communication Architecture (Master / Slave)

The Modbus protocol uses a Master / Slave technique to establish communication between devices. That is, any application using the Modbus protocol will have one Modbus Master and at least one Modbus Slave. A Modbus Master is usually a host controller computer communicating with one or more Modbus Slave devices.

MODBUS MASTER / SLAVE DATA COMMUNICATION ARCHITECTURE

Modbus Master (PC / SCADA)
➔

HUBBOX Connect X1 / X2
➔

Modbus Slave 1 (Temp)
➔

Modbus Slave 2 (PLC / RTU)

3. Types of Modbus Communication Protocols

Modbus communication is divided into different types based on the physical infrastructure used, namely Serial and Ethernet-based:

A) Based on Serial Communication

Modbus RTU: A serial communication protocol organized according to the master/slave architecture. It is widely used due to ease of use and reliability. It ensures high reliability with a 16-bit CRC (error checking mechanism) used for secure transmission of data sent in two-bit packets.
Modbus ASCII: Based on transmitting data using 8-bit coding according to the ASCII coding system. It allows data sent sequentially to be transmitted without causing errors. LRC error checking is used to verify whether more than 8 bits of data have been sent.

B) Based on Ethernet Communication

Modbus TCP/IP Protocol: A simple-to-use protocol designed for supervision and control of automation devices. Offering communication based on classic internet network topology, this protocol transfers data at 100 Mbps using standard internet cards. Multiple connections can be made. Server/client connections are established, and data transfer occurs. Transmission speed depends on the processor and internet card type used in the devices.

4. Modbus TCP/IP Protocol Header Structure

In Modbus TCP/IP, messages consist of two main parts: the MBAP (Modbus Application Protocol Header) and the PDU (Protocol Data Unit), which together form the complete message structure.

MBAP HEADER - 7 Bytes PDU (Protocol Data Unit)
Transaction ID (2 Bytes) Protocol ID (2 Bytes) Length (2 Bytes) Unit ID (1 Byte) Function Code (1 Byte) DataBytes (N Bytes)
Transaction Matching ID 00 00 (Modbus) Remaining Packet Length Slave Device Address Read/Write Command Register Data

5. Edge Computing & Node-RED Integration with HUBBOX Connect X1 & X2

To integrate Modbus communication into cloud systems (AWS, Azure, private SCADA) without writing code, HUBBOX devices offer an end-to-end solution:

1
HUBBOX Connect X1: Connects field Modbus RTU and Modbus TCP devices to a secure Cloud VPN network via plug-and-play architecture, establishing encrypted tunnels closed to external interference.
2
HUBBOX Connect X2 (Edge Computing & Node-RED Gateway): With its built-in Node-RED visual drag-and-drop workflow engine, it reads data from Modbus register addresses, processes it at the edge, and instantly transforms it into MQTT / JSON payloads.
// HUBBOX Connect X2 Node-RED Modbus Conversion Logic
READ modbus_register(40001); // Read Temperature Value
IF (temperature > 65) {
  MQTT_Publish("factory/machine1/alarm", {"status": "HIGH_TEMP"});
}

Latest Resources

Transform industrial data at the Edge with HUBBOX Connect X2. Seamlessly converge OT and IT using Docker, Node-RED, a...
MQTT protocol is a communication protocol designed for widespread use of IoT devices. It is a protocol designed to ca...
Remote access; It is the general name given to the methods that allow you to connect and manage information systems l...
VNC (Virtual Network Computing) enables a network device containing graphics applications to be used and managed remo...
SCADA (Supervisory Control And Data Acquisition), translated as “Supervisory Control And Data Acquisition”. SCADA sys...
Offline Data Collection with Edge Computing: HUBBOX X1 and X2 Series
HUBBOX works to support many industrial protocols used today in the device and software systems it develops.
IoT (Internet of Things) technologies, which is the Internet of Things, are developing more and more in our lives.