Chint DDSU666 single-phase energy meter RS485-MODBUS RTU communication instructions

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

Chint DDSU666 single-phase energy meter RS485-MODBUS RTU communication instructions

Communication Function

The instrument adopts RS485 communication mode, and the baud rate can be set to 1200, 2400bps, 4800bps, and 9600bps.
Up to 32 instruments can be connected simultaneously on the same communication line, and each instrument can set its communication address. The communication connection should use shielded twisted pair cables with copper mesh, and the wire diameter should not be less than 0.5mm2. When wiring, the communication line should be kept away from strong electrical cables or other strong electric field environments, with a maximum transmission distance of 1200m. The typical network connection method is shown in the figure, and users can choose other suitable connection methods according to specific situations.

Chint DDSU666 single-phase energy meter RS485-MODBUS RTU communication instructionsFigure

The data frame for switching from DL/T 645-2007 protocol to ModBus RTU communication protocol is as follows:

FE FE FE FE 68 xx xx xx xx xx xx 68 14 0E 33 33 35 3D 35 33 33 33 33 33 33 33 33 33CS 16

Note: xx xx xx xx xx xx is the screen display address. If the number is 21 02 25 02 15 21, fill in 21 15 02 25 02 21, and fill in the reversed barcode number on the instrument side

Chint DDSU666 single-phase energy meter RS485-MODBUS RTU communication instructionsFigure1

CS is the last two bits of the checksum from 68 xx xx to 33 33 33, excluding the first four FEs;

The modified Modbus address, baud rate, data bits, checksum, and stop bits are displayed on the instrument screen.

The default DL/T645 connection parameter is (8n22400bps). Send the above command and observe the meter screen display. When "DLT645" changes to "Modbus", it means the switch is successful. Observe the number on the screen after the "Modbus" display, which is the Modbus slave address of the meter, displayed in decimal. Note that the default baud rate of Modbus is 9600. When the instrument is set to ModBus RTU transmission mode, the ModBus RTU communication protocol adopts a master-slave response communication connection method on one communication line. Firstly, the signal from the host computer is addressed to a terminal device (slave) with a unique address, and then the response signal sent by the terminal device is transmitted to the host in the opposite direction, that is, in half duplex working mode. This protocol only allows communication between hosts (PCs, PLCs, etc.) and terminal devices, and does not allow data exchange between independent terminal devices. This way, each terminal device will not occupy the communication line during their initialization, but only respond to query signals that arrive locally. The instrument provides ModBus RTU communication protocol (see Appendix A), and the parameter information that can be read or modified through communication is shown in the table below.

When the instrument is set to ModBus RTU transmission mode, the ModBus RTU communication protocol adopts a master-slave response communication connection method on one communication line. Firstly, the signal from the host computer is addressed to a terminal device (slave) with a unique address, and then the response signal sent by the terminal device is transmitted to the host in the opposite direction, that is, in half duplex working mode. This protocol only allows communication between hosts (PCs, PLCs, etc.) and terminal devices, and does not allow data exchange between independent terminal devices. This way, each terminal device will not occupy the communication line during their initialization, but only respond to query signals that arrive locally.
The instrument provides ModBus RTU communication protocol (see Appendix A), and the parameter information that can be read or modified through communication is shown in the table below.

Parameter AddressParameter CodeParameter DescriptionData TypeData Length WordRead/Write Properties
0000HUcodEProgramming Password CodeEint1R
0001HREV.Software Versionint1R/W
0002HCLrEEnergy Clearing CLr. Eint1R/W
0003HRESERVEDReserveint1R/W
0004HRESERVEDReserveint1R/W
0005HChangeProtocolProtocol switching settingsint1R/W
0006HAddrThis address is only valid when using Modbus RTUint1R/W
0007HRESERVEDReserveint1R/W
0008HRESERVEDReserveint1R/W
0009HRESERVEDReserveint1R/W
000AHRESERVEDReserveint1R/W
000BHRESERVEDReserveint1R/W
000CHBAudBaud rateint1R/W
000DHRESERVEDReserveint1R/W
000EHRESERVEDReserveint1R/W
000FHRESERVEDReserveint1R/W
0010HRESERVEDReserveint1R/W
2000HUA-phase voltagefloat2R/W
2002HIA-phase currentfloat2R/W
2004HPInstantaneous total active powerfloat2R/W
2006HQInstantaneous total reactive powerfloat2R/W
2008HSInstantaneous total apparent powerfloat2R/W
200AHPFTotal power factorfloat2R/W
200CHRESERVEDReservedfloat2R/W
200EHFreqGrid frequencyfloat2R/W
2010HRESERVEDReservedfloat2R/W
4000HEpActive total energyfloat2R/W
Communication parameter information

