You are currently viewing which is basic modbus communication type in embedded System
which is basic modbus communication type in embedded System

which is basic modbus communication type in embedded System

Spread the love

In the previous article we saw basics of modbus communication so in this article we will learn which is basic modbus communication type in embedded System.

There are basically five types of Modbus communication protocols:

  • Modbus TCP/IP – (Transmission control protocol) Speed: 10/100 Mbit/s.
  • Modbus RTU – (Remote terminal unit)serial binary protocol of the Master/Slave type
  • JBUS – limited set of communication messages of the Modbus RTU type
  • MODBUS PLUS – peer-to-peer protocol, 1Mbit/s.
  • Modbus ASCII – serial ASCII protocol of the Master/Slave type

We basically use following functions in modbus protocol:

  1. Read Holding Registers (Read Output Registers)
  2. Read Input Registers

The Modbus communication protocol can be used for the following devices/ companys :
Honeywell, Thermax, Hypel, Tronic Control, heat meters and many others.

1. Modbus TCP/IP (Transmission control protocol):

We know that in modbus communication mostly use protocol is TCP/IP hence in this article we will see basic frame format of TCP/IP Protocol and it’s common settings:

Modbus TCP/IP frame format:

Modbus TCP/IP frame format:

The following is an example of a Modbus RTU request for obtaining the AI value of the input holding registers
from registers # 30108 to 30110 with the address of the device 5.

The following is an example of a Modbus RTU request for obtaining the AI value of the input holding registers
from registers # 30108 to 30110 with the address of the device 5.
05 04 006B 0003 7687

05Device address SlaveID (5)
04Input Function Code
006BAddress of the first register (30108-30001 = 107 = 6B hex)
0003The number of required registers (reading 3 registers from 30108 to 30110)
6543Checksum CRC
Modbus tcp/ip frame example

Transaction ID: Defiend by the Master to uniquely identify each slave request.

Protocol ID: Defiend by the Master, will mostly 00 00, which corresponds to the Modbus protocol.

Length: defined by the Master, identifying the number of bytes in the message, also defined addresses length from start to end.

Unit ID: 1 byte is set to Master. It is defined by the Slave device to uniquely identify the Slave device.

MODBUS TCP/IP basic settings:

Step 1st: Open modnus Go to connect bar and click on it.
Step 2nd: Enter the provided ip of your device
Step 3rd: (We know that in an Ethernet network, the device address is its IP address. following point must be remember 1. you should need to your system in same subnet mask an d in same class. )
Select the TCP Port: 502

I am Mr. Sachin pagar Embedded system engineer, the founder of Pythonslearning, a Passionate Educational Blogger and Author, who love to share the informative content on educational resources.

sachin Pagar

I am Mr. Sachin pagar Embedded system engineer, the founder of Pythonslearning, a Passionate Educational Blogger and Author, who love to share the informative content on educational resources.

Leave a Reply