The power line network is widely distributed, and the load of its access is 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 grid is in operation, people will measure the impedance value of the grid carrier channel, and use these data to optimize the carrier signal to 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 primary station controls the specific operation of the terminal by sending a message of a uniform format to the test terminal. The primary station is responsible for receiving and storing the data obtained by the terminal test, and performing related processing on the data uploaded by the terminal. Based on the free axis impedance test principle, the terminal can measure the modulus and phase of the low-voltage power line carrier channel impedance in the range of 80 kHz to 500 kHz [2-3]. Each terminal is equipped with a unique ID number. When the terminal successfully connects with the primary station, the ID of the online terminal device is displayed on the interface of the primary station management software, and the instruction is sent to the corresponding terminal device by selecting the ID number. Using the master station management software to set parameters such as test frequency points and measurement time intervals, the terminal can automatically perform carrier impedance measurement at a single frequency point or multiple frequency points, and save the measurement data.
The terminal can realize the automatic test of the impedance through setting the corresponding parameters of the main station. There are three communication modes between the main station and the terminal: USB, GPRS and Ethernet communication, which makes 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 commands to the terminal, but the USB interface of the computer is limited, and one PC cannot control multiple terminals at the same time, and The length of the USB cable is limited and can only be tested in close proximity [4-5]. The GPRS communication method can also be adopted. A subscriber identification module SIM card (Subscriber IdenTIty Module) is installed in the GPRS module of the terminal, and the communication setting item of the primary station can select the GPRS communication to control the terminal operation, but this method is expensive [2] ]. In order to reduce the test cost and achieve simultaneous monitoring of multiple terminals in different locations, an Ethernet communication method has been added. Ethernet can encapsulate any protocol data, with the advantages of standardization, flexibility, low cost, easy to use, etc. With Ethernet communication, the main station can simultaneously monitor multiple terminal devices in the same LAN [6,7] .
2 DZ3 carrier impedance test terminal Ethernet communication mode commissioning
The DZ3 carrier impedance test terminal has two original communication modes of USB and GPRS, and now adds Ethernet communication mode [8]. The essence is to add an Ethernet to serial port module based on the original hardware of the terminal, and perform related modification of the serial port receiving data in the software part of the terminal. The module sets an IP number for each terminal device, which can automatically detect the 10/100 Mb/s network environment and realize data conversion between TCP/IP and TTL. To ensure that the new communication method is used, the command and data can be transmitted normally between the terminal and the master station without affecting the normal operation of all other modules. It needs to be tested before use.
2.1 Modification of the terminal part program
In addition to the 04 command (the master station sends a command to the terminal to upload the ID number), all other commands are the same as the USB communication method, and the data processing mode is also consistent with the USB. The program enters the USB_Poll() function to execute the command. Processing, only the measurement packet is sent differently from USB, using serial port transmission, then serial port to Ethernet interface module, and finally uploaded to the main station by Ethernet. Therefore, the program of the terminal needs to increase the function of judging the connection of the terminal to the line, 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 commands sent by the primary station to the terminal, storing the received commands in a temporary buffer, and then calling the receive string comparison function to determine the received command flag. Now the program adds the Ethernet connection mode flag to process the data of the Ethernet connection mode, and then intercepts the valid test according to the second bit of the command (the second digit of the command indicates the length of the current received command). Number of digits.
(2) Modify the receive string comparison function GPRS_RecString_Comp(Uart0_Re_buf). This function was originally used to compare the string received in the GPRS communication mode so that the corresponding flag bit is set. Now the terminal has added a communication module for Ethernet and serial interface conversion. When the terminal and the primary station are both online and in the same local area network, in order to confirm whether the terminal device has successfully connected with the primary station, the primary station will send a 04 command to the terminal, ie ID number upload request command. At this time, if the terminal is connected to the line, the serial port interrupt receiving function of the terminal can receive the 04 command and then enter the receiving 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 primary station and set the Ethernet communication mode flag to 1, indicating that the terminal is The master station is connected successfully. Otherwise, the connection between the terminal and the primary station fails. The primary station cannot send commands to the terminal and receive data uploaded by the terminal by using Ethernet.
(3) Modify the void USB_Poll (unsigned char *n) function. This function is 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 transmission method is different, and therefore, the serial port transmission program is called in the original function. When the value of the Ethernet communication mode flag is 1, the data packet of the terminal is sent to the serial port to Ethernet module through the serial port, and transmitted to the primary station via the Ethernet.
Wireless Vacuum Cleaner,Best Wireless Vacuum Cleaner,Wireless Car Vacuum Cleaner,Best Vacuum Cleaner Wireless
Ningbo ATAP Electric Appliance Co.,Ltd , https://www.atap-airfryer.com