G.3
Date Code 20110408 Instruction Manual SEL-551 Relay
Modbus RTU Communications Protocol
Modbus RTU Communications Protocol
SEL-551, the master device uses the data received. If there is not a match, the
check fails and the message is ignored. The devices use a similar process
when the master sends queries.
01h Read Coil Status
Command
Use function code 01h to read the On/Off status of the selected bits (coils).
You may read the status of up to 2000 bits per query. Note that the relay coil
addresses start at 0 (e.g., Coil 1 is located at address zero). The relay returns 8
bits per byte, most significant bit first, with zeroes padded into incomplete
bytes.
To build the response, the relay calculates the number of bytes required to
contain the number of bits requested. If the number of bits requested is not
evenly divisible by 8, the relay adds one more byte to maintain the balance of
bits, padded by zeroes to make an even byte.
The relay responses to errors in the query are shown below:
Please refer to Table G.9 for coil number assignments.
02h Read Input
Status Command
Use function code 02h to read the On/Off status of the selected bits (coils).
You may read the status of up to 2000 bits per query. Note that the relay coil
addresses start at 0 (e.g., Coil 1 is located at address zero). The relay returns 8
bits per byte, most significant bit first, with zeroes padded into incomplete
bytes.
Table G.4 01h Read Coil Status Commands
Bytes Field
Requests from the master must have the following format:
1 byte Slave Address
1 byte Function Code (01h)
2 bytes Address of the First Bit
2 bytes Number of Bits to Read
2 bytes CRC-16
A successful response from the slave will have the following format:
1 byte Slave Address
1 byte Function Code (01h)
1 byte Number Bytes of Data (n)
n bytes Data
2 bytes CRC-16
Error Error Code Returned
Communication
Counter Increments
Invalid bit to read Illegal Data Address (02h) Invalid Address
Invalid number of bits to read Illegal Data Value (03h) Illegal Register
Format error Illegal Data Value (03h) Bad Packet Format