7 Modbus TCP/IP MessagingYASKAWA ELECTRIC SIEP C730600 59A V1000 Option Modbus TCP/IP Technical Manual 29Examples of Multiple Register Write CommandTable 28 lists command examples when writing register values 0001H and 0258H to register addresses 0001H and0002H in a drive with the slave address (unit identifier) 01H.Table 29 shows examples of responses indicating that the write command has been executed successfully. The commandspecifies the beginning of the register address and the number of registers.Table 30 shows examples of an error response when writing to a register. The exception code is 02H (indicating a registernumber error).Table 28 Example Write Multiple Registers CommandTable 29 Example Write Multiple Registers ResponseTable 30 Example Write Multiple Registers Error Response 23 (17 H) Read/Write Multiple RegistersThis function code performs a combination of one read operation and one write operation in a single Modbus TCP/IPtransaction. The write operation is performed before the read. The command specifies the starting read address, quantityof contiguous registers to read, starting write address, quantity of contiguous registers to write and the values to bewritten. The normal response contains the values of the registers that were read.For both the address and the values, the first byte contains the most significant bits and the second byte contains the leastsignificant bits.Table 31 Read/Write Multiple Registers CommandDescription Data (H)Slave Address 01Function Code 10Starting Register Upper 00Lower 01Quantity of Registers Upper 00Lower 02Number of Data Bytes 04First Register Data Upper 00Lower 01Next Register Data Upper 02Lower 58Description Data (H)Slave Address 01Function Code 10Starting Register Upper 00Lower 01Quantity of Registers Upper 00Lower 02Description Data (H)Slave Address 01Error Code 90Exception Code 02Description Byte(s) Data (H)Slave Address<1> M = Quantity of Registers to Read (range is 1 - 16)<2> N = Quantity of Registers to Write (range is 1 - 16)1 00 to FFFunction Code 1 17Read Starting Register 2 0000 to FFFFQuantity of Registers to Read 2 M <1>Write Starting Register 2 0000 to FFFFQuantity of Registers to Write 2 N <2>Write Byte Count 1 N <2> x 2Write Register Values N <2> x 2 0000 to FFFF