Modbus Query - wtw DIQ/S 182-MOD System Operating Manual

Modular measuring system for 2 digital sensors with modbus rtu/rs 485 output
Table of Contents

Advertisement

System 182
Determining the first
register to be read
Determining the number
of registers to be read
Example of a

Modbus query

and Modbus response
ba75504e07
04/2012
7.5
Modbus query
With each query of sensor data via the Modbus protocol, a block of
consecutive registers is read (up to all of the 16 registers).
For a query of sensor data, determine the first register and the number
of registers to be read (1 ... 16).
The first register to be read depends on the sensor number (Sxx) [1 or
2] and the number of the sensor register (R) [1 ... 8]:
(Sxx - 1)] * 8 + R.
Example: Determine the first register with data for the sensor S02:
[(2 - 1) * 8] + 1 = 9
The number of registers to be read is maximum 16.
Example: Read all data of X sensors
Number of sensors (X)
1
2
Query of all sensor information of the sensor S02:
Byte
Value
Information
1
01h
Modbus address of
the DIQ/S 182-MOD
2
04h
Function
3
00h
Start address HI
4
08h
Start address LO
5
00h
Number of HI registers
6
08h
Number of LO
registers
7
70h
CRC (HI)
8
0Eh
CRC (LO)
Number of registers
8
16
Modbus query
Meaning of the value
01h --> 1
04h --> 4
Read Input Register
(see section 7.4.1)
0008h --> 8
Start with register 9
(Modbus counting method)
0008h --> 8
8 registers
Checksum (CRC)
Modbus connection
7 - 11

Advertisement

Table of Contents
loading

Table of Contents