D2 Series Servo Drive User Manual Modbus Communication
HIWIN MIKROSYSTEM CORP. 13-3
Table13.2.2
Data Length Value
Request
Function code 1 Byte 03h
Starting address 2 Bytes 0x0000 - 0xFFFF
Quantity of registers 2 Bytes 1 - 125
Response
Function code 1 Byte 03h
Byte count 1 Byte 2 x N
Register value 2 x N Bytes
Error
Error code 1 Byte 83h
Exception code 1 Byte 01h, 02h, 03h, 04h
Note:
N is the quantity of registers.
Table13.2.3
Exception Code
Exception Name Cause
01h
Illegal function The function code is not supported.
02h
Illegal data address Try to read an illegal register.
03h
Illegal data value The quantity of registers is too large (>125).
04h
Server device failure
The accessed data includes the incomplete data.
For example, the host controller only requests 16
bits of 32-bits parameter.
The following table is an example of requesting to read registers 0x006B - 0x006D. For the case of
normal response, the content of register 0x006B is shown as the 2-bytes value of “02 2Bh”, the
content of register 0x006C is the 2-bytes value of “00 00h”, and the content of register 0x006D is the
2-bytes value of “00 64h”.
Table13.2.3
Command Response Error
Slave address 01h Slave address 01h Slave address 01h
Function code 03h Function code 03h Error code 83h
Starting
address
Hi 00h Byte count 06h Exception code 02h
Lo 6Bh
Register 0x006B
Hi 02h
CRC
Lo C0h
Quantity of
registers
Hi 00h Lo 2Bh Hi F1h
Lo 03h
Register 0x006C
Hi 00h
CRC
Lo 74h Lo 00h
Hi 17h
Register 0x006D
Hi 00h
Lo 64h
CRC Lo 05h