Modbus-RTU模式下,从机接收到一帧的最后一字节数据时,需要等待T3.5(3.5个字符时间)来确认这一帧数据传输完成;
这个T3.5(3.5个字符时间)的时间到底是如何计算的?
RTU模式下,一字节里面是有2个十六进制字符的,这样算的话的 T3.5 = 3.5/2 *11 / 波特率。
但是我从网上看到许多计算T3.5的方法是 T3.5 = 3.5 * 11 / 波特率,即认为一字节是一个字符。
到底哪种方法modbus_RTU所规定的??
另:我从modbus.org上看到下面这一段话
Remark :
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).
【小于等于19200时,严格按照T3.5和T1.5来进行,高于19200时,T3.5应使用固定值1.75ms】
从1.75ms算的话,貌似modbus.org是按T3.5 = 3.5 * 11 / 波特率。哪种方法modbus_RTU所规定的?
|