Run SerialServer only with custom PDU #2719
Replies: 1 comment 3 replies
-
v3.10 is a non functional release, please upgrade to v3.11. When you register a request/response the function code + sub function code in the class are appended to the lookup tables. . You can create new function codes or overwrite existing ones, and if overwriting existing ones your class should be called instead of the default one. Since the registration updates the lookup tables, that is the supported way. You do not share your customRequest so I cannot see if it is a new function code, or you inherit from an existing one. I assume you are aware that "large amounts of data" are limited be fit within the 255byte frame size ? If you try send send a frame bigger than 255bytes, then you will encounter problems. What is really disturbing is that it only happens under load...that seems like a concurrency problem, but since the lookup table is static I cannot see what could cause a wrong lookup. So in total please attach at least the top part of your customRequest, together with a debug log (you can use the Pymodbus call to activate debugging), allowing me to see what is happening and analyze what the problem could be. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
first of all thanks for the great library! 😺
I use version 3.10 and start a server like this:
In
CustomModbusRequest
I register my custom function code and use it to handle a separate protocol which is just using modbus as a transport protocol.For single requests and not a lot of data being sent everything works well. Only if a lot of requests with a large amount of data are being sent problems occur.
Then the modbus server sometimes detects one of the default function codes and acts upon it and thus bricking the communication (see log message below).
My current hack is to disable the lookup of the "default" function codes here
pymodbus/pymodbus/pdu/decoders.py
Lines 75 to 82 in b9731ec
Is there any supported way to do this? If not could we add one?
Thanks for your time!
Beta Was this translation helpful? Give feedback.
All reactions