Modbus Protocol Specification


Note: The three remaining bits (toward the high-order end) are zero-filled. 2.2.2 02 Read Input Status



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

Note: The three remaining bits (toward the high-order end) are zero-filled.
2.2.2 02 Read Input Status
Reads the ON / OFF status of discrete inputs (1x 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 input and quantity of inputs to be read. Inputs are
addressed starting at zero-inputs 1 ... 16 are addressed as 0 ... 15.
Here is an example of a request to read inputs 10197 ... 10218 from slave device 17:
Response
The input status in the response message is packed as one input per bit of the data field. Status
is indicated as: 1 = ON; 0 = OFF. The LSB of the first data byte contains the input addressed in
the query. The other inputs follow toward the high order end of this byte, and from low order to
high order in subsequent bytes.
If the returned input quantity is not a multiple of eight, the remaining bits in the final data byte
will be padded with zeros (toward the high order end of the byte). The Byte Count field
specifies the quantity of complete bytes of data.
Here is an example of a response to the query:
http://www.modicon.com/techpubs/dcon7.html (7 of 36) [1/11/2000 10:41:04 PM]


The status of inputs 10204 ... 10197 is shown as the byte value AC hex, or binary 1010 1100.
Input 10204 is the MSB of this byte, and input 10197 is the LSB. Left to right, the status of
inputs 10204 ... 10197 is ON-OFF-ON-OFF-ON-ON-OFF-OFF.
The status of inputs 10218 ... 10213 is shown as the byte value 35 hex, or binary 0011 0101.
Input 10218 is in the third bit position from the left, and input 10213 is the LSB. The status of
inputs 10218 ... 10213 is: ON-ON-OFF-ON-OFF-ON.
Note: The two remaining bits (toward the high order end) are zero-filled.

tải về 0.61 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   4   5   6   7   8   9   10   11   ...   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