-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response #328
Comments
Looks like your response is having an extra byte (0x0) at the beginning .May be you could try different baudrate if possible? |
I`ve tried to decrease and increase the baud rate, the extra byte does not shows up again, but I got another error: |
There is no response being received as per your logs. Are you sure you are using the correct baudrate/stop bit/parity etc ? |
@marcoprestes did you find a solution for this problem |
I think @mpf82 's comment above mentions that this was an issue in version 2.1.0 and was fixed in 2.2.0. Haven't tried it myself but its confirmed in that issue's thread |
Versions
Pymodbus Specific
Description
Hi,
I
m trying to perform some basic holding registers readings, but I
m always getting the same error: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode responseI`ve trying to find solutions for quite some time, but nothing seems to work.
Code and Logs
Code:
import logging
from pymodbus.client.sync import ModbusSerialClient as ModbusClient #initialize a serial RTU client instance
client= ModbusClient(method = "RTU", port = "COM6", stopbits = 1, bytesize = 8, parity = 'N', baudrate = 9600)
connection = client.connect()
FORMAT = ('%(asctime)-15s %(threadName)-15s'
' %(levelname)-8s %(module)-15s:%(lineno)-8s %(message)s')
logging.basicConfig(format=FORMAT)
log = logging.getLogger()
log.setLevel(logging.DEBUG)
def processResponse(result):
log.debug(result)
rr = client.read_holding_registers(11, 2, unit=0x01)
log.debug(rr)
rr.addCallback(processResponse)
client.close()
Logs:
2018-09-16 10:55:23,624 MainThread DEBUG transaction :107 Current transaction state - IDLE
2018-09-16 10:55:23,625 MainThread DEBUG transaction :111 Running transaction 1
2018-09-16 10:55:23,625 MainThread DEBUG transaction :201 SEND: 0x1 0x3 0x0 0xb 0x0 0x2 0xb5 0xc9
2018-09-16 10:55:23,625 MainThread DEBUG sync :74 New Transaction state 'SENDING'
2018-09-16 10:55:23,626 MainThread DEBUG transaction :204 Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2018-09-16 10:55:23,655 MainThread DEBUG transaction :279 Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2018-09-16 10:55:23,655 MainThread DEBUG transaction :209 RECV: 0x0 0x1 0x3 0x4 0x0 0xed 0x1 0x29 0xaa
2018-09-16 10:55:23,655 MainThread DEBUG transaction :420 Getting transaction 1
2018-09-16 10:55:23,655 MainThread DEBUG transaction :175 Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2018-09-16 10:55:23,656 MainThread DEBUG Teste :25 Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
The text was updated successfully, but these errors were encountered: