EasyManua.ls Logo

Datakom DPR-400 - Data Writing

Datakom DPR-400
70 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DPR-400 User Manual Rev_01 Firmware V-1.0
- 61 -
Data writing can be achieved with functions 06 (write single register) or 16 (write multiple registers).
Writing single register writes on only a single register. MODBUS master device sends the query which
includes the data to be written. The reply can be either “write successful” message or an error
message.
BYTE
DESCRIPTION
VALUE
0
Device Address
1 - 253
1
Function Code
6
2
Register Address
(Top)
Writeable register addresses are listed below
3
Register Address
(Bottom)
Writeable register addresses are listed below
4
Data Top Byte
5
Data Bottom Byte
6
CRC Bottom Byte
CRC calculation is explained below
7
CRC Top Byte
CRC calculation is explained below
An example message is given below which writes the value 0010h to the address 40h (64 decimal).
01 06 00 40 00 10 89 D2 (each byte is expressed by 2 hexadecimal characters)
Expected return message same as query:
BYTE
DESCRIPTION
VALUE
0
Device Address
1 - 253
1
Function Code
6
2
Register Address
(Top)
Writeable register addresses are listed below
3
Register Address
(Bottom)
Writeable register addresses are listed below
4
Data Top Byte
5
Data Bottom Byte
6
CRC Bottom Byte
CRC calculation explained below
7
CRC Top Byte
CRC calculation explained below
Error return message:
BYTE
AÇIKLAMA
DEĞER
0
Device Address
Same as query
1
Function Code
134 (Function code+128)
2
Error Code
2: Invalid Address
10: Write Protected
3
CRC Bottom
Byte
CRC calculation explained below
4
CRC Top Byte
CRC calculation explained below
14.5. WRITING DATA

Table of Contents

Related product manuals