Modbus Rtu Examples - E+E Elektronik TES201 User Manual

Room sensor for temperature
Hide thumbs Also See for TES201:
Table of Contents

Advertisement

5.2.8.

ModBus RTU Examples

The TES201 Modbus address is 45 [0x2D].
Please refer to
MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1b3, chapter 6:
www.modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf
E+E Application Note Modbus AN0103 (available at www.epluse.com/tes201)
Read the temperature (FLOAT32) T = 23.4400005340576171875 °C from register address 0x3EA:
Master (e.g. PLC)
Request [Hex]:
Modbus
address
2D
Response [Hex]:
Modbus
address
2D
Fig. 3
Example temperature query
Decoding of floating point values:
Floating point values are stored according to IEEE754. The byte pairs 1, 2 and 3, 4 are transformed as follows
(numbers taken from T reading Modbus request/response example above):
Modbus response [Hex]
Byte 3
85
MMMMMMMM
Tab. 7
Modbus response
IEEE754
Byte 1
41
0100 0001
SEEE EEEE
Decimal value: 23.4400005340576171875
Tab. 8
Data representation according to IEEE754
Function
Starting
Starting
code
address Hi
address Lo
03
03
Function
Byte
Register 1
code
count
value Hi
03
04
Byte 4
1F
MMMMMMMM
Byte 2
BB
1011 1011
EMMM MMMM
Qty. of
Qty. of
registers Hi
registers Lo
EA
00
02
Register 1
Register 2
value Lo
value Hi
85
1F
41
Byte 1
41
SEEEEEEE
Byte 3
85
1000 0101
MMMM MMMM
User Manual TES201
TES201
CRC
12
53
Register 2
CRC
value Lo
BB
7F
18
Byte 2
BB
EMMMMMMM
Byte 4
1F
0001 1111
MMMM MMMM
Room Sensor for Temperature | 16

Advertisement

Table of Contents
loading

Table of Contents