MODBUS INTERFACE
A subset of the standard Modbus commands is implemented to provide access into the data and status of the ER-500
monitor. The following Modbus commands are implemented:
Command Description
01 Read Coils
03 Read Holding Registers
05 Force Single Coil
Type Bits Bytes Modbus Registers
Long Integer
32 4 2
Single Precision IEEE754
32 4 2
Modbus Register / Word Ordering
Each Modbus holding register represents a 16-bit integer value (2 bytes). The official Modbus standard defines Modbus as a
‘big-endian’ protocol where the most significant byte of a 16-bit value is sent before the least significant byte. For example,
the 16-bit hex value of ‘1234’ is transferred as ‘12’ ‘34’.
Beyond 16-bit values, the protocol itself does not specify how 32-bit (or larger) numbers that span over multiple registers
should be handled. It is very common to transfer 32-bit values as pairs of two consecutive 16-bit registers in little-endian word
order. For example, the 32-bit hex value of ‘12345678’ is transferred as ‘56’ ‘78’ ‘12’ ‘34’. Notice the Register Bytes are still sent in
big-endian order per the Modbus protocol, but the Registers are sent in little-endian order.
Other manufacturers store and transfer the Modbus Registers in big-endian word order. For example, the 32-bit hex value
of ‘12345678’ is transferred as ‘12’ ‘34’ ‘56’ ‘78’. It does not matter which order the words are sent, as long as the receiving
device knows which way to expect it. Since word order is a common problem between devices, many Modbus master
devices have a configuration setting for interpreting data (over multiple registers) as ‘little-endian’ or ‘big-endian’ word order.
This is also referred to as swapped or word swapped values and allows the master device to work with slave devices from
different manufacturers.
If the endianness is not a configurable option within the Modbus master device, it’s important to make sure it matches
the slave endianess for proper data interpretation. The ER-500 monitor actually provides two Modbus register maps to
accommodate both formats. This is useful in applications where the Modbus master cannot be configured for endianness.
Register Mappings
Data Component
Name
MODBUS Registers
Available Units
Long Integer
Format
Single Precision
Floating Point Format
Spare 40100…40101 40200…40201 —
Flow Rate 40102…40103 40202…40203
Gallons, Liters, MGallons, Cubic Feet, Cubic Meters, Acre
Feet, Oil Barrel, Liquid Barrel, Feet, Meters, Lb, Kg, BTU,
MBTU, MMBTU, TON
Per
Second, Minute, Hour, Day
Spare 40104…40105 40204…40205
Positive Totalizer 40106…40107 40206…40207
Grand Total Totalizer 40108…40109 40208…40209
Battery Voltage 40110…40111 40210…40211 x.xx
Spare 40112…40113 40212…40213 —
For reference: If the ER-500 totalizer = 12345678 hex
Register 40106 would contain 5678 hex (Word Low)
Register 40107 would contain 1234 hex (Word High)
Modbus Interface
DSY-PM-00028-EN-02 Page 27 February 2017