Modbus ASCII — frame format and LRC
Modbus ASCII framing (':' start, CR LF end, hexadecimal characters), the LRC checksum with a worked example, timing rules and when you still meet ASCII mode.
Modbus ASCII is the second serial transmission mode defined in Modbus over Serial Line. The PDU is the same as in Modbus RTU; only the framing and the checksum differ. Every byte is sent as two ASCII hexadecimal characters, so frames are twice as long but readable in a terminal.
Frame
| Field | Content |
|---|---|
| Start | : (0x3A) |
| Address | 2 characters |
| Function | 2 characters |
| Data | 2 × n characters |
| LRC | 2 characters |
| End | CR LF (0x0D 0x0A) |
Default character format: 7 data bits, even parity, 1 stop bit (7E1); other formats are allowed if both sides agree. Inter-character gaps up to 1 s are allowed, so ASCII works over slow modems and radios where RTU's 1.5/3.5-character timing would fail.
LRC — longitudinal redundancy check
- Add all bytes of address, function and data (as binary bytes, not characters), ignoring carries above 8 bits.
- Take the two's complement of the result.
Example: read 1 holding register at address 0 from slave 1 → bytes 01 03 00 00 00 01. Sum = 0x05, two's complement = 0xFB. Frame: :010300000001FB + CR LF.
RTU vs ASCII
| RTU | ASCII | |
|---|---|---|
| Bytes on the wire | 1 per byte | 2 per byte + start/end |
| Error check | CRC-16 | LRC (8 bit) |
| Framing | Silent intervals (3.5 characters) | : … CR LF |
| Use today | Almost all devices | Some older devices, modems, data loggers, devices with ASCII-only protocol options |
A device on one serial line must use one mode; RTU and ASCII cannot be mixed on the same bus.
Connections
Open in Knowledge Graph →Loading the map…
Sources
- MODBUS over Serial Line — Specification and Implementation Guide — Modbus Organization
- MODBUS Application Protocol Specification — Modbus Organization
Updated 2026-10-04