E.4
SEL-751 Relay Instruction Manual Date Code 20170927
Modbus RTU Communications
Communications Protocol
To build the response, the SEL-751 calculates the number of bytes necessary
to contain the number of bits requested. If the number of bits requested is not
evenly divisible by eight, the device adds one more byte to maintain the
balance of bits, padded by zeros to make an even byte. Ta ble E .1 4 includes the
coil number and lists all possible coils (identified as Outputs and Remote bits)
available in the device. Note that the command depends on the device
hardware configuration; the device responds only to installed cards.
The relay responses to errors in the query are shown in Tab le E.5.
02 Read Input Status
Command
Use function code 02h to read the On/Off status of the selected bits (inputs), as
shown in Table E.6. You can read the status of as many as 2000 bits per query.
Note that input addresses start at 0 (e.g., Input 1 is located at address zero).
The input status is packed one input per bit of the data field. The LSB of the
first data byte contains the starting input address in the query. The other inputs
follow towards the high order end of this byte, and from low order to high
order in subsequent bytes.
Table E.4 01h Read Discrete Output Coil Status Command
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 Bytes of data (n)
n bytes Data
2 bytes CRC-16
Table E.5 Responses to 01h Read Discrete Output Coil Query Errors
Error Error Code Returned
Communications
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
Table E.6 02h Read Input Status Command (Sheet 1 of 2)
Bytes Field
Requests from the master must have the following format:
1 byte Slave Address
1 byte Function Code (02h)
2 bytes Address of the first bit