Auxiliary Operations
XW-210 WiFi™ Users Manual
6.6.8 Write Multiple Coils - Modbus Function Code 15 (0x0F)
One byte can be written to set the state of all relays, each bit representing one relay.
Request
Relay states are controlled by specifying the start address of the first relay to be controlled, the count of
the relays to be affected, and the relay state byte.
A relay value of 0xFFFF would be used to turn
ON
all of the relays in the range or 0x0000 to turn them
OFF
. In the above example, the relay value 0xFF would turn relay 1
ON
.
Start Address (2 bytes):
0x0000 (Relays 1)
Output Quantity (2 bytes):
0x0001
Byte Count (1-2 bytes):
0x01
Relay Value (1 bytes):
0x0000 – 0x0001
Relay State Byte
Bit 7
6
5
4
3
2
1
Bit 0
X
X
X
X
X
X
X
Relay 1
Response
The quantity value is returned.
Errors
Multiple Coil Write Error Function Code (1 Byte): 0x8F
Exception codes (1 Byte):
0x01 – Function not supported.
0x02 – Incorrect combination of start address and Relay quantity
0x03 – Byte count out of range.
Page 74
Xytronix Research & Design, Inc.
Содержание WebRelay Wireless XW-210I
Страница 1: ......