Integrating Modbus Communication with the WattsOn-Mark II

The WattsOn-Mark II supports Modbus RTU and Modbus/TCP communication over RS-485 (-M1) or Ethernet (-E4). This article explains how to verify that Modbus communication is working correctly and how to begin polling measurement registers.

While Modbus/TCP uses a slightly different packet structure compared to Modbus RTU, the underlying register addressing methodology and data interpretation remain the same. The examples in this article show the raw request and response frames for Modbus RTU over RS-485, but the same registers and data formats apply when communicating via Modbus/TCP.

1. Confirming Modbus Communication Using Debug Registers

The easiest way to confirm that your Modbus configuration is correct is to read the debug registers provided in the meter. These registers return known values so you can confirm that both communication and data interpretation are working correctly.

The debug registers are documented in the manual:

WattsOn-Mark II Manual (see page 45)

These registers allow you to verify:

  • The Modbus slave address
  • Serial communication parameters
  • Your software's interpretation of 16-bit integers
  • Your software's interpretation of 32-bit integers
  • Your software's interpretation of 32-bit floating point values

2. Register Data Formats

The WattsOn-Mark II provides debug registers for several common Modbus data formats.

  • 0x510 – 16-bit integer
  • 0x511 – 32-bit integer (two registers)
  • 0x513 – 32-bit IEEE floating point value (two registers)

Important notes:

  • The WattsOn-Mark II uses Big Endian word order (MSW/LSW) by default.
  • Multi-register values must be interpreted accordingly.
  • Floating point values follow the IEEE-754 standard.

3. Example Queries

The following examples assume a Modbus slave address of 1 and function code 03 (Read Holding Registers).

Debug register 0x510 (16-bit integer)

Query
01 03 05 10 00 01 85 03

Response
01 03 02 30 39 6C 56

Returned value:
0x3039 = 12345

If your system returns 12345, communication and 16-bit register interpretation are working correctly.

Debug register 0x511 (32-bit integer)

Query
01 03 05 11 00 02 94 C2

Response
01 03 04 00 12 D6 87 44 34

Returned value:
0x0012D687 = 1234567

This value is composed of two 16-bit registers:

  • Register 1 (MSW): 0x0012
  • Register 2 (LSW): 0xD687

Combined using Big Endian word order.

Debug register 0x513 (32-bit float)

Query
01 03 05 13 00 02 35 02

Response
01 03 04 44 9A 52 25 32 57

Returned value:
0x449A5225 = 1234.567

The returned value represents an IEEE-754 32-bit floating point number using Big Endian byte order (ABCD).

4. Polling Actual Measurement Registers

Once you have successfully read the debug registers, Modbus communication with the meter has been verified. You can then modify your query to read the actual measurement registers.

To do this:

  1. Locate the desired measurement in the manual.
  2. Note the register offset listed.
  3. Send a Modbus Read Holding Registers (03) command using that address.
  4. Interpret the returned data according to the specified data type.

Typical measurements available include:

  • Voltage
  • Current
  • Power
  • Energy
  • Power factor
  • Frequency

Each measurement definition specifies the register offset, number of registers, and data format.

5. Common Integration Tips

  • Ensure the slave address, baud rate, parity, and stop bits match the meter configuration.
  • Confirm your software uses Big Endian word order.
  • Verify that multi-register values are combined correctly before conversion.
  • If values appear incorrect, confirm that your Modbus library is not automatically swapping register order.

6. Recommended Integration Workflow

  1. Configure serial communication parameters.
  2. Read register 0x510 to confirm 16-bit operation.
  3. Read register 0x511 to confirm 32-bit integer interpretation.
  4. Read register 0x513 to confirm floating point decoding.
  5. Begin polling the measurement registers required by your application.

Following this process confirms both communication and data interpretation before integrating the WattsOn-Mark II into your monitoring or control system.


Resources:

  • QModMaster: Free Modbus master software capable of displaying raw request and response frame data. This tool can be useful for verifying communication and inspecting the exact packets being sent to and received from the meter.

    https://sourceforge.net/projects/qmodmaster/

    Note: In QModMaster, ensure that Options > Settings > Base Addr is set to 0 and that the start address format is set to Hex. These settings align with the register addressing used in the WattsOn-Mark II manual.