Swoop graphic
Modbus communication
A technical overview of the Modbus communication protocol
Modbus logo

Modbus is a widely used communication protocol in industrial automation and control systems. Developed by Modicon (now Schneider Electric) in 1979, Modbus has become a de facto standard in the industry due to its simplicity, reliability, and open nature. It allows for communication between electronic devices, enabling the transfer of data between controllers, sensors, and various other industrial equipment.

Network connections between devices

Physical layer

There are several types of Modbus, each designed for different applications and environments. The most common variants are Modbus RTU (Remote Terminal Unit), Modbus ASCII, and Modbus TCP/IP. Modbus RTU and ASCII are typically used in serial communication environments, while Modbus TCP/IP is designed for use in Ethernet networks. Modbus RTU is the most widely used variant due to its compact binary representation of data, which allows for efficient transmission.

Client-server architecture

Modbus uses a simple client-server (also known as master-slave) communication model. In this model, the client (master) initiates requests, and the server (slave) responds to these requests. This straightforward approach allows for easy implementation and troubleshooting. The protocol supports various data types, including discrete inputs (single bit, read-only), coils (single bit, read-write), input registers (16-bit, read-only), and holding registers (16-bit, read-write). These data types provide flexibility in representing different kinds of information, from simple on/off states to more complex numerical values.

Network connections between people

Object types

Although the Modbus protocol handles the majority of the communication details, it is critical to understand the "function codes" or "entities" that Modbus supports. Because Modbus has no "discovery" features, the user will need to manually configure these registers and coils before any devices are able to communicate using Modbus.

Input Register

By far the most common type of entity, the input register represents a read-only value which is outputted by a sensor or device. These input registers only hold an integer from 0-65535, so they can't intrinsically represent larger numbers, floating point numbers, or any other data. To overcome this limitation, many register mappings will utilize two adjacent registers to allow larger numbers to be held, or utilize both registers (32 bits total) to represent a single precision floating point register. You will need to refer to the Modbus register map for the sensor or hardware to see what mapping method was used.

Holding Register

This is a read and write register, similar to the input register but allowing a client to write a value to it. These are typically used for changeable parameters for a device, allowing the configuration to be changed.

Discrete Inputs

The discrete input is a read-only bit, which typically represents an on/off value from a sensor or device. They are used less often with modern hardware, as storage space is not as big of a concern.

Coils

Coils are read and write bits, similar to discrete inputs, but allow for a client to change the bit value. These bits are typically used for changeable parameters in a device, which allow the configuration to be changed.

Advantages

One of the key strengths of Modbus is its versatility. It can be used in a wide range of industries, including manufacturing, energy, building automation, and transportation. The protocol's simplicity makes it easy to implement on a variety of hardware platforms, from small microcontrollers to large programmable logic controllers (PLCs). Despite being an older protocol, Modbus continues to be relevant in modern industrial settings, often serving as a bridge between legacy systems and newer, more advanced communication networks.

Nseries hardware and software

Hardware and software

Paragon's N-series controllers allow interfacing with any existing Modbus infrastructure that may exist at a site. Two of the most common applications which require Modbus hardware integration:

  • Connecting to legacy Modbus hardware devices - An N-series controller can be installed to communicate with legacy Modbus hardware, and provide gateway translation to any number of other output types. Wireless Modbus can also be easily provided with this setup.
  • Converting non-Modbus sensor and controls to a BAS - Large commercial buildings may have an existing Modbus based building automation system (BAS). It may be desirable to install non-Modbus sensors and controls in the building, and a N-series controller can be installed to communicate between the systems.