Write data ower Modbus tcp to HUAWEI SUN2000 KTL error

509 views Asked by At

I would like to change the PV inverter settings via Modbus TCP.

the system reads correctly when I write I get an error!!!

I use Raspberry PI and Python.

Modbus address is 40125 and data is RW (readable and writable, U16 unsigned integer (16 bits))

from pymodbus.client import ModbusTcpClient as ModbusClient


client = ModbusClient('192.168.1.116', port=502)

client.connect()


if client.connect():


    APPD = client.read_holding_registers(40125, 1, 1)
    print (APPD.registers[0])


    replay = client.write_registers(40125,500,1)
    
    print(replay)

Read: 10000

Write: Exception Response(144, 16, IllegalAddress)

What could be wrong?

0

There are 0 answers