GPD315 Modbus RTU Technical Manual TM 4325
Page
14
A CRC-16 value is generated from a calculation using the values of the address, function code,
and data sections of the message. The procedure for calculating a CRC-16 value is described at
the end of this chapter. When the master receives the fault response message it calculates a
CRC-16 value and compares it to the one in the CRC-16 field of the fault response message. If
these two CRC-16 values are the same the master has received the proper fault response
message.
Write Multiple Registers - 10h
The multiple register write function (10h) allows the master to write data to the drive’s registers.
The multiple register write message format is shown below.
Table 4-8 Write Command Message
Slave Address
01h
Function Code
10h
Upper
00h
Starting Register
Lower
01h
Upper
00h
Quantity
Lower
02h
Number of Data Bytes
04h
Upper
00h
First Register Data
Lower
01h
Upper
02h
Next Register Data
Lower
58h
Lower
63h
CRC-16
Upper
39h
Each GPD315’s slave address is set in advance by the drive parameter n153. Valid slave
addresses must be in the range of 1 to 31 decimal (1 to 1F hex). No two slaves may have the
same address. The master addresses the slave by placing the slave address in the address field
of the message. In the command message above, the slave is addressed at 1.
By setting the slave address to zero (0) in the address section of the message, the master can
send operation signals (register 1h) and frequency reference (register 2h) to all slaves on the
network. The master can send a single transmission to all the slaves simultaneously. This is
called simultaneous broadcasting. In a simultaneous broadcast message all of the slaves on the
network act upon one message. Simultaneous Broadcast registers are shown in Chapter 5,
Registers.
The function code of this message is 10h (write multiple registers).
The starting register number is the first register to be written to. In the command message above
the starting number is 01h, indicating that the first register is the frequency reference. A listing of
the GPD315’s registers is shown in Chapter 5, Registers.
The quantity indicates how many consecutive registers are to be written to. The quantity may
range from 1 to 8 registers. If the quantity is greater than 8, an error code of ‘3’ is returned in the
fault response message. In this command message there is two consecutive registers to be
written to: 01h-Operation Command and 02h- Frequency Reference.
The number of data bytes is the number of bytes of data to be written to the drive. The number
of data bytes is actually the quantity times 2, since there are two bytes of data in each register.