Skip to content
Modbus

What is Modbus?

Modbus is an open communication protocol used to connect industrial devices, meters, controllers, and building automation systems.

Introduction

Modbus is an open communication protocol for exchanging data between industrial devices, controllers, meters, sensors, and supervisory software. It was created for industrial automation and remains widely used because it is simple, well documented, and supported by equipment from many manufacturers.

How Modbus works

Modbus uses a client-server communication model. A client requests data or asks a server to perform an action, and the server returns a response. Depending on the device and network type, the same device may be called a master or slave in older documentation. Client and server are the preferred terms for new projects.

A Modbus request identifies a function and an address. Common data areas include:

  • Coils: Single-bit outputs that can be read or written
  • Discrete inputs: Single-bit inputs that can be read
  • Input registers: Read-only 16-bit values
  • Holding registers: 16-bit values that can be read or written

Modbus RTU and Modbus TCP

Modbus RTU communicates over a serial connection, typically RS-485. Devices share a bus and use settings such as baud rate, parity, stop bits, and a server address. Correct termination, polarity, and cable practices are important for reliable communication.

Modbus TCP carries Modbus messages over Ethernet using TCP/IP. It normally uses port 502 and avoids many serial configuration concerns, while still using the same general function codes and data model.

Addressing and data types

Modbus registers are 16 bits wide. A device manual must be consulted to determine the register address, function code, scaling, byte order, and whether a value is signed or unsigned. Larger values such as 32-bit integers and floating-point numbers use multiple registers, and manufacturers may define different word or byte orders.

A value of 230 might represent 230 volts, 23.0 volts, or a raw device value depending on the documented scale. Always apply the device documentation before displaying or writing values.

Modbus in building automation

Modbus is commonly used by meters, variable frequency drives, boilers, heat pumps, and other equipment. A gateway can expose Modbus values to a building automation system using another protocol, such as BACnet. A reliable integration should document polling intervals, supported function codes, register mappings, units, scaling, and communication failure behavior.

Modbus is a protocol for transporting values; it does not define a universal semantic model for every device. Clear point lists and consistent naming are therefore essential when integrating equipment from different manufacturers.