laitimes

How does a smart meter connect to the control panel?

author:Yibaite Internet of Things application

Through an example demonstration, CHINT DDSU666 meter (single-phase meter is used here, and three-phase meter is the same) is connected to the MCGS control panel (TPC7062TX), and how to connect a smart meter that supports Modbus RTU protocol to the control panel is introduced.

Add a device driver

The first step in using the control screen is to create a project file, then configure the device driver according to the device to be used, open the device window, add the parent device (in fact, it is the hardware interface of the associated device), add the driver protocol, and DDSU666 support DLT645 to communicate with the Modbus RTU protocol at the same time, because the default driver TPC7062 only supports Modbus RTU protocol, if you need to use the DLT645 protocol and need to customize the device driver, here you use the Modbus RTU protocol to connect to the meter.

How does a smart meter connect to the control panel?

Configure interface parameters, TPC7062TX has two serial ports, one RS232 interface (COM1), one RS485 interface (COM2), and the DDSU666 uses RS485 interface, configuration baud rate is 9600, data bit 8 bytes, stop bit 1 byte, using no verification communication.

How does a smart meter connect to the control panel?

Nine numerical variables are added to record grid frequency, phase A voltage, phase A current, instantaneous total active power, instantaneous total reactive power, instantaneous total apparent power, total active power factor, energy zeroing and total active energy.

How does a smart meter connect to the control panel?

The query DDSU666 manual records the registration addresses and read/write attributes of the above variables:

How does a smart meter connect to the control panel?

The device properties on the left also need to configure the Modbus address of the meter, the address of the meter in the author's hand is 1, and other parameters can be kept as default, as shown in the following figure.

How does a smart meter connect to the control panel?

DDSU666 the register table given in the manual is arranged from the address of 0, and the TPC7062TX adopts the rule of sorting from 1, so the decimal plus one binding is required when configuring the address.

For example, the "phase A voltage" address is the 0x2000 of the holding register, which is converted to 8192 in decimal system, because the rules driven by the device need to be processed by adding 1, the register type is the holding register, the channel type needs to be configured as [4 area], the format of the stored data is IEE754 single-precision floating-point value, and the TPC needs to be configured as 32-bit floating-point, and the above address is basically the same type of continuous register, the author will add all at once, and the number of channels will be configured as 9, as shown in the following figure:

How does a smart meter connect to the control panel?

If the DDSU666 in hand needs to write to the register, it needs to be configured to 0x10 function code, and the function code can not control the power to empty the register normally if you have tried to use the 0x06 function code, if you don't need to write it, you can ignore the configuration of this step;

How does a smart meter connect to the control panel?

There may be different configuration rules for different device drivers, generally we can use the "Open Device Help Query Rules" button on the right side of the "Device Editing Window", for example, the "Multi-Com Modbus RTU" used by the author describes the driver register and address arrangement rules in detail in the internal properties;

How does a smart meter connect to the control panel?

In addition, the "Device Help" also introduces the special functions of the driver, such as device commands, which can directly send Modbus RTU instructions to query the device registers (Read, Write, ReadP and other commands) through this interface, without the need to match the variables with the registers one by one, and can also modify the serial communication parameters of the control screen in real time (SetCommPara command) through this interface.

Add an interface

Added a new feature "Function_08" to the user interface, the name can be customized. The author has integrated other functions here, and in order to distinguish them from each other, they are explained in the comments, right-click on the interface just added, and configure it as a startup window.

How does a smart meter connect to the control panel?

Use the "Label" and "Button" controls to add the following features;

How does a smart meter connect to the control panel?

Bind variables to label output controls such as voltage, current, grid frequency, etc.:

How does a smart meter connect to the control panel?

Select the floating-point type, natural decimal places, you can also limit the number of hours, and you can add unit VAC;

How does a smart meter connect to the control panel?

Bind the rest of the meter parameters according to the above method, and configure the "Clear Button" and the prompt in data clearing (there is a time difference in erasing Flash, so frequent operations are not recommended, so here you use the "Fill Color", "Visibility" and the time difference of clearing to generate a prompt message):

How does a smart meter connect to the control panel?
How does a smart meter connect to the control panel?

Simulator demo

The communication parameters of the DDSU666 meter are modified to the above configuration values, and the author uses the default factory value of the meter when configuring itself, and there is no need to change the parameters.

Start the analog console as shown in the following figure (using a two-pin plug to demonstrate, resulting in a negative value for the incoming wire):

How does a smart meter connect to the control panel?

Demo of the zeroing function:

How does a smart meter connect to the control panel?

Serial Server_Data Transmission Radio_4G DTU_ Remote Control Switch_LoRa/ZigBee/WiFi/Bluetooth Module-Chengdu Yibaite Electronic Technology Co., Ltd

Read on