WebRelay-10 Users Manual
Operation
WebRelay-10 Response Frame Example – Status of Coils 2 through 10
Field Name
Length
Function
Example Data
Transaction Identifier
2 bytes
Synchronization number.
0x0001
Protocol Identifier
2 bytes
Zero for Modbus/TCP
0x0000
Message Length
2 bytes
Number of bytes in frame (below)
0x0004
Unit Identifier
1 byte
Slave Address (0xff if not used)
0xFF
Function Code
1 byte
Read Coils
0x01
Data
2-3 bytes
Byte Count (
0x01-0x02
)
Coil status lower byte (
0x00 to 0x03FF
)
Coil status upper byte
0x02
0x55
0x01
RX String: 00 01 00 00 00 04 FF 01 02 55 01
Errors
The following are possible error responses for function code 0x01.
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
Error Response Frame Example
Field Name
Length
Function
Example Data
Transaction Identifier
2 bytes
Synchronization between messages of
server and client.
0x0001
Protocol Identifier
2 bytes
Zero for Modbus/TCP
0x0000
Message Length
2 bytes
Number of bytes in frame (below)
0x0003
Unit Identifier
1 byte
Slave Address (0xff if not used)
0xFF
Function Code
1 byte
Function code
0x81
Data
1 byte
Exception code (
0x01 - 0x02
)
0x02
Rx String: 00 01 00 00 00 03 FF 81 02
Xytronix Research & Design, Inc.
page 67