C.7 Message FormatYASKAWA ELECTRIC SIEP C710616 27C YASKAWA AC Drive A1000 Technical Manual 487MEMOBUS/ModbusCommunicationsCC.7 Message Format◆ Message ContentIn MEMOBUS/Modbus communications, the master sends commands to the slave, and the slave responds. The messageformat is configured for both sending and receiving as shown below, and the length of data packets depends on thecommand (function) content.◆ Slave AddressThe slave address in the message defines the note the message is sent to. Use addresses between 0 and FF (hex). If amessage with slave address 0 is sent (broadcast), the command from the master will be received by all slaves. The slavesdo not provide a response to a broadcast type message.◆ Function CodeThe three types of function codes are shown in the table below.◆ DataConfigure consecutive data by combining the MEMOBUS/Modbus register address (test code in case of a loopback test)and the data the register contains. The data length changes depending on the command details.A drive MEMOBUS/Modbus register always has a data length of two bytes. Therefore data written into drive registersmust also always have a length of two bytes. Register data read out from the drive will always consist of two bytes.◆ Error CheckThe drive uses a CRC-16 (cyclic redundancy check, checksum method) for checking data validity. Use the proceduredescribed below when calculating the CRC-16 checksum for command data or when verifying response data.■ Command DataWhen the drive receives data, it calculates the CRC-16 checksum from the data and compares it to the CRC-16 valuereceived within the message. Both must match before a command is processed.An initial value of FFFFH (i.e., all 16 bits equal 1) must be used for CRC-16 calculations in the MEMOBUS/Modbusprotocol.Calculate the CRC-16 checksum using the following steps:1. The starting value is FFFFH.2. Perform an XOR operation of this value and the slave address.3. Right shift the result.4. When the overflow bit of the shift operation becomes 1, perform an XOR operation of the result from step 3above and the fix value A001H.5. Repeat steps 3 and 4 until eight shift operations have been performed.6. After eight shift operations, perform an XOR operation with the result and the next data in the message (functioncode, register address, data). Continue with steps 3 to 5 until the last data has been processed.7. The result of the last shift or XOR operation is the checksum.SLAVE ADDRESSFUNCTION CODEDATAERROR CHECKFunctionCode Function NameData Length (bytes)Command Message Response MessageMinimum Maximum Minimum Maximum03H Read MEMOBUS/Modbus registers 8 8 7 3708H Loopback test 8 8 8 810H Write to multiple MEMOBUS/Modbus registers 11 41 8 8