XW-210 WiFi™ Users Manual
6.6.5 Read Discrete Inputs – Modbus Function Code 02 (0x02)
This function returns the state of the digital input.
Request
Start Address: 0x0000 (input1)
Input Quantity: 0x0001
The sum of the starting address and the quantity of coils must not be greater than 0x0001.
Response
The input state is indicated by bit zero of the status byte. A
1
indicates that the input is switched high
ON
.
A
0
indicates that the input switched low
OFF
. Bit zero of the return value will be the state of the coil
corresponding to the start address. For example, if a start address of 0x0000 is used, bit zero will be the
status of input 1.
Discrete Input State Byte
Bit 7
6
5
4
3
2
1
Bit 0
X
X
X
X
X
X
X
Input 1
Errors
Input Read Error Function Code (1 Byte): 0x82
Exception codes (1 Byte):
0x01 – Function not supported.
0x02 – Incorrect combination of start address and input quantity.
Xytronix Research & Design, Inc.
Page 71
Содержание WebRelay Wireless XW-210I
Страница 1: ......