Yaskawa GPD 515-G5 Modbus RTU User Manual

Page 31

Advertising
background image

The Message Format 6-11

The quantity indicates how many consecutive registers are to be written to. The quantity may
range from 1 to 16 registers. If the quantity is greater than 16, 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.

The data section of the response message contains 8 upper and 8 lower bits of data for each
register that is being written to.

A CRC-16 value is generated from a calculation using the values of the address, function code,
starting register number, quantity, number of data bytes, and data sections of the message. The
procedure for calculating a CRC-16 is described at the end of this chapter. When the slave
receives the command message it calculates a CRC-16 value and compares it to the one in CRC-
16 field of the command message. If these two CRC-16 values are the same the slave has
received the proper command message. If these two CRC-16 values are not the same the slave
does not respond.

If the command message has a valid slave address, function code, starting register number,
quantity, number of data bytes, and data values, the slave will respond with a normal response
message. If the command message has an invalid slave address, function code, starting register
number, quantity, number of data bytes, and/or data values the slave will respond with a fault
response message.

Normal Response Message

The normal response message contains the same slave address and function code as the
command message, indicating to the master which slave is responding and to what type of
function it is responding.

The starting number is the first register that was written to. In the response message above the
starting number is 01h, indicating that the first register is the operation command.

The quantity indicates how many consecutive registers were written to.

01h

SLAVE ADDRESS

FUNCTION CODE

10h

00h

01h

START-
ING
REGISTER
NUMBER

UPPER

LOWER

10h

08h

CRC-16

LOWER

UPPER

QTY.

00h

02h

UPPER

LOWER

Advertising
This manual is related to the following products: