What Is Modbus?

What Is Modbus?

Modbus is an open and simple communication protocol, developed by Modicon in 1979, that lets industrial devices such as PLCs, motor drives, energy meters and sensors read and write data through register addresses. It is used as Modbus RTU over serial lines and as Modbus TCP over Ethernet, and it is one of the most widespread protocols on the shop floor.

In brief

  • Model: master/slave (client/server); the client asks, the device answers.
  • Variants: Modbus RTU (RS-485 serial), Modbus TCP (Ethernet, port 502).
  • Data types: coil, discrete input, input register, holding register.
  • Security: none; network segmentation is essential.
  • Used for: integrations with PLCs, energy analysers, drives, scales and temperature controllers.

What Is Modbus?

The core idea of Modbus is extremely simple: the device’s memory consists of numbered boxes (registers), the client says “device 3, give me 5 registers starting from address 100”, and the device sends the values. This simplicity is why the protocol has been present in every brand of device for more than forty years. It can be implemented on anything from a small microcontroller sensor to a large PLC.

The protocol does not interpret data. Only the device documentation tells you whether a 16-bit register holds a temperature, a counter or a status bit. This is its biggest difference from the OPC UA information model: Modbus is cheap and widespread, but the meaning layer is left to whoever does the integration.

Data Types

TypeSizeAccessTypical content
Coil1 bitRead/WriteRelay, output status
Discrete Input1 bitReadSensor, button status
Input Register16 bitReadMeasured value
Holding Register16 bitRead/WriteSet point, counter, parameter

32-bit integer and floating-point values are carried in two consecutive registers; the word order varies by manufacturer and is the most common source of integration errors.

The Difference Between RTU and TCP

  • Modbus RTU: RS-485 two-wire line, multiple devices daisy-chained (typically up to 32 devices), speeds of 9600–115200 baud. A single master polls in turn; as the number of devices grows, the scan time gets longer.
  • Modbus TCP: Standard Ethernet, port 502. Multiple clients can connect to the same device, and speed is in the order of milliseconds. It plugs into the existing factory network, sharing switch and cabling infrastructure.
  • Gateway: Converters that translate RTU devices to TCP are common when moving older sites to Ethernet.

Reading Data from Modbus for MES

  1. Get the register map: Address, type, scale (for example value ×0.1) and unit information from the device manual.
  2. Do a test read: Verify values with a Modbus scanner; this is where you catch 0/1-based address offsets and word order.
  3. Set the scan interval: 1 second is enough for status bits, 10–60 seconds for energy meters.
  4. Use block reads: Fetch consecutive registers in a single request; a separate query for each register multiplies line load.
  5. Restrict writes: The MES should only read; permission to write set points must be defined and logged.

Common Mistakes

  • Neglecting termination resistors and grounding on the RS-485 line: random CRC errors.
  • Two devices on the same line carrying the same slave ID.
  • Not applying the scale factor: reading 235 and writing 235 °C instead of 23.5 °C.
  • Placing Modbus devices on the office network; the protocol has no security.

Frequently Asked Questions

What is the difference between Modbus RTU and Modbus TCP?
Modbus RTU runs over an RS-485 serial line; devices are chained on one line and a single master polls them. Modbus TCP carries the same command structure over an Ethernet/IP network; multiple clients can connect and speed is much higher. The message content is almost the same; only the transport layer changes.
Is Modbus a secure protocol?
No. Modbus has no authentication or encryption; anyone with network access can read and write registers. That is why Modbus devices should be kept in a separate OT network segment, protected by a firewall, and accessed by the MES for reading only.
Why does the Modbus register address differ from the documentation?
Some manufacturers start addresses at 1, others at 0; in addition, notations such as 40001 mean 0-based address 0 for a holding register. For 32-bit values, the word order (big/little endian) also varies by manufacturer. The device manual must be compared with a test read.

Modbus in EFFIX MES

The EFFIX MES data collection layer reads PLC, meter and sensor registers via Modbus TCP and serial gateways, bringing machine status, counts and process values to production monitoring screens. Because protocols such as OPC UA, MQTT, EtherNet/IP, MTConnect, Mitsubishi MC and Omron FINS sit in the same layer, the right route can be chosen for each machine on mixed-brand sites. kWh and m³ values taken from energy analysers are passed to energy monitoring and carbon footprint calculations through the SEM energy management integration. For details, see the EFFIX MES page or request a demo.