D.11
Date Code 20020903 SEL-587Z Instruction Manual
Modbus RTU Communications Protocol
Modbus Commands
10h Preset
Multiple
Registers
Command
This function code works much like code 06h, except that it allows you to
write multiple registers at once, up to 100 per operation. If you are
accustomed to 4X references with the function code, for six-digit addressing,
simply add 400001 to the standard database addresses.
The relay responses to errors in the query are shown below:
64h Scattered
Register Read
The SEL-587Z uses this function to allow a Modbus master to read
noncontiguous registers in a single request. A maximum of 100 registers can
be read in a single query.
Table D.13 10h Preset Multiple Registers Command
Bytes Field
Requests from the master must have the following format:
1 byte Slave Address
1 byte Function Code (10h)
2 bytes Starting Address
2 bytes Number of Registers to Write
1 byte Bytes of Data (n)
n bytes Data
2 bytes CRC-16
A successful response from the slave will have the following format:
1 byte Slave Address
1 byte Function Code (10h)
2 bytes Starting Address
2 bytes Number of Registers
2 bytes CRC-16
Error Error Code Returned
Communication
Counter Increments
Illegal register to set Illegal Data Address (02h) Invalid Address
Illegal Write
Illegal number of registers to set Illegal Data Value (03h) Illegal Register
Illegal Write
Incorrect number of
bytes in query data region
Illegal Data Value (03h) Bad Packet Format
Illegal Write
Invalid register data value Illegal Data Value (03h) Illegal Write
Table D.14 64h Scattered Register Read Command (Sheet 1 of 2)
Bytes Field
Requests from the master must have the following format:
1 byte Slave Address
1 byte Function Code (64h)
1 byte Query Data Length
1 byte Subfunction Code (04h)
a
1 byte Transmission Number
2 bytes Address of First Register