Ethernet-based DZ3 power line carrier impedance test system

The power line network is widely distributed, and the loads it accesses are complex and time-varying. The impedance matching of the carrier channel seriously affects the reliable and real-time transmission of the power line carrier [1]. When the power grid is in working state, people will measure the impedance value of the carrier channel of the power grid, and use these data to optimize the carrier signal and ensure the quality of carrier communication and meter reading. The DZ3 carrier impedance test device is used to measure the carrier channel impedance of the low-voltage power line. It is mainly composed of the main station and the terminal.

The master station controls the specific operation of the terminal by sending a unified format message command to the test terminal. The master station is responsible for receiving and storing the data obtained by the terminal test, and performing relevant processing on the data uploaded by the terminal. The terminal can measure the modulus value and phase of the impedance of the low-voltage power line carrier channel within the range of 80 kHz to 500 kHz according to the principle of free coordinate axis impedance testing [2-3]. Each terminal is equipped with a unique ID number. When the terminal is successfully connected to the main station, the ID number of the online terminal device will be displayed on the interface of the main station management software, and the command will be sent to the corresponding terminal device by selecting the ID number. Using the master station management software to set parameters such as test frequency and measurement time interval, the terminal can automatically complete the carrier impedance measurement of a single frequency point or multiple frequency points and save the measurement data.

By setting the corresponding parameters through the master station, the terminal can realize the automatic test of impedance. There are three communication methods between the master station and the terminal: USB, GPRS, and Ethernet communication methods, thereby making the impedance test more convenient. Using a USB cable to directly connect the computer to the terminal, the master station can read the measurement data in the terminal and send instructions to the terminal, but the USB interface of the computer is limited, and a PC cannot control multiple terminals at the same time The limited length of the USB cable can only be tested at close range [4-5]. You can also use the GPRS communication method. Install the customer identification module SIM card (Subscriber IdenTIty Module) in the GPRS module of the terminal. The communication setting item of the master station can control the operation of the terminal by selecting GPRS communication. ]. In order to reduce test costs and achieve simultaneous monitoring of multiple terminals in different locations, an Ethernet communication method has been added. Ethernet can encapsulate data of any protocol, and has the advantages of mature standardization, good flexibility, low cost, and ease of use. The Ethernet communication method is selected, and the master station can simultaneously monitor multiple terminal devices in the same local area network [6, 7] .

2 DZ3 carrier impedance test terminal Ethernet communication mode commissioning

The DZ3 carrier impedance test terminal has two original communication methods, USB and GPRS, and now the communication method of Ethernet is added [8]. The essence is to add an Ethernet to serial port module on the original basis of the terminal hardware, and modify the serial port to receive data in the software part of the terminal. This module sets an IP number for each terminal device, which can automatically detect the network environment of 10/100 Mb / s and realize data conversion between TCP / IP and TTL. In order to ensure that the new communication method is used, the command and data can be transmitted between the terminal and the master station normally, and does not affect the normal work of all other modules. It is necessary to test it before use.

2.1 Modification of some terminal programs

In addition to the 04 command (the master station sends a command to the terminal to upload the ID number), all other commands of the Ethernet data are the same as the USB communication method, and the data processing method is also the same as the USB. The program enters the USB_Poll () function to execute the command Processing, but the sending method of the measurement data packet is different from USB, which is sent through the serial port, then through the serial port to the Ethernet interface module, and finally uploaded to the master station by Ethernet. Therefore, the program of the terminal needs to add a function to judge that the terminal is online, and modify it in the serial port receiving data and part of the command processing program. The specific steps are as follows:

(1) Modify the serial port 0 receive interrupt function void IntUart0Rx (void) interrupt 4. The original program is responsible for receiving all the commands sent by the master station to the terminal, storing the received commands in the temporary buffer, and then calling the receive string comparison function to determine the received command flag is set. Now the Ethernet connection mode flag is added to the program to process the data of the Ethernet connection mode, and then the second bit of the command (the second digit of the command indicates the length of the currently received command) to intercept the effective test. Digits.

(2) Modify the receiving string comparison function GPRS_RecString_Comp (Uart0_Re_buf). This function was originally used to compare the character string received in GPRS communication mode in order to set the corresponding flag. Now the terminal has added a communication module for the conversion between Ethernet and serial interface. When both the terminal and the master station are online and in the same local area network, the master station will send a 04 command to the terminal to confirm whether the terminal device has successfully connected to the master station ID number upload request command. At this time, if the terminal is online, the serial port interrupt receiving function of the terminal can receive the 04 command, and then enter the receive string comparison function. The comparison function compares the received command with the correct command recorded in the program. If the received command is completely correct, the terminal will immediately reply the ID number to the master station and set the Ethernet communication mode flag to 1, indicating that the terminal is The master station is successfully connected. Otherwise, it means that the connection between the terminal and the master station has failed, and the master station cannot use Ethernet to send commands to the terminal and receive data uploaded by the terminal.

(3) Modify the void USB_Poll (unsigned char * n) function. This function was originally a command processing function of the USB communication method. Since the command processing of the Ethernet communication method is the same as that of the USB (except the 04 command), only the processed data packet sending method is different. When the value of the Ethernet communication mode flag bit is 1, the terminal's data packet is sent to the serial port to Ethernet module through the serial port, and then transmitted to the master station via Ethernet.

Kara offers a wide range of illuminated and non-illuminated Rocker Switches.Ranging from 1 to 6 poles,4VA to 30 amp,with many styles of  colors and functions,especially the switches with High-Current used very widely in the welding machines. Certifications include UL, CSA, TUV, CE, and more. Kara Rocker Switches include the KR1-Series abd KR2- Series based on different size of the panel cut-out.

rocker switch KR1-9



Rocker Switch

Rocker Switch,Waterproof Rocker Switch,Rocker Switch 3 Pin,Rocker Switch 4 Pin

Ningbo Kara Electronic Co.,Ltd. , https://www.kara-switch.com

Posted on