Modbus communication examples - HMD110 - HMD112 - HMS110 - HMS112 - HMW110 - HMW112 - TMD110 - TMI110 - TMW110

HMDW110 with TMI110 User Guide

Document code
M211726EN
Revision
F
Language
English
Product
HMD110
HMD112
HMS110
HMS112
HMW110
HMW112
TMD110
TMI110
TMW110
Document type
User guide

Reading relative humidity value

Device address used in the following examples is 240 (F0hex).

The values returned by the device differ depending on the ambient conditions and/or device settings. Your device might not return exactly same values.

Request Response
Bytes on the line (hexadecimal) Description Bytes on the line (hexadecimal) Description
(silence for 3.5 bytes) Start of Modbus RTU frame (silence for 3.5 bytes) Start of Modbus RTU frame
F0hex Transmitter address F0hex Transmitter address
03hex Function (Read Holding Registers) 03hex Function (Read Holding Registers)
00hex Register address 04hex Number of data bytes
00hex 7Ahex Value of first register (least significant word)
00hex Number of 16-bit registers to read (2) E1hex
02hex 41hex Value of second register (most significant word)
D1hex Modbus RTU checksum F4hex
2Ahex 62hex Modbus RTU checksum
(silence for 3.5 bytes) End of Modbus RTU frame 05hex
(silence for 3.5 bytes) End of Modbus RTU frame
Communication description
Register number 1 (1-based Modbus register number) = address 0000hex (0-based address used in actual communication).
Data format Two 16-bit Modbus registers interpreted as IEEE 754 binary32 floating point value, least significant word first.
Returned value 41F47AE1hex, which is binary32 representation of 30.56 (%RH).

Writing filtering factor value

Request Response
Bytes on the line (hexadecimal) Description Bytes on the line (hexadecimal) Description
(silence for 3.5 bytes) Start of Modbus RTU frame (silence for 3.5 bytes) Start of Modbus RTU frame
F0hex Transmitter address F0hex Transmitter address
10hex Function (Write Multiple Registers) 10hex Function (Write Multiple Registers)
03hex Register address 03hex Register address
10hex 10hex
00hex Number of registers to write (2) 00hex Number of 16-bit registers written (2)
02hex 02hex
04hex Number of data bytes 55hex Modbus RTU checksum
CChex Value for the first register (least significant word) 68hex
CDhex (silence for 3.5 bytes) End of Modbus RTU frame
3Ehex Value for the second register (most significant word)

The response to a write function informs that the function was correctly received by the device. It does not guarantee that the written value was accepted by the device (for example, in case of out-of-range values).

To verify that the value was really accepted by the device, read the register value after writing.

4Chex
5Ehex Modbus RTU checksum
96hex
(silence for 3.5 bytes) End of Modbus RTU frame
Communication description
Register number 785 (1-based Modbus register number) = address 0310hex (0-based address used in actual communication).
Data format Two 16-bit Modbus registers interpreted as IEEE 754 binary32 floating point value, least significant word first.
Value to write 0.2, in binary32 format 3E4CCCCDhex.