Modbus
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)
Refer to Modbus Settings in LYNX User Manual.
Integration with RS/485 devices in Industrial Equipment Integration Guide.
2) Modbus/TCP-IP
Refer to Modbus TCP/IP in LYNX User Manual
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):
Identify existing topology of PLC/HMI system from above list and select one of integration option for IoT Gateway.
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.
The select Modbus channel has to be configured as Slave (Server) and communication settings should be well documented.
Following is required information for Modbus RS485:
Baudrate
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.
Following is required information for Modbus TCP/IP
IP address
192.168.100, 10.0.0.1 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.
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.
List down the parameter names, Modbus register numbers, data types in tabular form.
The register should be complete 5 digits or define the register type (Input, Holding etc).
If data type is Floating point, please define LSB/MSB type.
Sample Table of Modbus Registers
Voltage
40000
Signed Integer
Temperature
30050
Floating point (LSB)
Alarm1
10000
Binary
Technical References for YuDash IoT Gateways
Last updated