Modbus Operation
X-600M Users Manual
5.3.4 Write Single Coil
–
Modbus Function Code 05 (0x05)
Relays may be controlled one at a time.
Request
Start Address (2 bytes):
0x0000 (Relay 1) – 0x00FF (Relay 255)
Output Value (1 byte):
0x00 (OFF), 0xFF(ON)
Padding (1 byte):
0x00
Response
The response mirrors the requested state, 0x00 or 0xFF.
Errors
Single Coil Write Error Function Code (1 Byte): 0x85
Exception codes (1 Byte):
0x01 – Function not supported.
0x02 – Address out of range.
0x03 – Padding value.
5.3.5 Write Multiple Coils - Modbus Function Code 15 (0x0F)
One byte can be written to set the state of multiple 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 value of 0x00FF would be used to turn
ON
all of the relays in the range 1 – 8 (assuming relays 1
through 8 are found in the coil address table,) or 0x0000 to turn them
OFF
.
Start Address (2 bytes):
0x0000 (Relays 1) – 0x00FF ( Relay 255)
Output Quantity (2 bytes):
0x0001 – 0x00FF
Byte Count (1-2 bytes):
0x01
Relay Value (1 bytes):
0x0000 – 0x0003
Relay State Byte
Bit 7
6
5
4
3
2
1
Bit 0
X
X
X
X
Relay 4
Relay 3
Relay 2
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 104
Xytronix Research & Design, Inc.
Содержание X-600M
Страница 1: ...X 600MTitle Page Goes Here...
Страница 6: ...X 600M Users Manual Page 4 Xytronix Research Design Inc...
Страница 99: ...X 600M Users Manual Setup Pages Xytronix Research Design Inc Page 97...
Страница 116: ...Appendix B Installing New Firmware X 600M Users Manual Page 114 Xytronix Research Design Inc...