-
Hi, PyModbus version: 3.0.0.5dev I've been trying to verify that I can at least connect to an Arduino Uno acting as a Modbus RTU server via a USB-serial cable with an async client, but I had issues with opening the COM port, so I've switched to the sync version. I can open the serial port now, but I don't see any data coming in and I get the following error: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response I've verified with Modbus Poll that the Arduino Uno does act as a server - I can read from and write to it with MP. I'd like to be able to do the same with PyModbus. Any ideas on what I can check or change are welcome. I've checked the baudrate, bytesize, parity, stopbits, and port multiple times. My code is as follows:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Your com port looks wrong, it is normally something like /dev/com51. Apart from that you can activate debug and get more information. |
Beta Was this translation helpful? Give feedback.
-
are you sure the slave address is correct ? you can try with slave=0 which is broadcast. |
Beta Was this translation helpful? Give feedback.
-
Okay, the issue was actually very simple (and silly) - The slave address is indeed 42, but putting 0x42 -> 66 in base 10, so I was trying to reach the wrong address. It should be just an int - number representing the slave ID. |
Beta Was this translation helpful? Give feedback.
Okay, the issue was actually very simple (and silly) -
The slave address is indeed 42, but putting 0x42 -> 66 in base 10, so I was trying to reach the wrong address. It should be just an int - number representing the slave ID.