bg

Reading data from MODBUS Sunspec-compatible inverters and power meters

Problem scenario:

My goal is to read data from a power inverter with MODBUS RTU or MODBUS/TCP.

Requirements:

  • Advanced Serial Data Logger Professional, Enterprise, or a trial version for MODBUS RTU.
  • Advanced TCP/IP Data Logger Professional, Enterprise, or a trial version for MODBUS/TCP.
  • Sunspec-compatible power meter with MODBUS RTU or MODBUS TCP. These devices store the full list of available value in the specific registers. All applications can retrieve this list and start reading data.

It is assumed that:

You have configured the communication settings on the device:

  • MODBUS TCP - IP address, Subnet, Gateway. You must assign a static IP address for the device.
  • MODBUS RTU - baud rate and the number of data bits.

Solution:

1. Create a new configuration from the main window using the "Green Plus" button. Then configure the connection with your Sunspec-compatible device (fig. 1). This example shows the connection settings for MODBUS TCP. If your device uses MODBUS RTU, look here.

IP connection settings
Fig. 1: IP connection settings

2. Click "OK" and save the connection settings. Now, the program saved and applied the communication settings, and you can continue configuring data logging.

3. Go to your configuration setting again (Main window → Options → Manage configurations → Modules → Query Parser Filter). Select the "MODBUS TCP" or "MODBUS RTU" plugin from lists. Then click the "Setup" button.

MODBUS plugin selection
Fig. 2: Selecting the MODBUS plugin

4. Click "Action → Add Sunspec compatible device" (fig. 3).

Adding a MODBUS device
Fig. 3: Adding a MODBUS device

5. Specify the device address (fig. 4). MODBUS TCP devices generally use the address "1".

Entering a device address
Fig. 4: Entering a device address

6. The logger will start reading device information. If the operation completes successfully, you can select the necessary MODBUS registers from the showed list (fig. 5).

Registers map
Fig. 5: Registers map

7. Adjust the polling interval as you want in the "Polling Interval" field.

8. Click the "OK" button. The program adds one or more requests to the queue (fig. 6). The number of requests depends on the values quantity and their location in the device memory.

MODBUS queue
Fig. 6: MODBUS queue

9. Enable the "Export data for all requests at once" option (fig. 6).

Notes

How can I poll multiple MODBUS RTU devices?

RS-485 or RS-232: if you connect several devices to the RS-485 network, you may specify several addresses like 1,2,3,4,5 in the "Device address" field.

Can I poll multiple MODBUS TCP devices?

Usually, all devices have the device address "1" and a different IP address. Therefore, you should add multiple IP address in the IP connection settings (fig. 1).

Known compatible Sunspec devices

This list is not complete, and we add new devices to it periodically:

SMA Solar Technology SUNNY BOY / SUNNY TRIPOWER
SolarEdge Inverters
KOSTAL PIKO IQ / PLENTICORE plus
Fronius
Huawei SUN2000
Ginlong Solis Inverters
Delta Electronics, Inc. Inverters
Delta Products
Schneider Electric Conext
ABB TRIO, US
Carlo Gavazzi VMU

Related articles: Reading data from MODBUS Sunspec-compatible inverters and power meters

MODBUS RTU, MODBUS ASCII, MODBUS/TCP

IEC 62056-21