Skip to content

What is Modbus?

Modbus protocolReviewed

Meters and an inverter chained on one cable to a small gateway.

Modbus is a simple request-and-response protocol for reading and writing values in industrial devices. Published by Modicon in 1979 for its programmable logic controllers, it is now an open specification maintained by the Modbus Organization used by meters, inverters, batteries, drives and generators. Data is exchanged as numbered registers and coils over serial lines (Modbus RTU) or Ethernet (Modbus TCP).

  • Created1979, by Modicon
  • Maintained byModbus Organization
  • VariantsRTU and ASCII (serial), TCP
  • TCP port502

01

What Modbus does

Modbus lets one device, the client, ask another, the server, for the values it holds or tell it to change them. A meter might expose voltage, current and energy totals; an inverter its output power and a setpoint for its export limit; a generator its running state and fuel level.

The protocol says nothing about what a value means. Each manufacturer publishes a register map listing which address holds which quantity, in what format and scale, and every integration starts by reading that map.

Key functions

  • Read holding and input registers
  • Read and write coils and discrete inputs
  • Write single or multiple registers
  • Serial multi-drop on RS-485
  • Ethernet access over TCP port 502
  • Gateways between serial and TCP

02

Why Modbus matters

Modbus is the common denominator of energy hardware. It is cheap to implement, it runs on small processors, and nearly every meter, inverter and battery controller supports it, which makes it the default way to reach equipment that has no cloud API.

Its simplicity has costs. There is no built-in security, no discovery and no standard data model, so each device needs its register map, and anything on the network can read or write it. Integrations put Modbus behind a gateway on a protected local network for that reason.

03

How Modbus works

Data lives in four tables: coils (single-bit outputs), discrete inputs (single-bit inputs), input registers (16-bit read-only values) and holding registers (16-bit read and write values). Larger numbers span two or more registers, and devices differ on word order, so the register map has to say.

A client sends a request with a unit ID, a function code such as 03 for reading holding registers or 16 for writing several, a starting address and a count. The server replies with the values or an exception code. In Modbus RTU the frames travel on an RS-485 bus with a checksum; in Modbus TCP they travel inside TCP packets with a short header.

  1. 01

    Client

    Gateway or controller

  2. 02

    Request

    Unit ID, function code, address

  3. 03

    Server

    Meter, inverter, battery

  4. 04

    Response

    Register values or exception

04

How Modbus feeds Voltra

Voltra Edge runs a local Modbus driver, so meters, inverters, batteries and generators on a site’s network come into the same device model as chargers and building systems. Device profiles hold each model’s register map, so a supported device is mapped once and reused across sites.

  • Learn more

    Voltra Edge

    The on-site runtime with local protocol drivers.

  • Learn more

    Data acquisition

    Collect data from plant equipment over Modbus and other protocols.

05

Frequently asked questions

They carry the same requests and data model. Modbus RTU sends compact binary frames over a serial line, usually RS-485, with a CRC checksum. Modbus TCP wraps the same requests in TCP/IP packets on an Ethernet network, normally on port 502.

Related

See it on your own sites.