Skip to main content
  • 产品
  • Evaluate our Software
  • 下载
  • Free Utilities
  • 购买
  • 芯片厂商
  • 支持
  • 关于我们
  • Search
  • 工作机会
  • 新闻简报
  • 联系我们
  • emModbus
  • What is Modbus?

    What is Modbus?
    Technical background

    Contact us
    Downloads
    SEGGER emModbus
    1. 1.The three Modbus message frames
      1. 1.1.RTU message frame
      2. 1.2.ASCII message frame
      3. 1.3.Modbus/TCP message frame
    2. 2.Instruction Set
    3. 3.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.
    • User manual
    • List of downloads
    • Release notes
    • Update notification
    • Pricing
    • Support
    • Silicon vendor resources

    全球总部

    德国: SEGGER Microcontroller GmbH

    地址: Ecolab-Allee 5
    40789 Monheim am Rhein, Germany
    电邮: info@segger.com
    电话: +49-2173-99312-0
    传真: +49-2173-99312-28

    网点分布

    中国:哲戈微系统科技(上海)有限公司

    地址: 中国上海市闵行区秀涟路133号
    大虹桥国际A 栋218室
    邮编201199
    电邮: china@segger.com
    电话: +86-133-619-907-60


    简易信息聚合

    通过ISO 9001认证

    ISO 9001

    30多年的嵌入式行业经验

    First-class embedded software tools since 1992
    • 版本说明
    • 免责声明
    • 行为准则
    • 隐私策略
    • 沪ICP备2022005181号
    • 沪公网安备 31011202014525号
    © 2025 SEGGER - 版权所有.

    您即将离开 segger.cn 而访问境外网站,是否继续?