Page 26
13. MODBUS RTU
Enersol MFLR09 comes with optional MODBUS RTU over serial line capabilities for
IOT applications.
Up to 32 device can be connected to a single shielded co-axial cable. There is usually
one master in the bus. MFLR09 work as slave device to respond to the master.
Holding register
: Holding register, as the name suggests, is a 16-bit register that holds
the data value.
Enersol MODBUS data is in float which is 32 bit long. Therefore, to
store a float value we need 2 holding registers.
The MODBUS address mapping of the Enersol meter provides the
various available holding registers and corresponding register
numbers.
Read Holding register:
Use the standard MODBUS command “Read Holding
register” to read any value from the enersol meter.
Slave ID
: It can be of any value ranging from 1 to 247.
Function Code
: As Per the MODBUS standard, the function code for the “Read Holding
Register” is 03 (in Hexadecimal)
Start Address:
This is a 32-bit value. Send as MSB and LSB. The formula for start
address is
Start Address = Register Number -1
For eg. In enersol meters case, wh is at 3900, so start address of wh is
given by
Start address of wh = 3900 – 1 = 3899 (0F3B in hexadecimal)
No of registers:
This is a 32-bit value. Let us only want to read wh register. As we
know enersol meters gives data in 32-bit float Format but the holding
register is 16-bit long, thus we need to read 2 holding registers
in hexadecimal (16-bit format) 2 can be written as 0002
Byte 0
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Slave ID
Function
Code
Most
significan
t byte of
“Start
Address
Least
significant
byte of
“Start
Address”
Most
significant
byte of
“No of
registers
required”
Least
significant
“No of
registers
required”
Least
significant
byte of
MODBUS
CRC
Most
Significan
t byte of
MODBUS
CRC