D1-N Series Servo Drive User Manual Modbus Communication
14-4 HIWIN MIKROSYSTEM Corp.
(2) Read input registers (04h)
This function is used to read the contents of the contiguous blocks of input registers. The content of
each register is divided into 8 high bits and 8 low bits. 125 registers at most can be read at the same
time.
Table14.2.5
Request Data Length Value
Function code 1 Byte 04h
Starting address 2 Bytes 0x0000~0xFFFF
Register number 2 Bytes 1~125
Response Data Length Value
Function code 1 Byte 04h
Byte count 1 Byte 2 x N
Register value 2 x N Bytes
Error Data Length Value
Error code 1 Byte 84h
Exception code 1 Byte 01h, 02h, 03h, 04h
Note:
N is the number of registers.
Table14.2.6
Exception Code Definition Description
01h Illegal function The function code is not supported.
02h Illegal data address Try to read an illegal register.
03h Illegal data value The number of registers is over 125.
04h Servo device failure
The request contains incomplete data.
For instance, the controller only
requests 16 bits of a 32-bit parameter.