DK-45 Kullanım Kılavuzu V1.0 (22.09.2016)
- 51 -
Data Writing (single register)
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