Modbus Protocol Specification



tải về 0.61 Mb.
Chế độ xem pdf
trang9/35
Chuyển đổi dữ liệu14.05.2023
Kích0.61 Mb.
#54683
1   ...   5   6   7   8   9   10   11   12   ...   35
modbus protocol

2.2.3 03 Read Holding Registers
Reads the binary contents of holding registers (4x references) in the slave. Broadcast is not
supported. The maximum parameters supported by various controller models are listed on page
.
Query
The query message specifies the starting register and quantity of registers to be read. Registers
are addressed starting at zero- registers 1 ... 16 are addressed as 0 ... 15.
Here is an example of a request to read registers 40108 ... 40110 from slave device 17:
Response
The register data in the response message are packed as two bytes per register, with the binary
contents right justified within each byte. For each register, the first byte contains the high order
bits and the second contains the low order bits.
Data is scanned in the slave at the rate of 125 registers per scan for 984-X8X controllers
(984-685, etc), and at the rate of 32 registers per scan for all other controllers. The response is
returned when the data is completely assembled.
http://www.modicon.com/techpubs/dcon7.html (8 of 36) [1/11/2000 10:41:04 PM]


Here is an example of a response to the query:
The contents of register 40108 are shown as the two byte values of 02 2B hex, or 555 decimal.
The contents of registers 40109 ... 40110 are 00 00 and 00 64 hex, or 0 and 100 decimal.
2.2.4 04 Read Input Registers
Reads the binary contents of input registers (3X references) in the slave. Broadcast is not
supported. The maximum parameters supported by various controller models are listed on page
.
Query
The query message specifies the starting register and quantity of registers to be read. Registers
are addressed starting at zero- registers 1 ... 16 are addressed as 0 ... 15.
Here is an example of a request to read register 30009 from slave device 17:
Response
The register data in the response message are packed as two bytes per register, with the binary
contents right justified within each byte. For each register, the first byte contains the high-order
bits and the second contains the low-order bits.
http://www.modicon.com/techpubs/dcon7.html (9 of 36) [1/11/2000 10:41:04 PM]


Data is scanned in the slave at the rate of 125 registers per scan for 984-X8X controllers
(984-685, etc), and at the rate of 32 registers per scan for all other controllers. The response is
returned when the data is completely assembled.
Here is an example of a response to the query on the opposite page:
The contents of register 30009 are shown as the two byte values of 00 0A hex, or 10 decimal.

tải về 0.61 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   5   6   7   8   9   10   11   12   ...   35




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

    Quê hương