User guide
Programming Manual
Page 45 March 2014
MODBUS INTERFACE
A subset of the standard Modbus commands is implemented to provide access into the data and status of the B3000 Monitor.
This feature is available on the B3000 Advanced models only. The following Modbus commands are implemented:
Command Description
01 Read Coils
03 Read Holding Registers
05 Force Single Coil
Table 7: Modbus commands
Type Bits Bytes Modbus Registers
Long Integer 32 4 2
Single Precision IEEE754 32 4 2
Table 8: Available data formats
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 manufactures, 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 doesn’t matter which order the words are sent, as long as the receiving device
knows which way to expect it. Since it’s a common problem between devices regarding word order, 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 manufactures.
If, however, 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 B3000 actually provides two Modbus Register maps to
accommodate both formats. This is useful in applications where the Modbus Master cannot be configured for endianness.