I am banging my head against the wall trying to get somewhere with modbus.
I have an inverter (Schneider XW+) and a communication "combox" that acts as the modbus tcp bridge to the inverter. Inverter is address 10.
Here is my code:
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
client = ModbusClient('10.0.0.14', 502)
client.connect()
result = client.read_holding_registers(10,10)
print(result)
##client.close()
Modbus Error: [Input/Output] Modbus Error: [Invalid Message] Incomplete message received, expected at least 8 bytes (0 received)
>>> client.is_socket_open()
False
>>> client.connect()
True
>>> client.is_socket_open()
True
>>> client.read_holding_registers(10,10)
ModbusIOException()
>>>
It said it connected, it didn't work if the address wasn't 10, I have some confidence some communication was happening.
Where do I go from here?