Skip to main content

Note about notational conventions: Numbers below are always decimal (base 10) unless there is a leading “0x”, which denotes a hexadecimal (base 16) number.

For historical reasons, the Modbus Protocol specifies several different types of registers: holding, input and coil registers. To simplify the requirements on the part of the Modbus Master or Data Logger software, the WattNode Modbus meter makes its measurment data and setup parameters available via Modbus Holding Registers or Input Registers. There are no Coils or Discrete Inputs since these were legacy Modbus terms more applicable to Programmable Logic Controllers (PLCs) used for industrial manufacturing automation. The WattNode Input or Holding Registers allow reading and writing data and configuration parameters by way of the following four Modbus commands, which are a smaller subset of the array of commands described in the Modbus.org documents:

  • 03 (0x03) Read Multiple Holding Registers
  • 04 (0x04) Read Multiple Input Registers
  • 16 (0x10) Write Multiple Holding Registers
  • 06 (0x06) Read Single Holding Register

Note: If all your software needs is to acquire WattNode data, only function code 04 need be implemented for reading the WattNode registers.

Although the Read Single Holding Register command is supported by the WattNode for compatibility with older Modbus Master software, for the sake of simplicity, it is not really necessary since the Modbus Master software can just as easily issue a Read Multiple Holding Registers command using a register count of one. For downward compatibility with legacy Modbus Master software, the Input Registers are just another way of reading the same information as the Holding registers.

The legacy Modbus Protocol only supports 16-bit (2 byte) signed or unsigned integer registers. In order to provide higher resolution data with wider dynamic range, most Modbus devices support combining two successive 16-bit registers into one 32-bit (4 byte) value. For maximum flexibility and compatibility with most data logger and SCADA software applications, the WattNode meter supports reading back energy values as 32-bit integer or IEEE-754 single-precision floating point numbers. Voltage, instantaneous power and frequency data can be read back as either 16-bit integers or floats.

TBD – Include an example of single-precision floating point register values as well as 32-bit signed and unsigned integers.