libmodbus has never respected the famous t3.5 delay. Years ago when I
wrote first version of libmodbus I want to achieve very fast
communication in RTU, in my case, this delay was the bottleneck (and
t3.5 for 115200 bps is just stupid!, I think Modbus protocol was
designed when there was no such speed :) so I just removed it and I
never need to add them since.
Extract from MODBUS over serial line specification and implementation
guide V1.02 (2006):
The implementation of RTU reception driver may imply the management of
a lot of interruptions due to the t1.5 and t3.5 timers. With
high communication baud rates, this leads to a heavy CPU load.
Consequently these two timers must be strictly respected when the
baud rate is equal or lower than 19200 Bps. For baud rates greater
than 19200 Bps, fixed values for the 2 timers should be used: it is
recommended to use a value of 750μs for the inter-character time-out
(t1.5) and a value of 1.750ms for inter-frame delay (t3.5).
So we can add an API to add this behavior to libmodbus:
modbus_apply_interframe_delay(ctx);
Feel free to propose a better name...
Browny and Giampaolo, why do you need this delay (device, adapter, etc)?
Do you need to define a specific interframe-delay?
Or something dependent of bps?
Stéphane
2012/10/30 Browny <
mr.ernes...@gmail.com>: