SIMPRO-100
Modbus
™
RTU Communications Protocol
C
PRIM-2400C 165
C.11 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. Normally, this
function code will only be used to write source
addresses in the User map region. If you are
accustomed to 4X references with the function
code, for 6-digit addressing, simply add 400001
to the standard database addresses.
Table C.13 10h Preset Multiple Registers Command
C.12 Controlling Output
Contacts & Remote
Bits Using Modbus
The SIMPRO-100 Relay Modbus Register Map
(Table C.19 on page 187) includes three (3) fields
that allow a Modbus Master to control relay
output contacts and Relay Word Remote Bits
(see Chapter B, page 137). Use Modbus function
codes 06h or 10h to write the appropriate
command codes and parameters into the
registers shown in Table C.14.
Table C.14 Modbus Command Region
Table C.15 defines the command codes, their
function and associated parameters, and the
function code used to initiate the code.
Parameter 2 of Command Code 6 and
Parameter 1 of Command Code 7 are bit-masked
to allow you to manipulate several Remote Bits or
Data Regions simultaneously.
Bytes Field
The Master Request 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 Byte count (should be twice number of registers)
n bytes Byte count bytes of data
2 bytes CRC-16 for message
A successful SIMPRO-100 relay response 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 for message
Address Field
0030h Command Code
0031h Parameter 1
0032h Parameter 2