Modbus RTU timing calculator
Enter the baud rate, character format, number of holding registers and the device turnaround delay, and the page gives the character time, the t1.5 and t3.5 gaps and the time of one function 03 read. It also gives the most transactions and registers per second the line can carry at that setting.
Calculator
This calculator needs JavaScript. Without it, use the formulas under "How it works" and the worked example.
Common baud rates are 9600, 19200, 38400 and 115200. One request reads 1 to 125 holding registers. The turnaround delay is the time the device takes after the end of the request before it starts to answer; take it from the device manual or measure it.
How it works
Each character on the line is a start bit, 8 data bits, then either a parity bit and one stop bit (8E1, 8O1) or two stop bits (8N2): 11 bits in all. 8N1 leaves out the parity bit and sends 10. The time of one character is the bits divided by the baud rate, and every other time follows from it:
character time = bits per character / baud t1.5 = 1.5 × character time, t3.5 = 3.5 × character time for baud up to 19200 t1.5 = 0.75 ms, t3.5 = 1.75 ms for baud above 19200 request = 8 bytes × character time response = (5 + 2 × registers) bytes × character time transaction = request + turnaround delay + response + t3.5 transactions per second = 1 / transaction registers per second = registers × transactions per second
A function 03 request is always 8 bytes: slave address, function code, start address (2 bytes), quantity (2 bytes) and CRC (2 bytes). The response is slave address, function code, byte count, two bytes for each register and the 2-byte CRC. A gap longer than t1.5 between characters breaks a frame, and a silence of at least t3.5 ends one frame before the next may start. Above 19200 baud the serial line rules replace both gaps with the fixed times 0.75 ms and 1.75 ms.
The calculation assumes one master polling one device, characters sent back to back with no gaps inside a frame, and the next request sent as soon as t3.5 has passed. It leaves out the time the master needs between requests, the latency of converters, radios and gateways, exception responses and retries after a timeout, so it gives the most the line can carry, not what a real poll achieves.
Worked example
A master reads 10 holding registers from one device at 9600 baud, 8E1. The device manual gives a turnaround delay of 5 ms.
- Character time: 11 bits / 9600 baud = 1.1458 ms, so t3.5 = 3.5 × 1.1458 = 4.0104 ms.
- Request: 8 bytes × 1.1458 ms = 9.1667 ms.
- Response: 5 + 2 × 10 = 25 bytes, and 25 × 1.1458 ms = 28.646 ms.
- One transaction: 9.1667 + 5 + 28.646 + 4.0104 = 46.823 ms, so at most 1000 / 46.823 = 21.357 transactions, or 213.57 registers, per second.
At 38400 baud the character time falls to 0.28646 ms and t3.5 to the fixed 1.75 ms, and one transaction takes 16.203 ms. Four times the baud rate gives 61.716 transactions per second instead of 21.357, not four times as many, because the 5 ms turnaround delay does not get shorter.
Common mistakes
- 8N1 (10 bits per character) is widely used but is outside the Modbus serial line requirement of 11-bit characters; without parity the rule is two stop bits (8N2). The master and every device on the line must use the same format.
- The turnaround delay is a property of the device, not of the line. Measure it or take it from the device manual; it can change with the function code and the number of registers read.
- Converter, radio and gateway latency are not included, nor are retries after a timeout, so a real poll rate is lower than the figure here.
- The result is for one device. On a line with several devices the poll cycle is the sum of their transaction times, not the longest one.
- Each request pays the 8-byte request, the turnaround delay and t3.5 again, so one read of 20 registers is quicker than two reads of 10. One function 03 request reads at most 125 registers.
Related articles
- Concept 2.6 XXMIT limits for polling many Modbus RTU slaves
- Why Modbus RTU drive polling on one serial port is slow
- Why an RS-485 device that lacks Modbus RTU stays silent
- Connecting ControlLogix to RS232 and RS485 serial devices
- Connect 11 CHF100A drives to an FX2N over Modbus RTU
- Polling many Modbus RTU slaves with one queued function block
- Why CM1241 RS485 A/B polarity stops Modbus RTU slave replies
- How to poll many Modbus RTU slaves from one serial master