What is MODBUS-ASCII?

MODBUS ASCII is the character-based serial transmission mode of the Modbus application protocol. Unlike Modbus RTU, which transmits message bytes in compact binary form, Modbus ASCII represents every 8-bit message byte using two hexadecimal ASCII characters. This makes the message easier to inspect with a serial terminal or diagnostic tool, but it also requires more characters to carry the same Modbus information.
In simple terms: Modbus RTU sends a byte directly, while Modbus ASCII converts that byte into two printable hexadecimal characters. For example, hexadecimal byte 5B is transmitted as the ASCII characters “5” and “B”. This makes the message easier for a technician to read, but less compact than RTU.
Where does MODBUS ASCII fit into Modbus?
Modbus is an application-layer protocol used throughout industrial communication. On serial links, the two traditional transmission modes are Modbus RTU and Modbus ASCII.
The current Modbus Serial Line guide treats RTU as the primary serial transmission mode, while ASCII is an optional mode that may be supported for compatibility or specific applications.
A PLC, HMI, meter or controller supporting “Modbus” does not automatically support Modbus ASCII. The device manual should explicitly state that ASCII transmission mode is available.
How is a MODBUS ASCII message structured?
A Modbus ASCII frame follows this general structure:
: [Address] [Function Code] [Data] [LRC] CR LF
Colon “:”: Every Modbus ASCII frame begins with the colon character, ASCII hexadecimal value 3A.
Address: Identifies the serial Modbus server. Normal individual device addresses range from 1 to 247.
Function Code: Defines the requested operation, such as reading holding registers or writing a value.
Data: Contains information such as the starting register address, quantity of registers or data to be written.
LRC: Longitudinal Redundancy Check is the 8-bit error-detection value used by Modbus ASCII.
CR LF: Carriage Return and Line Feed terminate the frame. Their hexadecimal ASCII values are 0D and 0A.
Why does one byte become two ASCII characters?
One binary byte contains eight bits and can represent values from 00 to FF. Modbus ASCII divides that value into two four-bit hexadecimal digits and transmits each digit as a printable ASCII character.
For example, binary message byte:
5B
is sent on the ASCII serial line as:
“5” “B”
This makes hexadecimal messages easy to view using basic serial diagnostic tools. The trade-off is that every message byte requires two transmitted characters, while Modbus RTU can carry the same underlying Modbus information more compactly.
What is the LRC and how is it calculated?
LRC — Longitudinal Redundancy Check is the 8-bit error-detection field used by Modbus ASCII. The starting colon and ending CR/LF characters are not included in the LRC calculation.
The LRC is calculated from the actual 8-bit message bytes before those bytes are converted into ASCII characters.
A simplified calculation is:
1. Add the address, function-code and data bytes.
2. Keep only the low eight bits of the sum.
3. Calculate the two's complement of that value.
4. Encode the resulting 8-bit LRC as two hexadecimal ASCII characters.
Correct MODBUS ASCII request example
Suppose server address 1 must return one holding register beginning at protocol address 0. Function Code 03 — Read Holding Registers is used.
The binary bytes used for the LRC calculation are:
01 03 00 00 00 01
The low eight bits of their sum equal:
05
The two's complement of 05 is:
FB
The correct Modbus ASCII request is therefore:
:010300000001FB + CR LF
In programming notation, the complete frame is commonly shown as:
:010300000001FB\r\n
The older example using `:010300000001FD` contained an incorrect LRC. The correct LRC for this request is FB.
Example MODBUS ASCII response
Assume the requested register contains hexadecimal value 1234. The binary response fields are:
01 03 02 12 34
The fields mean:
01: Server address.
03: Read Holding Registers function code.
02: Number of returned data bytes.
12 34: Register value.
The LRC for this response is B4, so the full ASCII response becomes:
:0103021234B4\r\n
What is the difference between MODBUS ASCII and MODBUS RTU?
Both transmission modes can use the same Modbus function codes and data model. The main differences are serial framing, encoding and error detection.
Modbus RTU sends message bytes in binary form and uses a 16-bit CRC. Frame boundaries depend on silent timing intervals between messages.
Modbus ASCII converts every byte into two hexadecimal ASCII characters, begins each frame with “:”, ends it with CR/LF and uses an 8-bit LRC.
ASCII's character-oriented framing can be convenient when messages are viewed directly through a serial terminal. RTU is more bandwidth-efficient because it requires fewer transmitted characters for the same underlying Modbus data.
LRC and CRC are different error-detection methods. Describing the difference only as “LRC is weak and CRC is strong” oversimplifies the engineering comparison; encoding, framing and timing behaviour also differ between the two serial modes.
How is MODBUS ASCII timing different from RTU?
RTU depends strongly on silent character-time intervals to identify frame boundaries. ASCII does not use the same t1.5/t3.5 framing mechanism because the start and end of the message are explicitly marked by characters.
The official Modbus Serial Line guide allows an interval of up to one second between characters within an ASCII message. Unless a longer timeout has been configured, a delay longer than one second is treated as a communication error.
This more tolerant inter-character timing was useful in some older serial systems where maintaining strict RTU timing was difficult.
Which serial settings are used with MODBUS ASCII?
The classic Modbus ASCII character format is based on 7 data bits. Even parity is the default parity defined by the Modbus Serial Line specification.
With parity enabled, the typical character structure is:
1 start bit + 7 data bits + 1 parity bit + 1 stop bit
When parity is disabled, two stop bits are used to maintain the serial character format.
The actual supported baud rate and serial settings must still be checked in the device manual. All devices sharing one serial Modbus network must use compatible transmission mode and serial parameters.
Which physical interface can MODBUS ASCII use?
Modbus ASCII is a serial Modbus transmission mode. Depending on the equipment, the physical electrical link can use RS-232 or RS-485.
RS-485 and Modbus ASCII should not be confused. RS-485 defines how electrical serial signals travel over the cable, while Modbus ASCII defines how the Modbus message bytes are represented as characters.
For a short point-to-point legacy connection, RS-232 may also carry Modbus ASCII. A multidrop industrial network is more commonly associated with RS-485.
Which data can MODBUS ASCII read or write?
ASCII and RTU use the same basic Modbus data model. They can therefore work with Coils, Discrete Inputs, Input Registers and Holding Registers using the corresponding Modbus function codes.
A sensor or transmitter may expose a measured process value in an input or holding register. A motor drive may provide speed references, status words, control words and parameters through holding registers.
Modbus itself does not assign one universal meaning to every register address. The register map must be obtained from the actual device manufacturer's communication documentation.
What is the difference between MODBUS ASCII and Modbus TCP?
Modbus ASCII is designed for character-based serial communication. Modbus TCP carries Modbus application messages over TCP/IP and Ethernet.
A Modbus TCP message does not use the ASCII colon start character, CR/LF termination or LRC. Instead, Modbus TCP uses an MBAP Header as part of its TCP message structure.
For comparison with another widely used Ethernet-based industrial protocol, see EtherNet/IP vs Modbus TCP.
Is MODBUS ASCII still used?
Yes, although it is less common than RTU. Older PLCs, controllers, meters and specialized serial devices may still support or require ASCII mode.
For new serial Modbus implementations, RTU support is far more common and the current Modbus Serial Line guidance treats RTU as the primary transmission mode. Existing equipment should not be converted merely because ASCII is older if the installed system is stable and adequately supported.
Why does MODBUS ASCII communication fail?
First confirm that both devices are actually configured for Modbus ASCII transmission mode. If one device is using RTU and the other ASCII, correct baud rate and wiring will not make the messages compatible.
Next verify the device address, baud rate, parity and stop-bit configuration. On an RS-485 physical network, also inspect A/B wiring, topology and termination.
If the message is being generated in software, confirm that it begins with “:”, ends with CR/LF and contains a correctly calculated LRC based on the binary message bytes rather than on the ASCII character codes themselves.
If the server responds but the value is incorrect, the problem is more likely to involve the function code, register offset, scaling or data interpretation than the ASCII framing itself.
Practical MODBUS ASCII troubleshooting checklist
1. Are both devices using Modbus ASCII mode?
2. Do baud rate, parity and stop-bit settings match?
3. Does the message begin with a colon character?
4. Does the frame end with CR/LF?
5. Were the colon and CR/LF excluded from the LRC calculation?
6. Was the LRC calculated from the original message bytes rather than the ASCII character codes?
7. Are the server address and function code correct?
8. Does the requested register match the manufacturer's actual Modbus register map?
Related Modbus and Serial Communication Guides
Modbus FAQ · Modbus RS-485 · Ethernet · EtherNet/IP vs Modbus TCP
Related Automation Pages
PLCs · HMI Panels · SCADA · AC Drives and VFDs · Sensors