You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timeout after request frame does not take into account request length (examples below have no physical Modbus devices connected, those are only the requests).
Timeout after request frame does not take into account request length (examples below have no physical Modbus devices connected, those are only the requests).
Test script:
System info
1. Writing maximum number of registers with timeout set to 100ms.
Time between frames ~41ms
2. Writing maximum number of registers with timeout set to 50ms. Request frame "eats" away the wait period for response.
Time between frames 0ms
3. Writing 40 registers with timeout set to 50ms.
Time between frames ~29ms
To prevent the issue I've added serial.flush after serial.write in minimalmodbus.py, line 1468
After the changes:
1. Writing maximum number of registers with timeout set to 100ms.
2. Writing maximum number of registers with timeout set to 50ms.
3. Writing 40 registers with timeout set to 50ms.
I've used flush with conviction that it is a
nondestructive wait operation
. I do not know if that change is adequate to be implemented.Response times are a little bit longer then expected (possibly extended by MODBUS RTU 3.5 character time).
The issue came around when stress testing some older siemens PLC (slow response times) with faster devices.
The text was updated successfully, but these errors were encountered: