I'm trying to read register 800, Serial [char(6)] via Modbus. I'm not sure what this looks like, but I get "Serial: b'508c'" from the following code. Does this look right to you?
from pymodbus.constants import Defaults
from pymodbus.constants import Endian
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
from pymodbus.payload import BinaryPayloadDecoder
Defaults.Timeout = 25
Defaults.Retries = 5
client = ModbusClient('10.186.47.212', port='502')
result = client.read_input_registers(800, 2)
decoder = BinaryPayloadDecoder.fromRegisters \
(result.registers, byteorder=Endian.Big)
Serial = decoder.decode_string(size=6)
print("Serial: ",Serial)
Thank you.