AsyncSerialServer running into Exceptions after some hours #2841
-
|
I have an AsyncSerialServer running as a modbus slave. The master is a PLC that updates registers of the modbus slave every 10 seconds. Everything works fine, but after about 6+ hours it stops working and bloats the log file with this Exception: The code is running on a Raspberry pi zero V.1 on the serial port /dev/serial0. I use pymodbus version 3.11.4. Does anybody know what causes this Exception? How can I bring back my server (slave) into a working mode after such an exception? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
|
Please run the server with activated (using the pymodbus call) so we can see what is being received. It looks as if the clients sends a 1 byte package, which also could be noise on the line. |
Beta Was this translation helpful? Give feedback.
-
|
I wonder why bad data would prevent the slave from listening anymore, should it not recover? BTW: I run version 3.11.4 which is marked as latest stable version. If I set logging level to DEBUG, I get hundreds of these messages per second: |
Beta Was this translation helpful? Give feedback.
-
|
Based on your input, we are working on a solution that will allow limited multipoint setup support. It will work if the baud rate <= 19200 and the rs485 cabling is of good quality (meaning no noise on the line, causing malicious bytes). This will be available in version 3.12 which are just around the corner. |
Beta Was this translation helpful? Give feedback.
-
|
once #2846 is merged, you can test your app. How long a delay you need between messages really depend on how your RS485 connector collects data, which are normally in the micro-second range. Remark: you can control the timing between polls, but you cannot control how fast your devices respond :-) |
Beta Was this translation helpful? Give feedback.

That is a multipoint setup (múltiple slaves), which as stated in the documentation are not supported.
The reason being that the start/end of each message cannot be detected correctly in a pure software solution, hardware directly connected to the rs485 is needed to the detect the 3char silence that defines the start/end.