Note: To obtain a suitable setting, please follow these steps:
Use a Master to test all Slave devices connected to the Modbus Gateway,
and take note of the maximum response time of each device.
Set the Slave Timeout parameter of the Modbus Gateway to the above maximum response time of the Slave devices plus 100 ms (latency).
Users can try smaller or larger latency for better operation.
Set the Queue Timeout parameter of the Modbus Gateway to above Slave Timeout of the Modbus Gateway multiplied by N requests plus 100 ms (latency).
N refers to the maximum number of requests queued simultaneously from all masters.
Set the Slave Timeout parameter of the masters to the Queue Timeout of the Modbus Gateway plus 100 ms (latency).
Ensure that the corresponding timeout settings are large enough for error handling.
For example:
If Device1 has a response time of 80 ms and Device2 has a response time of 130 ms, so the maximum response time is 130 ms.
Set the Slave Timeout of the Modbus Gateway to 230 ms (130 + 100).
Set the Queue Timeout of the Modbus Gateway to 1480 ms (230 *6 requests + 100).
If there are 3 masters with 2 requests queued simultaneously, then that is 3 * 2 = 6 requests.
Set the Slave Timeout of the masters to 1580 ms (1480 + 100).