Ran into a problem with the pymodbus library

70 views Asked by At

Name: pymodbus Version: 3.6.3
Summary: A fully featured modbus protocol stack in python Home-page:
Author: Galen Collins, Jan Iversen
Author-email:
License: BSD-3-Clause

The instruction I sent was:01 03 fa 0c 00 01 74 d1 should respond:01 03 00 02 13 8C E8 9F The runner finds that the sending is correct, but the data of the response is missing a bit The program sends instructions: b'\x01\x03\xfa\x0c\x00\x01t\xd1'(01 03 fa 0c 00 01 74 d1),Program response:b'\x01\x03\x00\x02\x13\x8c\xe8'(01 03 00 02 13 8C E8) I've noticed that when it counts the number of bits of response data, it's one bit less. The correct one should be 8 bits, and it calculates 7 bits Eventually returned:ModbusIOException('[Input/Output] No Response received from the remote slave/Unable to decode response') I'm using serial access, and I make sure that all parameters are correct, such as baud rate. How can I fix it

self.client = ModbusSerialClient(port=port, baudrate=baudrate, timeout=timeout)
   self.client.connect()
    result = self.client.read_holding_registers(slave=self.slave, address=starting_address)
0

There are 0 answers