background image

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: 
 

Byte 

Description 

Value 

Controller address 

1 to 240 

Function code 

Register address high 

See below the description of available registers 

Register address low 

Data high byte 

 

Data low byte 

CRC low byte 

See below for the checksum calculation 

CRC high byte 

 
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: 

Byte 

Description 

Value 

Controller address 

1 to 240 

Function code 

Register address high 

See below the description of available registers 

Register address low 

Data high byte 

 

Data low byte 

CRC low byte 

See below for the checksum calculation 

CRC high byte 

 
 

The exceptional response will be: 

Byte 

Description 

Value 

Controller address 

same as in the query 

Function code 

134   (function code + 128) 

Exception code 

2 (illegal address) 
or  
10 (write protection) 

CRC low byte 

See below for the checksum calculation 

CRC high byte 

 

DATA WRITING (SINGLE REGISTER)

 

Содержание DKM-411

Страница 1: ...DKM 411 Modbus Application Manual V3 0 15 01 2017 1 MODBUS APPLICATION MANUAL DKM 411 ...

Страница 2: ...document will apply to both Modbus through RS 485 and Modbus TCP IP communications FILENAME DESCRIPTION 411_USER DKM 411 User Manual 411 Ethernet Configuration Ethernet Configuration Guide for DKM 411 411 GSM Configuration GSM Configuration Guide for DKM 411 REVISION DATE AUTHOR DESCRIPTION 01 14 02 2013 MH First issue firmware version 1 0 02 05 11 2013 MH Added counter min max registers 03 12 09 ...

Страница 3: ...d at http www modbus org docs Modbus_Application_Protocol_V1_1b pdf The MODBUS properties of the unit are Data transfer mode RTU Serial data selectable baud rate 8 bit data no parity 1 bit stop Modbus TCP IP Ethernet 10 100Mb or GPRS Class 10 Supported functions Function 3 Read multiple registers Function 6 Write single register Function 16 Write multiple registers Each register consists of 2 byte...

Страница 4: ...the proper operation Ethernet Network IP May be left as 0 0 0 0 for automatic address claim or set to a value in order to claim a defined address Ethernet Gateway IP Should be set in accordance with your local switch configuration Ethernet Subnet Mask Should be set in accordance with your local switch configuration The complete Ethernet port specifications are found in the DKM 411 User Manual Plea...

Страница 5: ...DKM 411 Modbus Application Manual V3 0 15 01 2017 5 Modbus address RS 485 port enable RS 485 Baud Rate Modbus TCP IP port Modem Selection Modem Baud Rate ...

Страница 6: ...DKM 411 Modbus Application Manual V3 0 15 01 2017 6 User IP Masks Ethernet port enable Ethernet IP address Ethernet gateway IP Ethernet subnet mask GPRS enable ...

Страница 7: ...C low byte See below for the checksum calculation 7 CRC high byte Here is the sequence to read 16 registers starting from address 20h 32 decimal 01 03 00 20 00 10 45 CC 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 Byte Description Value 0 Controller address s...

Страница 8: ...ata high byte 5 Data low byte 6 CRC low byte See below for the checksum calculation 7 CRC high byte 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 t...

Страница 9: ...egisters high always 0 5 Number of registers low max 6 Data lenght in bytes L number of registers 2 7 High byte of 1st register 8 Low byte of 1st register 9 High byte of 2nd register 10 Low byte of 2nd register L 5 High byte of the last register L 6 Low byte of the last register L 7 CRC low byte See below for the checksum calculation L 8 CRC high byte The normal response is below Byte Description ...

Страница 10: ...ssage such that the low byte is transmitted first The algorithm should give the correct CRC for below messages 01 03 00 20 00 10 45 CC 01 06 00 40 00 10 89 D2 Error codes Only 3 error codes are used 01 illegal function code 02 illegal address 10 write protection attempt to write a read_only register Data types Each register consists of 16 bits 2 bytes If the data type is a byte only the low byte w...

Страница 11: ...203 R W 16bit Hours 0 23 UTC 8214 R W 16bit Minutes 0 59 UTC 8215 R W 16bit Seconds 0 59 UTC ADDRESS decimal R W DATA SIZE COEFF DESCRIPTION 12288 R W 32bit x10 kWh_1 import 12290 R W 32bit x10 kWh_1 export 12292 R W 32bit x10 kVArh_1 inductive 12294 R W 32bit x10 kVArh_1 capacitive 12296 R W 32bit x10 Group_1 Hour Counter 12298 R W 32bit x10 kWh_2 import 12300 R W 32bit x10 kWh_2 export 12302 R W...

Страница 12: ...0 Minimum I3 12490 R 32bit x10 Minimum In 12492 R 32bit x100 Minimum Frequency 12494 R 32bit x100 Minimum kW import 12496 R 32bit x100 Minimum kW export 12498 R 32bit x100 Minimum kVAr inductive 12500 R 32bit x100 Minimum kVAr capacitive 12502 R 32bit x10 Maximum V1 12504 R 32bit x10 Maximum V2 12506 R 32bit x10 Maximum V3 12508 R 32bit x10 Maximum U12 12510 R 32bit x10 Maximum U23 12512 R 32bit x...

Страница 13: ...510 R 32bit x100 Phase L2reactive power 20512 R 32bit x100 Phase L3reactive power 20514 R 32bit x100 Total reactive power 20516 R 32bit x100 Phase L1 apparent power 20518 R 32bit x100 Phase L2apparent power 20520 R 32bit x100 Phase L3apparent power 20522 R 32bit x100 Total apparent power 20524 R 16bit x1000 Phase L1 power factor 20525 R 16bit x1000 Phase L2power factor 20526 R 16bit x1000 Phase L3...

Страница 14: ...Phase L3 current harmonics and waveform buffer BUFFER STRUCTURE The buffer consists of 289 x 16 bit registers The structure is below ADDRESS decimal R W DATA SIZE COEFF DESCRIPTION BASE 0 R 16bit x10 THD of this channel BASE 1 R 512bit 32x16 x10 This string of 32 registers carry individual harmonics of the selected channel staring from H 01 until H 63 The first register represents the fundamental ...

Страница 15: ...of voltage V3 V1 angle 0 23466 R 16bit Phasor diagram phase angle of voltage I1 V1 angle 0 23467 R 16bit Phasor diagram phase angle of voltage I2 V1 angle 0 23468 R 16bit Phasor diagram phase angle of voltage I3 V1 angle 0 23469 R 16bit Topology 0 3 phase 4 wire star 1 single phase 2 wire 2 2 phase 3 wire L1 L2 3 3 phase 3 wire 4 3 phase 4 wire delta 5 3 phase 3 wire 2CTs L1 L2 6 3 phase 3 wire 2C...

Страница 16: ...alarm 13 Low frequency alarm 14 High frequency alarm 15 Frequency alarm 16 Low active power alarm 17 High active power alarm 18 Active power alarm 19 Capacitive reactive power alarm 20 Inductive reactive power alarm 21 Reactive power alarm 22 Capacitive power factor alarm 23 Inductive power factor alarm 24 Power factor alarm 25 High current alarm 26 High THD V alarm 27 High THD I alarm 28 High THD...

Отзывы: