Documentation sections
Modbus RTU Frame Timing Calculator
POSThttps://rftools.io/ api/ py/ v1/ calculate
Slug modbus-frame-timing. Calculate Modbus RTU character time, 3.5-character inter-frame gap, total frame duration, and maximum frame rate.
Inputs
Send every one of these in inputs, in the units shown. Most are required: a call without one is refused (400) and costs nothing; one the calculator can do without takes the default shown. An input outside its range is still computed and flagged in the provenance.
| Name | Unit | Range | Default | Description |
|---|---|---|---|---|
| baudRatenumber | bps | 300 … 115200 | 9600 | Modbus RTU baud rate |
| dataBytesnumber | bytes | 1 … 252 | 8 | Number of data bytes between the function code and the CRC |
| parityBitsnumber | bits | 0 … 1 | 1 | Parity Bits |
| stopBitsnumber | bits | 1 … 2 | 1 | Stop bits (1 or 2 — use 2 stop bits when parity=none) |
| charGapnumber | ms | 0 … 100 | 0 | The longest pause the sender leaves between two characters of a frame; a USB adapter or an RTOS driver can leave one |
Outputs
Returned in values, by key. A value that is unbounded or undefined is null.
| Field | Unit | Description |
|---|---|---|
| charTime | ms | Time to transmit one character: (1+8+parity+stop) / baud_rate |
| t35headline | ms | Modbus RTU inter-frame silence: 3.5 × character time, a fixed 1.75 ms above 19 200 Bd |
| frameTime | ms | Total frame transmission time (address + function + data + CRC), with the pauses between characters |
| maxFrameRate | frames/s | Maximum frames per second including inter-frame gap |
| t15 | ms | A pause longer than this inside a frame makes the receiver discard it: 1.5 character times, a fixed 750 µs above 19 200 Bd |
| charGapChars | char | The sender's pause between characters, in character times |
| t15Chars | char | The 1.5T limit in character times: 1.5 up to 19 200 Bd, more above it, where the limit is a fixed 750 µs |
Calling it
- Calculate: one call, the request and response in full, and its errors.
- Batch: this calculator with others, or a sweep, in one request.
- Solve for a target: the value of one input that brings an output to a target.