Skip to main content
  • Products
  • Evaluate our Software
  • Downloads
  • Free Utilities
  • Purchase
  • Support
  • About Us
  • Blog
  • Forum
  • Search
    • Contact Us
    • Forum
    • Knowledge Base
    • Web Shop
    • Newsletter
    • RSS
  •   Jobs
  •   Videos
  •   Blog
  •   Sustainability
  • emModbus
  • What is Modbus?
  • Technology
  • Tools

What is Modbus?
Technical background

Contact us
Downloads
SEGGER emModbus
  1. 1.Message Frames
    1. 1.1.Message frame fields
  2. 2.The three Modbus message frames
    1. 2.1.RTU message frame
    2. 2.2.ASCII message frame
    3. 2.3.Modbus/TCP message frame
  3. 3.Instruction Set
  4. 4.Data Types

Message Frames

emModbus supports all three Modbus standard protocols covered by the official Modbus documentation:

ProtocolDescription
RTUOriginal Modbus standard. Binary data is sent via serial connections such as RS-232 or similar.
ASCIISimilar to RTU. Instead of raw binary, data is encoded in ASCII.
Modbus/TCPBinary data is encapsulated in a TCP frame and sent via network connections such as Ethernet. This variant can also be used with UDP instead of TCP and is then called Modbus/UDP.

Message frame fields

Although the different message frames are each handled differently by the protocol, both RTU and ASCII frames consist of the same four specified fields. Field 2 and 3 constitute the Protocol Data Unit (PDU), which is included in the Modbus/TCP frame as well.

modbusFrame

The three Modbus message frames

modbusRTUFrame

RTU message frame

When using RTU frames, each byte contained in a message is sent as binary data. The main advantage of this mode is its greater density, allowing better data throughput for the same baud rate compared to ASCII frames.


ModbusASCIIFrame

ASCII message frame

When using ASCII frames, each byte contained in a message is encoded and sent as two ASCII characters. This allows time intervals of up to one second to occur between characters without causing an error.


ModbusTCPFrame

Modbus/TCP message frame

When using Modbus/TCP frames, an additional header called 'Modbus Application Header' precedes the Protocol Data Unit.

Instruction Set

emModbus currently supports the following instructions:

Function codeDescription
1Read Coil.
2Read Discrete Input.
3Read Holding Register.
4Read Input Register.
5Write Coil.
6Write Register.
15Write Coils.
16Write Registers.

Data Types

Modbus uses four primary data types:

Data typeDescription
CoilSingle bit, alterable by an application program, read-write.
Discrete InputSingle bit, provided by an I/O system, read-only.
Holding Register 16-bit, alterable by an application program, read-write.
Input Register16-bit, provided by an I/O system, read-only.

Headquarters

SEGGER Microcontroller GmbH

Ecolab-Allee 5
40789 Monheim am Rhein, Germany
info@segger.com
Tel.: +49-2173-99312-0
Fax: +49-2173-99312-28

Locations

USA: SEGGER Microcontroller Systems LLC

Boston area
101 Suffolk Lane
Gardner, MA 01440, USA
us-east@segger.com
Tel.: +1-978-874-0299
Fax: +1-978-874-0599

Silicon Valley
Milpitas, CA 95035, USA
us-west@segger.com
Tel.: +1-408-767-4068

China: SEGGER Microcontroller China Co., Ltd.

Room 218, Block A, Dahongqiaoguoji
No. 133 Xiulian Road
Minhang District, Shanghai 201199, China
china@segger.com
Tel.: +86-133-619-907-60

ISO 9001 certified

ISO 9001

30+ years of experience

First-class embedded software tools since 1992
  • Imprint
  • Disclaimer
  • Privacy Policy
© 2025 SEGGER - All rights reserved.