Auxiliary Operations
XW-210 WiFi™ Users Manual
6.6.4 Read Coils - Modbus Function Code 01 (0x01)
Read the state of the relay.
Request
Start Address: 0x0000 (coil 1)
Coil Quantity: 0x0001 (1 coil)
Response
The XW-210 will respond to the request with a data field of one byte, each bit representing the coil
status. A '
1
' indicates the Output is
ON
. A '
0
' indicates that the Output is
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 Relay 1.
Coil State Byte
Bit 7
6
5
4
3
2
1
Bit 0
X
X
X
X
X
X
X
Relay 1
Errors
The sum of the start address and coil count cannot exceed the maximum coil count or an error response
will be returned.
The following are possible error responses.
Coil Read Error Function Code (1 byte): 0x81
Exception Codes (1 byte):
0x01 – Function code not supported.
0x02 – Incorrect combination of start address and quantity of Relays
Page 70
Xytronix Research & Design, Inc.
Содержание WebRelay Wireless XW-210I
Страница 1: ......