YASKAWA
SIEP C730600 0E YAI Modbus TCP/IP Technical Manual
41
Table 7.27 Example Read/Write Multiple Registers Command
Description
Data (Hex.)
Slave Address (Unit Identifier)
01
Function Code
17
Read Starting Register
Upper
00
Lower
01
Quantity of Registers to Read
Upper
00
Lower
02
Write Starting Register
Upper
01
Lower
02
Quantity of Registers to Write
Upper
00
Lower
02
Write Byte Count
04
First Write Register Data
Upper
01
Lower
03
Next Write Register Data
Upper
02
Lower
58
Table 7.28 Example Read/Write Multiple Registers Response
Description
Data (Hex.)
Slave Address (Unit Identifier)
01
Function Code
17
Number of Data Bytes
04
Read Data 1
Upper
00
Lower
01
Read Data 2
Upper
00
Lower
02
Table 7.29 Example Read/Write Multiple Registers Error Response
Description
Data (Hex.)
Slave Address (Unit Identifier)
01
Error Code
97
Exception Code
02
■
Modbus TCP/IP Exception Codes
When an error occurs, remove the cause and restart communications. The response message will contain one of
the Error Codes defined in
Table 7.30 Modbus TCP/IP Exception Codes
Error Code
(Hex.)
Error Name and Cause
01
Function Code Error
Attempted to set a function code from a PLC other than 03 (Hex.), 06 (Hex.), 10 (Hex.), and 17 (Hex.).
02
Register Number Error
A register number specified in the command message does not exist.
03
Data Length Error
•
Invalid command message quantity
•
In a write message, the value for write byte count does not match twice the value of the stated quantity of registers to write.
21
Data Setting Error
•
Control data or parameter write data is outside the allowable setting range.
•
Attempted to write a contradictory parameter setting.
22
Write Mode Error
•
Attempted to write while the drive was operating to a parameter that cannot be written to during run.