DPR-400 User Manual Rev_01 Firmware V-1.0
- 60 -
An example for reading 16 registers starting with the address 20h (32 decimal) is explained below.
01 03 00 20 00 10 45 CC (each byte is expressed by 2 hexadecimal characters)
Expected reply:
BYTE
DESCRIPTION
VALUE
0
Device Address
Same as query
1
Function Code
3
2
Data Byte Size
Number of Registers x 2
3
1
st
Register Top
Byte
4
1
st
Register
Bottom Byte
5
2
nd
Register
Top Byte
6
2
nd
Register
Bottom Byte
…
…
…
L+1
Last Register
Top Byte
L+2
Last Register
Bottom Byte
L+3
CRC Bottom
Byte
CRC calculation is explained below
L+4
CRC Top Byte
CRC calculation is explained below
Error return message:
BYTE
DESCRIPTION
VALUE
0
Device Address
Same as query
1
Function code
131 (Function code+128)
2
Error Code
2 (invalid address)
3
CRC Bottom
Byte
CRC calculation is explained below
4
CRC Top Byte
CRC calculation is explained below