Hiwin D2 User Manual page 288

Hide thumbs Also See for D2:
Table of Contents

Advertisement

D2 Drive User Guide v1.8
Command
Slave address
Function code
Starting
address
Quantity of
registers
CRC
(2) Read input registers (04h)
This function is used to read the contents of the consecutive blocks of input registers in
the drive. The related data format is given in the following table. The content of each
register is divided into the 8-bits higher data ("Hi") and the 8-bits lower data ("Lo"). The
maximum of consecutive blocks read at the same time is 125.
Request
Function code
Starting address
Quantity of registers
Response
Function code
Byte count
Register value
Error
Error code
Exception code
Note. N is the quantity of registers.
Exception
Exception name
code
01h
Illegal function
02h
Illegal data address
03h
Illegal data value
04h
Server device failure
The following table is an example of requesting to read the register 0x0008. For the case of
normal response, the content of register 0x0008 is shown as the 2-bytes value of "00 0Ah".
HIWIN Mikrosystem Corp.
Response
01h
Slave address
03h
Function code
Hi
00h
Byte count
Lo
6Bh
Register
0x006B
Hi
00h
Lo
03h
Register
0x006C
Lo
74h
Hi
17h
Register
0x006D
CRC
Data length
1 Byte
2 Bytes
2 Bytes
1 Byte
1 Byte
2 x N Bytes
1 Byte
1 Byte
Cause
The function code is not supported.
Try to read an illegal register.
The quantity of registers is too large (>125).
The accessed data includes the incomplete data.
For example, the host controller only requests 16
bits of 32-bits parameter.
Table D-5
01h
03h
06h
Hi
02h
Lo
2Bh
Hi
00h
Lo
00h
Hi
00h
Lo
64h
Lo
05h
Hi
7Ah
Table D-6
Value
04h
0x0000 - 0xFFFF
1 - 125
04h
2 x N
84h
01h, 02h, 03h, 04h
Table D-7
D. Modbus Communication
Error
Slave address
01h
Error code
83h
Exception code
02h
Lo
C0h
CRC
Hi
F1h
282

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents