background image

page 8/15                                                                          KKEW9LC05-A/0-20160901

一、

MODBUS serial communication protocol 

1

1

8

No

EW9L series energy meter adopts Modbus RTU communication protocol RS485 half duplex communication , read function code 0x03, 

write function code 0x10 , adopts 16 digit CRC check, the energy meter does not feedback the check error.

Start bit

Data bit

Stop bit

Check bit

Communication protocol

(1) All the RS485 communication should comply with host/slave method. Under this method, information and data is transmitted between one host 
and maximum 32 slaves (monitoring equipment);
(2) Host will initialize and control all information transmitted in RS485 communication circuit. 
(3) In any case, communication can never be started from a slave.  
(4) All the RS485 communication is sending by packet . One data packet is a simple string (every string has 8 bit). One packet include 128 byte
     at most. The bytes in the packet formed in standard asynchronous serial data , and transmitting in the mode of 8 data bits, 1 stop bit, no check bit.     
(5) Host sending is called request, slave sending is called response. 
(6) In any case, slave can only respond to one request of host.  

2. Each MODBUS data packet is consisted several parts as below:   
  (1) Slave address; (2) Function code to be executed; (3) Register address (variate address); (4) Data; (5) CRC check;

(1) Slave address: address length is 1 byte, effective slave address range is 1-247, if slave receives a data packet, whose frame address information 
     is consonant with its own address information , it will execute the order of data packet. 
(2) Function code length in MODBUS data packet is one byte, used to inform the slave what kind of operation needs to be executed. The slave 
  response data packet should have the same function code byte of the operation requested by host. 

Please refer to below table for related function code:  

Transmitting package in RS485 network should follow the time regulation as follows:  
(1) When baud rate set as 9600, the delay time between two host request is recommended to be 300ms or more, lesser time may cause the
     loss of data packet.
(2) When the recommended baud rate is 9600, if use smaller baud rate, please enlarge delay time properly. For example, when baud rate is 2400, 
     two request should be set as more than 500ms. 

II. Network time consideration

III. Abnormal communication processing

If host send a illegal data packet or host request a invalid data register, abnormal data response will happen. This abnormal data response is 
consisted of slave address, function code, error code and check area. When the high bit position of function code area is 1, it means the present
data frame is abnormal response. 
Below table illustrates the meaning of abnormal function code: 
According to MODBUS communication requirement, abnormal response function code=request function code+0x80; when abnormal response,
 put 1 on the highest bit of function code. For example: if host request function code is 0x04, slave response function code is 0x84.

0x01

Function code error

Meter received the unsupported function code

Variable address error Data location designated by host exceeds range of meter, or receive illegal register operation. 

Variable value error

Data value sent from host exceeds the corresponding data range of meter, or data structure is incomplete

0x02

0x03

0x03

Read register

0x06

 

Write single-register

 

(3) Register address variable: data area storage location when slave executes effective order. Different variable seizes differents numbers of 
      register, some address variable seizes two register, 4 byte data, somevariable seizes one register, 2 byte data, please use according to 
      actual situation. 
(4) Data area: data area includes the data required by terminal to execute specified function or collected data when terminal respond to query. 
     The content of the data could be numerical value, reference address or set value; for example: function code tells terminal to read a register, 
     data area needs to indicate which register to started from and how much data to be read, embedded address and data will be different 
     according to different content between type and slave; register numerical value send sequence : high byte in the front, low byte in the back. 
(5) CRC check: MODBUS-RTU mode adopts 16 bit CRC check. Sending equipment should do CRC16 calculation for each data of packet, 
     final result is stored in check area. Receiving equipment also make CRC16 calculation for each data of packet (except check area), and 
     compare result area with check area; only the same packet can be accepted, for the specific CRC check algorithm please refer to appendix.       

0x10

Write multi-register

Read one or more present register value 
Write specified value into one internal register

Write specified value into several internal registers (Factory default write single register)

Function code               Meaning                                                                               Function

Error code type              Name                                                                  Contents illustration

1. Read multi-register 

For example, host reads UA (A phase voltage), suppose measured A phase voltage is 220.0V. 
The address code of UA is 0x4000, because UA is fixed data (4 byte), seizes 2 data register, the hexadecimal data of 220.0V is 

0x0000898 (2200)

.

IV. Communication frame format illustration

Summary of Contents for EW9L C Series

Page 1: ...demand statistics function Optional harmonic analysis funtion including the total harmonic EW9L C EW9L S EW9L F EW9L H No No No 4 20mA No No No No No No Yes Yes 1 loop RS485 1 loop RS485 1 loop RS485...

Page 2: ...DI connection Pulse output connection DC 2000V Input output power supply to Meter cover 5M Symbol Meaning voltage current power Frequency No symbol Name Function Set Key Check measuring value and wor...

Page 3: ...percentage Total voltage harmonics percentage A Phase parameters B Phase parameters C Phase parameters Measuring Status Menu Operation press SET more than 5 seconds First class Second class Third cla...

Page 4: ...eters Meter s address range Baud Rate Data format 1st Alarm mode 1st Alarm unit 1st alarm value setting 1st alarm Hysteresis value setting 1st alarm relay output choice 1st alarm start delay 1st alarm...

Page 5: ...lash flash flash flash flash flash flash 1st transmition high limit value 1st transmition low limit value year Month Day Hour Minute Second Period 1 tarrif rate Period 2 tarrif rate Period 12 tarrif r...

Page 6: ...delay Alarm mode Alarm unit Alarm value Alarm hysteresis value alarm relay setting alarm start delay alarm finish delay Input 1111 to clear energy Input 2222 to clear maximum demand input 1234 to res...

Page 7: ...ut AP RP and RS485 interface for the transmit of energy data The energy pulse of optical couple relay with open collector enables the long distance transmit of active energy AP reactive energy RP Remo...

Page 8: ...dress function code error code and check area When the high bit position of function code area is 1 it means the present data frame is abnormal response Below table illustrates the meaning of abnormal...

Page 9: ...st send read 01 address meter read the current value data started from 400C A phase current register Hexadecimal code of 100 000 is 000186A0 hexadecimal code of 200 000 is 00030D40 hexadecimal code of...

Page 10: ...Data byte length low bit Data byte length Data 1 high bit Data 1 low bit CRC code low bit CRC code high bit Meter address Function code Start address high 8 bit Start address low 8 bit Data byte lengt...

Page 11: ...122 2 long long Note Note Note Note No decimal point active power maximum demand reactive power demand reactive power maximum demand A phase voltage harmonic content B phase voltage harmonic content C...

Page 12: ...transmit mode refer to table 1 1st transmit unit note note Link mode extend note note note note note Communication address Baud rate Data format switch output switch input remote input extend No deci...

Page 13: ...demand happen time day reactive power maxi demand happen time hour reactive power maxi demand happen time minute reactive power maxi demand happen time second no decimal point Reference table 1 Refer...

Page 14: ...ion value Menu display Communication value D7 D6 D5 D4 D3 D2 D1 D0 AL1 status 0 No alarm 1 Alarm AL2 status 0 No alarm 1 Alarm Note Measure Satus Indication switch output S1 status 0 close 2 disconnec...

Page 15: ...r than 5A If some other meters are connected with the same CT the connection should be serial for all meters C Please make sure that the input voltage is corresponding to the input current they should...

Reviews: