DKM-411 Modbus Application Manual V3.0 (15.01.2017)
- 8 -
The function 06 (write single register) and the function 16 (write multiple registers) are used for data
writing.
The MODBUS master will send a query containing data to be written. The answer will be one of the below:
-A normal response confirming successful write,
-An exceptional response indicating a write error.
Only some of the available registers are authorized to be written. An attempt to write a write protected
register will result to the exceptional response.
The query message specifies the register address and data. The message structure is below:
See below the description of available registers
See below for the checksum calculation
Here is the sequence to write the value 0010h to the register 40h (64 decimal):
01 06 00 40 00 10 89 D2 (each byte is expressed as 2 hexadecimal characters)
The checksum value in the above message may be used for the verification of checksum calculation
algorithm
The normal response will be the same as the query:
See below the description of available registers
See below for the checksum calculation
The exceptional response will be:
134 (function code + 128)
See below for the checksum calculation
DATA WRITING (SINGLE REGISTER)