Modbus communication examples - DMP5 - DMP6 - DMP7 - DMP8 - DMPX

DMP Series User Guide

Document code
M212357EN
Revision
E
Language
English
Product
DMP5
DMP6
DMP7
DMP8
DMPX
Document type
User guide

Reading dew point temperature value

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

Measurement values returned by the device change depending on ambient conditions and/or device settings.

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
0xF0 Probe address 0xF0 Probe address
0x03 Function (Read Holding Registers) 0x03 Function (Read Holding Registers)
0x00 Register address 0x04 Number of data bytes
0x06 0xFD Value of first register (least significant word)
0x00 Number of 16-bit registers to read (2) 0xF9
0x02 0x41 Value of second register (most significant word)
0x31 Modbus RTU checksum 0x72
0x2B 0x4B Modbus RTU checksum
(silence for 3.5 bytes) End of Modbus RTU frame 0x14
(silence for 3.5 bytes) End of Modbus RTU frame
Communication description
Register address 7 (1-based Modbus documentation format) = 0x0006 (0-based format 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 0x4172FDF9, which is binary32 representation of 15.187 (°C Td).

Writing pressure compensation 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
0xF0 Probe address 0xF0 Probe address
0x10 Function (Write Multiple Registers) 0x10 Function (Write Multiple Registers)
0x03 Register address 0x03 Register address
0x00 0x00
0x00 Number of registers to write (2) 0x00 Number of 16-bit registers written (2)
0x02 0x02
0x04 Number of data bytes 0x54 Modbus RTU checksum
0x6E Value for first register (least significant word) 0xAD
0x14
0x44 Value for second register (least significant word) (silence for 3.5 bytes) End of Modbus RTU frame
0x75
0x4E Modbus RTU checksum

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 out-of-range values).

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

0xAB
(silence for 3.5 bytes) End of Modbus RTU frame
Communication description
Register address 769 (1-based Modbus documentation format) = 0x0300 (0-based format 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 0x44756E14 = 981.72 (hPa)