15
User Manual MOP301 Digital Moisture in Oil Immersion Probe
5.6 Modbus RTU Examples
The MOP301’s Modbus address is 70 [0x46].
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
Read the temperature (FLOAT32) T = 26.66048812866211 °C from register address 0x3EA
:
Master (e.g. PLC)
MOP301
Request [Hex]:
Modbus
address
Function
code
Starting
address Hi
Starting
address Lo
Qty. of
registers Hi
Qty. of
registers Lo
CRC
46
03
03
EA
00
02
EA
CC
Response [Hex]:
Modbus
address
Function
code
Byte
count
Register 1
value Hi
Register 1
value Lo
Register 2
value Hi
Register 2
value Lo
CRC
46
03
04
48
AE
41
D5
4A
B9
Floating point values are decoded according to IEEE754, refer to the example at the end of this chapter.
Read register from custom modbus map
address 0x0BB8-0x0BB9, unconfigured
Request [Hex]:
Modbus
address
Function
code
Starting
address Hi
Starting
address Lo
Qty. of
registers Hi
Qty. of
registers Lo
CRC
46
03
0B
B8
00
02
49
7D
Response [Hex]:
Modbus
address
Function
code
Byte
count
Register 1
value Hi
Register 1
value Lo
Register 2
value Hi
Register 2
value Lo
CRC
46
03
04
FF
FF
FF
FF
CC
A3
Mapping custom Modbus map
assign T (register address 0xEA) and aw (register address 0x46E) to the custom Modbus map, starting
address 0xBB8
Request [Hex]:
Modbus
address
Function
code
Starting
address Hi
Starting
address Lo
Qty. of
registers Hi
Qty. of
registers Lo
Byte
count
46
10
17
70
00
02
04
Register 1
value Hi
Register 1
value Lo
Register 2
value Hi
Register 2
value Lo
CRC
03
EA
04
6E
F2
52
T [°C]
aw
Response [Hex]:
Modbus
address
Function
code
Byte
count
Register 1
value Hi
Register 1
value Lo
Register 2
value Hi
Register 2
value Lo
CRC
46
10
17
70
00
02
--
4A
D0