Updating some 2018 code to Ver 3.X. Not finding example that helps. #1505
-
I'm trying to get a small pyModbus test script to run without errors, but I'm not finding example code that is helpful. Working with 32-input RS485 modbus modules. Everything works with MinimalModbus, and an Arduino test, but prefer pyModbus for the slaveID selection in the read line. Test code:
The last error was: I think this page https://pymodbus.readthedocs.io/en/latest/source/library/pymodbus.client.html#serial-rs-485-transport that may have helped is gone. Any syntax advice greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
your code is wrong, the variable read does not exist the result is in value, so the code code should be "if values.isError etc" |
Beta Was this translation helpful? Give feedback.
-
The page you refer to have probably shifted to a new name, there are plenty of documentation including the serial client. |
Beta Was this translation helpful? Give feedback.
-
just read here https://pymodbus.readthedocs.io/en/latest/source/library/client.html#modbus-calls |
Beta Was this translation helpful? Give feedback.
Your device do not respond (the error message actually says that).
Did you have a look at documentation at all ? or at the API_Changes.rst that we provide.
unit= is wrong, it should be slave=