Modbus for connecting IoT Gateways with instruments

Modbus is one of the most popular serial protocol for industrial systems. It is used for data exchange between sensors, instruments, PLC, HMI and parts of SCADA system. Please refer to Wikipedia and official standard for technical details.

With advent of IIoT, IoT gateways communicate with various components over Modbus. This documents various topologies of Modbus based systems.

Modbus Communication Concept

Modbus works on the concept of Master and Slave. The master sends a request to slave and slave reply with required information.

These words have been officially replaced to Client (Master) and Server (Slave). Unfortunately, Master/Slave words still remain popular in industry (at least for Modbus/RS485). In Modbus TCP/IP, Client-Server is more prevalent. For ease of understanding, we use unofficial words in this tutorial.

Modbus Versions

Following are two popular version of Modbus which are supported by YuDash IoT devices.

1) Modbus/RS485 (or Modbus/RTU)

2) Modbus/TCP-IP

With assumption of basic Modbus understanding, we explain integration of YuDash IoT devices with Modbus instruments, PLCs and HMIs.

Integration of IoT Gateway in various Modbus topologies

1) Integration of IoT Gateway with PLC based systems

1) Typical PLC application with Modbus/RS485 communication

1A) PLC system with IoT Gateway using Modbus/RS485

1B) PLC system with IoT Gateway using Modbus TCP/IP

2) Integration of IoT Gateway with PLC+HMI based systems

2) Typical PLC+HMI based system

2A) PLC+HMI with IoT Gateway using Modbus/RS485

2B) PLC+HMI with IoT Gateway using Modbus TCP/IP

3) IoT Gateway with RS485 enabled instruments

All Modbus topologies are captured in below tutorial

Requirements in PLC system for IoT compatible

It is important that PLC based system for Industrial Machines/Assets are designed to be IoT compatible. It is imperative that all machines will be IoT enabled (Industry 4.0) now or later in future. Following are key requirements during system design to make IoT ready (using Modbus):

  1. Identify existing topology of PLC/HMI system from above list and select one of integration option for IoT Gateway.

  2. One channel of Modbus RS485 or Modbus TCP/IP (Ethernet) has to be made available for IoT gateway. IoT Gateway will be Modbus Master (Client) which will request data from the existing system.

  3. The select Modbus channel has to be configured as Slave (Server) and communication settings should be well documented.

  4. Following is required information for Modbus RS485:

RS485 ParameterSample/Description


9600, 19200 etc

Data Bits, Parity & Stop Bit

8N1, 8E1 etc.

Slave ID for Modbus slave

1, 2 etc.

Modbus RS485 terminals

The RS485 terminals should be well defined (preferably take a photograph with A and B marked).

In case of DB9/RJ25/RJ45 jack, clearly identify the pins. It is advisable to provide a two wire connector on the jack.

It is advisable that provided communication settings should be verified by PC based Modscan software. Please document snapshots of Modscan, similar to this example.

  1. Following is required information for Modbus TCP/IP

Modbus TCP/IP ParamterSample/Description

IP address

192.168.100, etc.

IP port

The port number on which Modbus Server is running. For example: 503, 888

Server ID Modbus Server

1, 2, etc.

RJ 45 jack for connecting IoT gateway

Well defined RJ45 jack to connect IoT Gateway. It can be in PLC/HMI or a switch.

  1. Identify critical parameters from the system to be provided to the IoT Gateway. These can be real-time process values, thresholds, batch numbers or alarm values.

  2. List down the parameter names, Modbus register numbers, data types in tabular form.

    1. The register should be complete 5 digits or define the register type (Input, Holding etc).

    2. If data type is Floating point, please define LSB/MSB type.

  3. Sample Table of Modbus Registers

ParameterModbus RegisterData Type



Signed Integer



Floating point (LSB)




Technical References for YuDash IoT Gateways

Last updated