ChangeProtocol switching mode word, data 2 is Modbus RTU protocol, data 1 is DL/T 645-2007 protocol;

CLr. E electric energy reset write 1 to clear the total electric energy;

Baud baud rate: 0:1200bps; 1:2400bps; 2:4800bps; 3:9600bps;

Communication Example

Function Code 03H: Read Register

The host needs to read data from two registers with a slave address of 01H and a starting register address of 0CH. The host sends:

Address CodeFunction CodeStarting Register AddressRegister QuantityCRC Check Code
010300 0C00 0204 08

If the data in the slave registers 0CH and 0DH are 0000H and 1388H, the slave returns:

address codefunction codebyte countRegister 0CH dataRegister 0DH dataCRC check code
01030400 0013 88F7 65

Function code 10H: Write to multiplex register

For example, the host needs to save data 0002H, 1388H, and 000AH to three registers with slave address 01H and starting register address 00H.

Host sends:

Address codeFunction codeStart register addressNumber of registersNumber of bytes written00H Register to be written data01H Register to be written data02H Register to be written dataCRC check code
011000 0000 030600 0213 8800 0A9B E9

Slave return:

Address codeFunction codeStarting register addressNumber of registersCRC check code
011000 0000 0380 08

16 bit CRC checksum

The host or slave can use the checksum to determine whether the received information is correct. Due to electronic noise or other interference, errors may occur during the transmission of

information. The checksum can verify whether the communication information between the host or slave is incorrect. The 16 bit CRC checksum is calculated by the host and placed at the end of the transmitted information frame. Re calculate the CRC of the received information from the slave, compare the calculated CRC with the received CRC to see if they are consistent. If they are not consistent, it indicates an error. Only 8 data bits are used for CRC calculation, and the start and stop bits do not participate in CRC calculation.

The 16 bit CRC checksum is calculated by the host and placed at the end of the transmitted information frame. Re calculate the CRC of the received information from the slave, compare the calculated CRC with the received CRC to see if they are consistent. If they are not consistent, it indicates an error. Only 8 data bits are used for CRC calculation, and the start and stop bits do not participate in CRC calculation.

The calculation method for CRC check code is as follows:

1) Preset one 16 bit register as hexadecimal FFFF (i.e. all 1s), and call this register CRC register;

2) Place the first 8-bit binary data (the first byte of the communication information frame) that is different from the lower 8-bit OR of the 16 bit CRC register, and place the result in the CRC register;

3) Move the content of the CRC register to the right by one bit (towards the lower bit) and fill the highest bit with 0, and check the shifted bit after the right shift;

4) If the displacement is 0: repeat step 3) (move one more position to the right);

If the offset is 1: XOR the CRC register with polynomial A001 (1010 0000 0000 0001);

5) Repeat steps 3) and 4) until the entire 8-bit data is processed by shifting to the right 8 times;

6) Repeat steps 2) to 5) to process the next byte of the communication information frame; After calculating all bytes (excluding CRC checksum) of the communication information frame according to the above steps, the content of the CRC register obtained is the 16 bit CRC checksum.

7) After calculating all bytes (excluding CRC checksum) of the communication information frame according to the above steps, the content of the CRC register obtained is the 16 bit CRC checksum.

Error Handling

When the instrument detects errors other than CRC check code errors, it will send a message back to the host. The highest position of the function code is 1, which means that the function code sent from the slave to the host is based on the function code sent by the host plus 128. The error message frame format returned by the slave is as follows:

Address codeFunction code (highest bit is 1)Error codeCRC check code
1 byte1 byte1-byte2-byte

Error code as follows:

01HIllegal function codeReceived function code instrument does not support
02HIllegal register addressReceived register address exceeds instrument's register address range
03HIllegal data valueReceived data value exceeds corresponding address's data range

Modbus Technology Communication QQ Group

Chint DDSU666 single-phase energy meter RS485-MODBUS RTU communication instructionsFigure2
Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.