Modbus Rtu Telegram Examples; Modbus Telegram Overview; Read Holding Registers, 0X03; Read Input Registers, 0X04 - Grundfos CIU 202 Functional Profile And User Manual

Modbus for seg autoadapt, modbus rtu, 3g/4g cellular, ethernet for modbus tcp
Table of Contents

Advertisement

13. Modbus RTU telegram examples

The Modbus data model states that registers
numbered X are addressed in telegrams as X - 1, for
example register 00104 (setpoint) is addressed as
00103 in a Modbus telegram.
Note that CRC fields are not shown in the following examples.

13.1 Modbus telegram overview

The maximum size of a Modbus RTU telegram is 256 bytes.
Telegrams must be separated by a silent interval of at least 3.5
character times.
The standard Modbus RTU telegram format is shown in the table
below.
Slave
Function
address
code
1 byte
1 byte
A telegram starts with the slave address occupying one byte.
Then comes a variable-size data field. For each telegram, a CRC
is calculated and appended to the telegram (two bytes total). All
bytes in the telegram, except for the CRC itself, are included in
the check.
Note that the CRC bytes are not shown in the examples in the
following sections.

13.2 Read holding registers, 0x03

This function is used for reading holding registers from the slave.
The request telegram specifies the starting address (the address
of the first register to be read) and the number of holding
registers to read. In the telegram, register addresses start from
zero, meaning that registers numbered 0-16 are addressed as 0-
15.
Example of request from master to slave
Field
Address
Function code
Start address HI
Start address LO
Quantity HI
Quantity LO
In the request, the slave with address 1 is asked to deliver three
contiguous registers starting from address 0x006b: 107, meaning
register 108.
Example of response from slave to master
Field
Address
Function code
Byte count
Register 108 HI
Register 108 LO
Register 109 HI
Register 109 LO
Register 110 HI
Register 110 LO
In the response, the byte count is six since there are three
registers of two bytes. All three registers hold the value of
0x0001.
Data
CRC
0 to 252 bytes
2 bytes
Value
0x01
0x03
0x00
0x6B
0x00
0x03
Value
0x01
0x03
0x06
0x00
0x01
0x00
0x01
0x00
0x01

13.3 Read input registers, 0x04

This function is used for reading input registers from the slave.
Input registers are read-only registers by definition. The request
telegram specifies the starting address, that is the address of the
first register to be read, and the number of holding registers to
read. In the telegram, register addresses start from zero,
meaning that registers numbered 0-16 are addressed as 0-15.
Example of request from master to slave
Field
Address
Function code
Start address HI
Start address LO
Quantity HI
Quantity LO
In the request, the slave with address 1 is asked to deliver three
contiguous registers starting from address 0x1010: 4112,
meaning register 4113.
Example of response from slave to master
Field
Address
Function code
Byte count
Register 4113 HI
Register 4113 LO
Register 4114 HI
Register 4114 LO
Register 4115 HI
Register 4115 LO
In the response, the byte count is six since there are three
registers of two bytes. All three registers hold the value of
0x2222.

13.4 Write single register, 0x06

This function is used for writing a single holding register in the
slave. The request telegram specifies the address of the register
that is to be written. Register addresses start from zero, meaning
that a register numbered 10 is addressed as 9.
The normal response is an echo of the request, indicating that the
value was written.
Example of request from master to slave
Field
Address
Function code
Address HI
Address LO
Value HI
Value LO
In the request, the slave with address 1 is asked to write the
value of 0xAFFE to the register at address 0x1000.
Value
0x01
0x04
0x10
0x10
0x00
0x03
Value
0x01
0x04
0x06
0x22
0x22
0x22
0x22
0x22
0x22
Value
0x01
0x06
0x10
0x00
0xAF
0xFE
43

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ciu 262Ciu 502

Table of Contents