Modbus Protocol Specification

Chapter 2 Data and Control Functions

tải về 0.61 Mb.
Chế độ xem pdf
Chuyển đổi dữ liệu14.05.2023
Kích0.61 Mb.
1   2   3   4   5   6   7   8   9   ...   35
modbus protocol

Chapter 2
Data and Control Functions

Modbus Function Formats

Function Codes

Read Coil Status

Read Input Status

Read Holding Registers

Read Input Registers

Force Single Coil

Preset Single Register

Read Exception Status

Fetch Comm Event Counter

Fetch Comm Event Log

Force Multiple Coils

Preset Multiple Registers

Report Slave ID

Read General Reference

Write General Reference

Mask Write 4x Register

Read / Write 4x Registers (1 of 36) [1/11/2000 10:41:03 PM]

Read FIFO Queue
2.1 Modbus Function Formats
Note: Unless specified otherwise, numerical values (such as addresses, codes, or data) are
expressed as decimal values in the text of this section. They are expressed as hexadecimal
values in the message fields of the figures.
2.1.1 Data Addresses in Modbus Messages
All data addresses in Modbus messages are referenced to zero. The first occurrence of a data
item is addressed as item number zero. For example:
V Coil 1 in a programmable controller is addressed as coil 0000 in the data address field of a
Modbus message
V Coil 127 decimal is addressed as coil 007E hex (126 decimal)
V Holding register 40001 is addressed as register 0000 in the data address field of the message.
The function code field already specifies a holding register operation. Therefore the 4x
reference is implicit.
V Holding register 40108 is addressed as register 006B hex (107 decimal)
2.1.2 Field Contents in Modbus Messages
The following tables show examples of a Modbus query and normal response. Both examples
show the field contents in hexadecimal, and also show how a message could be framed in
ASCII or in RTU mode.

tải về 0.61 Mb.

Chia sẻ với bạn bè của bạn:
1   2   3   4   5   6   7   8   9   ...   35

Cơ sở dữ liệu được bảo vệ bởi bản quyền © 2024
được sử dụng cho việc quản lý

    Quê hương