A.5 Modbus communication example
Reading CO
2
concentration value
The device address used in the following example is 240 (F0
hex
). The values
returned by the device differ depending on the ambient conditions. Your device
might not return exactly the same values.
Request
Response
Bytes on the line
Description
Bytes on the line
Description
(silence for 3.5 bytes)
Start of Modbus RTU
frame
(silence for 3.5 bytes)
Start of Modbus RTU
frame
F0
hex
Transmitter address
F0
hex
Transmitter address
03
hex
Function (Read
Holding Registers)
03
hex
Function (Read
Holding Registers)
00
hex
Register address
04
hex
Number of data bytes
00
hex
E6
hex
Value of first register
(least significant
word)
00
hex
Number of 16-bit
registers to read (2)
3A
hex
02
hex
44
hex
Value of second
register (most
significant word)
D1
hex
Modbus RTU
checksum
17
hex
2A
hex
7E
hex
Modbus RTU
checksum
(silence for 3.5 bytes)
End of Modbus RTU
frame
B7
hex
(silence for 3.5 bytes)
End of Modbus RTU
frame
Communication description
Register number 1 (1-based Modbus register number) = address 0000
hex
(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
4417E63A
hex
, which is binary32 representation of 607.6 (ppm CO
2
).
Appendix A – Modbus reference
53