Simple Structure
MODBUS is easy to understand and implement thanks to its relatively simple message structure.
MODBUS is an industrial communication protocol that allows one device to read data from another device or write data to it.
In its simplest form, MODBUS communication can be thought of as one device telling another device: "Send me this data" or "Change this value" .
One of the most important features of MODBUS is that it is not tied to a specific manufacturer or a single device family. This makes it widely used for data exchange between devices from different manufacturers.
MODBUS has an important role in PLCs, energy systems, motor drives, measurement devices, RTUs, SCADA systems and industrial control applications.
MODBUS is easy to understand and implement thanks to its relatively simple message structure.
A large number of PLCs, RTUs, meters, inverters, energy analyzers and other industrial devices support MODBUS.
MODBUS can be used over serial communication such as RS-232 and especially RS-485, or over Ethernet using MODBUS TCP.
Digital and analog data can be read, and control values can be written to devices that support write operations.
In the EOS SCADA Modbus client, a prefix is used at the beginning of the data address to specify the Modbus data area to be read.
RH# specifies a Modbus Holding Register, RI# specifies an Input Register, and RC# specifies a Coil address.
For example, for Holding Register number 16:
For Input Register number 12:
For Coil number 5:
MODBUS has several implementation types designed for different physical and communication environments. The most commonly used types are MODBUS RTU, MODBUS ASCII and MODBUS TCP.
MODBUS RTU is one of the most widely used MODBUS implementations, particularly over RS-485.
MODBUS ASCII is a MODBUS implementation in which messages are transmitted using ASCII characters.
MODBUS TCP enables MODBUS messages to be transmitted over Ethernet and TCP/IP networks.
MODBUS communication is based on one device sending a request and another device responding to that request.
In traditional MODBUS RTU systems, the terms Master and Slave are commonly used. In MODBUS TCP, the terms Client and Server are more commonly used today.
The device that initiates communication and requests data from the other device. For example, a SCADA system can read a temperature value from a PLC.
The device that responds to a request sent by the Master or Client. For example, an energy analyzer can provide the voltage values it measures through MODBUS.
MODBUS data is organized into different data areas. Each area is used for a specific purpose.
| Area | Data | Access | Description |
|---|---|---|---|
| Coils | 1 bit | Read / Write | Digital output or control information. |
| Discrete Inputs | 1 bit | Read Only | Digital input information. |
| Input Registers | 16 bit | Read Only | Input data such as analog or measurement values. |
| Holding Registers | 16 bit | Read / Write | Can be used for measurement values, settings, parameters or control values. |
Addressing is one of the topics that causes the most confusion in MODBUS applications. The address shown in a device's technical documentation may not always be represented in the same way within the software.
For example, a Holding Register shown as
40001
in a device manual may be represented using a
different starting address depending on the
software or driver being used.
Therefore, when establishing communication with a MODBUS device, looking only at the address number is not sufficient. The device manufacturer's register table should be evaluated together with the function code, address, data type, scaling and byte order information.
The operation to be performed in MODBUS is specified by a function code. Some of the most commonly encountered function codes are listed below.
| Code | Operation | Description |
|---|---|---|
| 01 | Read Coils | Reads the status of coils. |
| 02 | Read Discrete Inputs | Reads digital inputs. |
| 03 | Read Holding Registers | Reads Holding Register values. |
| 04 | Read Input Registers | Reads Input Register values. |
| 05 | Write Single Coil | Changes the value of a single coil. |
| 06 | Write Single Register | Writes a value to a single register. |
| 15 | Write Multiple Coils | Writes values to multiple coils. |
| 16 | Write Multiple Registers | Writes values to multiple registers. |
MODBUS basically operates using 16-bit Registers. However, real-world applications may use different data types for values such as temperature, pressure, power, energy, or meter readings.
For example, a device may store a 32-bit Float value in two 16-bit Registers. In this case, knowing only the Register address is not enough. It is also necessary to know how the data is encoded.
One of the common issues encountered in MODBUS applications is the byte and word ordering of multi-Register values.
Especially for 32-bit and 64-bit values, device manufacturers may use different byte and word ordering schemes. Therefore, even when the same Register values are read, the software may display a completely different number.
For example, 32-bit Float values may use different byte and word orders such as ABCD, CDAB, BADC, or DCBA .
Therefore, when configuring a MODBUS device in a system, the data type and byte/word order must be configured correctly in addition to the Register address.
MODBUS TCP enables the MODBUS protocol to be used over Ethernet and TCP/IP networks. Therefore, it is commonly preferred in systems that use Ethernet infrastructure instead of traditional serial communication.
In MODBUS TCP, devices communicate using IP addresses.
The standard MODBUS TCP port is
502.
A SCADA system, PLC, or another client can connect to a MODBUS TCP Server on the network to read Register and Coil values or write values permitted by the device.
MODBUS has a very wide range of applications. It is particularly common in systems where measurement and control data needs to be transferred between different systems.
Energy analyzers, electricity meters, power measurement devices, and energy monitoring systems.
PLCs, RTUs, inverters, motor drives, control devices, and automation systems.
Transmission of temperature, pressure, flow, level, and other process measurements.
MODBUS is used in SCADA systems to collect data from field devices and present this data to operators.
Although MODBUS has a relatively simple structure, communication problems can still occur frequently in field applications. Identifying the source of a problem may require checking many parameters, from the physical connection to the Register address.
MODBUS is one of the most widely used protocols in SCADA systems for collecting data from field devices.
For example, in a power plant, a SCADA system can collect
and many other types of data through MODBUS, and archive this data together with timestamps.
Various tools can be used to test MODBUS communication, control devices, inspect Register values, and troubleshoot communication problems.
In the future, this section will feature MODBUS tools, utility applications, and example software developed or shared by EOS.
Free tools and utility applications developed for MODBUS communication will be shared here.
MODBUS is an important communication protocol that has been widely used in industrial automation for many years thanks to its simple structure, broad device support, and ability to operate over different communication media.
Supporting MODBUS alone is not enough to ensure successful communication with a device. Device address, function code, Register address, data type, scaling, and byte/word order must also be configured correctly.
Especially in SCADA and data acquisition applications, MODBUS provides a practical and widely adopted solution for reliably collecting data from field devices.