Inverter wifi function test method and device, electronic equipment and storage medium
By using the upper computer to control the inverter on the production line to switch to boost constant current mode and conduct WiFi function testing, the problems of low accuracy and high cost of WiFi function testing in the existing technology are solved, and more efficient and accurate testing is achieved. Ensure that the test results meet the actual application scenario.
Patent Information
- Application Number
- CN202410822660.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-12-13
Smart Images

Figure CN119136241A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of inverters, and in particular relates to a method, a device, an electronic device and a storage medium for testing a wifi function of an inverter. Background Art
[0002] In order to ensure that the wireless communication, APP control, remote debugging and other functions of the inverter equipment are working normally, it is necessary to perform WiFi function testing on the inverter equipment with WiFi communication function on the production line.
[0003] At present, when testing the wifi function of inverter equipment with wifi communication function on the production line, the general test method is: after the inverter is powered on, the production line personnel use mobile devices to connect to the wifi of the tested equipment to perform functional testing of the inverter wifi circuit. However, manually testing the inverter wifi has low accuracy and high cost. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method, device, electronic device and storage medium for testing the wifi function of an inverter in view of the above-mentioned deficiencies in the prior art. The method can improve the efficiency and accuracy of the wifi function test of the inverter.
[0005] In a first aspect, an embodiment of the present invention provides a method for testing a wifi function of an inverter, the method comprising:
[0006] Switching the operation mode of the inverter to a boost constant current mode through a host computer;
[0007] When the inverter is in boost constant current mode, controlling the inverter to be fully powered and connected to the grid;
[0008] The wifi function of the inverter is tested to obtain a wifi test result.
[0009] Preferably, when the inverter is in boost constant current mode, controlling the inverter to be fully powered and connected to the grid comprises:
[0010] When the inverter is in a boost constant current mode, the inverter is controlled to adjust the constant current value in the boost constant current mode from the first current to the second current, the first current is less than the second current, and the second current is determined based on the rated power of the inverter.
[0011] Preferably, when the inverter is in a full power grid-connected state, testing the wifi function of the inverter to obtain the test result includes:
[0012] The following steps are performed when the inverter is in full power grid-connected state:
[0013] Performing a WiFi connection test on the inverter to obtain a first test result;
[0014] When the first test result indicates that the WiFi connection of the inverter is normal, performing a WiFi communication test on the inverter to obtain a second test result;
[0015] When the second test result indicates that the WiFi communication of the inverter is normal, performing a WiFi disconnection test on the inverter to obtain a third test result;
[0016] A WiFi test result of the inverter is obtained based on the first test result, the second test result and the third test result.
[0017] Preferably, performing a WiFi connection test on the inverter to obtain a first test result includes:
[0018] Searching for a wireless access point of the inverter;
[0019] When the wireless access point of the inverter is found, connecting to the wireless access point of the inverter through the host computer;
[0020] When the connection is successful, it is determined that the first test result is that the WiFi connection is normal.
[0021] Preferably, performing a WiFi communication test on the inverter to obtain a second test result includes:
[0022] Sending a data acquisition instruction to the inverter through the host computer, wherein the data acquisition instruction is used to instruct the inverter to return the first data to the host computer through wireless transmission;
[0023] The host computer receives second data returned by the inverter, where the second data is data returned by the inverter after receiving the data acquisition instruction;
[0024] When the second data is consistent with the first data pre-stored in the host computer, it is determined that the second test result is that the WiFi communication is normal.
[0025] Preferably, performing a WiFi disconnection test on the inverter to obtain a third test result includes:
[0026] Obtaining a globally unique identifier of a wireless access point of the inverter;
[0027] Calling the WlanDisconnect function according to the globally unique identifier to disconnect the WiFi connection between the host computer and the inverter;
[0028] Obtain the WiFi connection status word of the inverter;
[0029] When the WiFi connection status word indicates that the WiFi connection of the inverter is disconnected, it is determined that the third test result is normal disconnection.
[0030] Preferably, obtaining the WiFi test result of the inverter based on the first test result, the second test result and the third test result includes:
[0031] When the first test result indicates that the WiFi connection of the inverter is abnormal, determining that the WiFi test result of the inverter is a WiFi connection failure;
[0032] When the second test result indicates that the WiFi communication of the inverter is abnormal, determining that the WiFi test result of the inverter is a WiFi communication failure;
[0033] When the third test result indicates that the WiFi disconnection of the inverter is abnormal, it is determined that the WiFi test result of the inverter is a WiFi disconnection failure.
[0034] In a second aspect, an embodiment of the present invention further provides a wifi function test device for an inverter, the device comprising:
[0035] A switching module, used to switch the operation mode of the inverter to a boost constant current mode through a host computer;
[0036] A control module, connected to the switching module, for controlling the inverter to be fully powered and connected to the grid when the inverter is in a boost constant current mode;
[0037] The test module is connected to the control module and is used to test the WiFi function of the inverter to obtain WiFi test results.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;
[0039] The processor implements the above inverter WiFi function test method when executing the computer program instructions.
[0040] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the above-mentioned method for testing the wifi function of the inverter is implemented.
[0041] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processor, the above-mentioned inverter wifi function testing method is implemented.
[0042] The wifi function test method of the inverter of the present application can use the host computer to control the inverter to switch to the boost constant current mode, and control the inverter to be connected to the grid at full power, and perform a wifi function test on the inverter under the condition of full power grid connection to obtain the test result. Therefore, the evaluation of the wifi performance of the inverter under the condition of full power grid connection is closer to the actual application scenario, and the automated test process can improve the test efficiency, reduce manual operation and intervention, and ensure the consistency and repeatability of the test results. That is, through automated testing and standardized test environment, the test efficiency and accuracy are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 : A flow chart of a method for testing the wifi function of an inverter provided in an embodiment of the present application;
[0044] Figure 2 : A schematic diagram of a wifi function test system for an inverter provided in an embodiment of the present application;
[0045] Figure 3 : A flow chart of a method for full-power grid connection of an inverter provided in an embodiment of the present application;
[0046] Figure 4 : A flowchart of a wifi connection test method for an inverter provided in an embodiment of the present application;
[0047] Figure 5 : A flowchart of a wifi communication test method for an inverter provided in an embodiment of the present application;
[0048] Figure 6 : A flowchart of a wifi disconnection test method for an inverter provided in an embodiment of the present application;
[0049] Figure 7 : A structural diagram of a wifi function test device for an inverter provided in an embodiment of the present application;
[0050] Figure 8 : A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0052] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0053] An inverter is a power electronic device whose main function is to convert direct current (DC) into alternating current (AC).
[0054] Photovoltaic inverter is the core equipment in photovoltaic power generation system, which is used to convert the direct current generated by solar panels into alternating current and feed it to the power grid or for local load use. Traditional photovoltaic inverters usually use wired communication methods (such as RS485) to connect with monitoring equipment to achieve data collection and parameter configuration.
[0055] A photovoltaic inverter with a WiFi communication board refers to a special photovoltaic inverter that has a built-in WiFi wireless communication module and can interact with other devices through a wireless network for data and remote control.
[0056] Boost constant current mode, in the photovoltaic inverter system, the boost circuit is a common topology structure used to increase the relatively low DC voltage generated by the photovoltaic cell array to a suitable level for subsequent inversion and grid connection. The boost circuit achieves the purpose of boosting by controlling the on and off of the switch tube to realize the inductor energy storage and release. Constant current mode is a control method of the boost circuit, that is, through feedback regulation, the current flowing through the inductor is kept constant. It can effectively limit the current and protect the circuit from overcurrent damage. At the same time, constant current control also helps to achieve maximum power point tracking (MPPT), so that the photovoltaic array always works in the state of maximum output power and improves power generation efficiency.
[0057] At present, when the inverter equipment with WiFi communication function is tested on the production line, the general test method is: after the inverter is powered on, the production line personnel use mobile devices to connect to the WiFi of the device under test to perform functional tests on the inverter WiFi circuit. Disadvantages of existing testing methods: 1. The manual operation performed by personnel during the production test results are unreliable; 2. The WiFi function test is performed after the inverter is powered on on the production line, and there is a disadvantage that the WiFi performance is not really satisfied when the inverter is fully connected to the grid in the actual use scenario of the customer. 3. The solution of using mobile devices for testing has a high production test cost.
[0058] Embodiment 1:
[0059] Based on the above research, in order to solve the existing technical problems, such as Figure 1 As shown, this embodiment provides a method for testing the wifi function of an inverter, which specifically includes the following steps S101 to S103.
[0060] S101, controlling the inverter to switch to a boost constant current mode through a host computer.
[0061] Specifically, a connection with the inverter can be established through the communication interface of the host computer (such as serial port, Ethernet, etc.); according to the communication protocol and instruction format of the inverter, the instruction for switching the constant current mode is packaged into a communication frame, generally including a frame header, address, instruction, data, checksum, etc.; the packaged instruction frame is sent to the inverter using the communication library function of the host computer. After receiving the first instruction sent by the host computer, the inverter will parse and process it, and switch to the boost constant current mode according to the instruction content. Optionally, the inverter mode can also be manually switched to the boost constant current mode.
[0062] The specific implementation method also needs to be determined according to the inverter model, communication protocol and host computer development environment. Through reasonable instruction design and reliable communication control, it can ensure that the inverter can correctly switch the working mode, providing basic conditions for subsequent full-power grid-connected testing.
[0063] Here, the host computer is a computer system used to control, monitor, collect data and process the lower computer or other equipment. In this application, the host computer can be an industrial computer, an embedded system, an industrial tablet computer, a PLC, a PC with industrial software, a smart phone and a tablet computer, etc., and this application does not limit it.
[0064] S102, when the inverter is in boost constant current mode, controlling the inverter to be fully powered and connected to the grid.
[0065] Specifically, on the basis that the inverter has switched to the boost constant current mode, a second instruction is sent to it to realize full power grid connection control. Optionally, the grid connection control instruction may include parameters such as grid connection enable, power setting value, grid connection voltage / frequency, etc. The specific instruction format may be determined according to actual conditions. The parameters of the inverter may also be adjusted by manual means to realize full power grid connection.
[0066] S103, testing the wifi function of the inverter to obtain a wifi test result.
[0067] In this embodiment, the host computer can be used to send control instructions to switch the inverter to the boost constant current mode, and control the inverter to be connected to the grid at full power. The WiFi function of the inverter is tested under full power grid connection to obtain the test results. Therefore, the evaluation of the WiFi performance of the inverter under full power grid connection is closer to the actual application scenario. The automated test process can improve the test efficiency, reduce manual operation and intervention, and ensure the consistency and repeatability of the test results. That is, through automated testing and standardized test environment, the test efficiency and accuracy are improved.
[0068] Optionally, the above S102 may specifically include the following steps:
[0069] When the inverter is in a boost constant current mode, the inverter is controlled to adjust the constant current value in the boost constant current mode from a first current to a second current, the first current is less than the second current, and the second current is determined based on the rated power of the inverter.
[0070] The second current is the target constant current value, which needs to be determined according to the rated power of the inverter and the application requirements. For example, if the rated power of the inverter is 5kW, the rated voltage is 400V, and the rated current is 12.5A, the second current can be set to 11A, which is slightly less than the rated current, to retain a certain power margin.
[0071] Specifically, when the inverter is in boost constant current mode, the current reference value in the control algorithm can be modified, and the current can be gradually increased from the first current in a gradual manner, while the actual current is monitored and the controller parameters are adjusted, so as to finally reach the second current value and run stably. At the same time, necessary error handling and protection measures need to be added to achieve smooth adjustment of the constant current value from the first current to the second current.
[0072] In one example, after sending a first instruction to the inverter, the host computer needs to receive and parse the first information returned by the inverter, which is used to indicate the current working mode of the inverter; based on the mode identifier in the first information, it is determined whether the inverter is in the boost constant current mode. If the inverter is not currently in the boost constant current mode, the subsequent operation of adjusting the constant current value cannot be performed. It is necessary to first send a corresponding mode switching instruction to switch the inverter to the boost constant current mode; then send a second instruction to the inverter, and control the inverter to adjust the constant current value through the second instruction to achieve precise control of the inverter output current.
[0073] The first information may include a mode identifier, a status code, data, and the like. For example, the first information may be "Mode: Boost_CC, Status: OK, Current: 10A", indicating that the inverter is currently in boost constant current mode, the status is normal, and the constant current value is 10A.
[0074] In this embodiment, when the inverter is in boost constant current mode, a second instruction can be sent to it to adjust the constant current value, thereby achieving precise control of the inverter output current so that the inverter can be connected to the grid at full power.
[0075] Optionally, the above S103 may specifically include the following steps:
[0076] Perform the following steps when the inverter is in full power and connected to the grid:
[0077] Perform a WiFi connection test on the inverter to obtain a first test result;
[0078] When the first test result indicates that the WiFi connection of the inverter is normal, a WiFi communication test is performed on the inverter to obtain a second test result;
[0079] When the second test result indicates that the WiFi communication of the inverter is normal, a WiFi disconnection test is performed on the inverter to obtain a third test result;
[0080] Based on the first test result, the second test result and the third test result, a WiFi test result of the inverter is obtained.
[0081] In this embodiment, through the above test steps, the WiFi function of the inverter in the full-power grid-connected state can be comprehensively evaluated, including connection stability, communication reliability, disconnection recovery capability, etc., to ensure that it can meet application requirements such as remote monitoring, data acquisition, and parameter setting.
[0082] Optionally, performing a WiFi connection test on the inverter to obtain a first test result includes:
[0083] Search for the wireless access point of the inverter;
[0084] When the wireless access point of the inverter is found, connect to the wireless access point of the inverter through the host computer;
[0085] When the connection is successful, it is determined that the first test result is that the WiFi connection is normal.
[0086] In this embodiment, the inverter's WiFi parameters, such as SSID, password, encryption method, etc., can be configured first so that it can connect to a designated wireless router or AP; then a list of surrounding wireless access points is obtained through the wireless network card connected to the host computer (for example, a list of wireless access points containing network name (SSID), signal strength, encryption method, etc.); using the host computer, search and connect to the inverter's WiFi hotspot to test whether the connection is successfully established; if the connection fails, the failure information can be recorded; if the connection is successful, it means that the inverter WiFi connection function is normal.
[0087] Optionally, the above-mentioned performing a WiFi communication test on the inverter to obtain a second test result includes:
[0088] Sending a data acquisition instruction to the inverter through the host computer, where the data acquisition instruction is used to instruct the inverter to return the first data to the host computer through wireless transmission;
[0089] The host computer receives the second data returned by the inverter, where the second data is the data returned by the inverter after receiving the data acquisition instruction;
[0090] When the second data is consistent with the first data pre-stored in the host computer, it is determined that the second test result is that the WiFi communication is normal.
[0091] In this embodiment, a data acquisition instruction is sent to the inverter to instruct the inverter to return the first data via wireless transmission. The content of the data acquisition instruction may include a command word, parameters, check codes, etc. requesting the inverter to return specific data (i.e., the first data); a third instruction is sent to the inverter through the established WiFi connection using a corresponding communication library or API; after sending the data acquisition instruction, it is necessary to wait for and receive the response data of the inverter, i.e., the second data; monitor the communication port or address used before, and read the data stream or data packet returned by the inverter; parse, check, and process the received raw data to extract the valid data content corresponding to the data acquisition instruction; compare the second data with the first data pre-stored in the host computer to determine the second test result.
[0092] In the program or configuration file of the host computer, a copy of the data identical to the first data returned by the inverter is pre-stored. The received second data is compared with the pre-stored first data, which can be compared byte by byte, or a hash value or checksum can be calculated; if the second data is completely consistent with the first data, it means that the inverter correctly receives and processes the data acquisition instruction and returns the expected data; at this time, the second test result can be recorded as "WiFi communication is normal", indicating that the data interaction between the host computer and the inverter is correct.
[0093] Optionally, the above-mentioned WiFi disconnection test is performed on the inverter to obtain a third test result, including:
[0094] Obtain a globally unique identifier of the wireless access point of the inverter;
[0095] Call the WlanDisconnect function based on the global unique identifier to disconnect the WiFi connection between the host computer and the inverter;
[0096] Get the inverter's WiFi connection status word;
[0097] When the WiFi connection status word indicates that the WiFi connection of the inverter is disconnected, it is determined that the third test result is normal disconnection.
[0098] Specifically, after completing the WiFi connection test and communication test, a WiFi disconnection test is also required to ensure that the host computer can normally disconnect the wireless connection with the inverter to avoid continuous occupation of resources.
[0099] In one example, the step of disconnecting the test may include:
[0100] (1) Obtain the globally unique identifier (GUID) of the inverter wireless access point.
[0101] In the previous WiFi connection process, the host computer has obtained the relevant information of the inverter as a wireless access point. From this information, a GUID that can uniquely identify the access point is extracted, usually a string or byte array. The format and content of the GUID depend on the specific wireless communication protocol and implementation, such as WiFi Direct, SoftAP, etc. For example, on the Windows platform, the WlanEnumInterfaces function is used to obtain a list of wireless interfaces, each of which corresponds to a GUID.
[0102] (2) Call the WlanDisconnect function, pass in the GUID as a parameter, and request to disconnect the WiFi connection with the inverter.
[0103] WlanDisconnect is an API function provided in Windows SDK for disconnecting wireless connections. It requires the GUID representing the wireless interface, as well as some optional flags and disconnection reasons. After calling WlanDisconnect, the host computer will send a disconnection request to the inverter. After receiving the request, the inverter will release related resources, close the wireless access point, and end the WiFi connection with the host computer.
[0104] (3) Obtain the WiFi connection status word of the inverter.
[0105] After calling WlanDisconnect, you need to check whether the inverter has successfully disconnected the WiFi connection. You can obtain a word indicating the WiFi connection status by reading the inverter's status register or executing a query instruction. The status word is usually an integer value, and different bits represent different status information. For example, if the 0th bit of the status word is 1, it means that the WiFi is connected, and if it is 0, it means that the WiFi is disconnected; if the 1st bit is 1, it means that it is trying to connect, and if it is 0, it means that it is idle.
[0106] (4) Determine the WiFi connection status word and determine the third test result.
[0107] According to the inverter status word definition, check the value of the bit related to the WiFi connection disconnection. If the disconnection bit is 1, or the connection bit is 0, it can be determined that the inverter has successfully disconnected the WiFi connection with the host computer. At this time, the third test result is recorded as "disconnection normal", indicating that the host computer can manage and release wireless resources normally.
[0108] Optionally, obtaining the WiFi test result of the inverter based on the first test result, the second test result and the third test result may specifically include:
[0109] When the first test result indicates that the inverter WiFi connection is abnormal, determining that the inverter WiFi test result is a WiFi connection failure;
[0110] When the second test result indicates that the WiFi communication of the inverter is abnormal, determining that the WiFi test result of the inverter is a WiFi communication failure;
[0111] When the third test result indicates that the inverter WiFi disconnection is abnormal, it is determined that the inverter WiFi test result is WiFi disconnection failure.
[0112] Specifically, if there is a problem in the process of searching and connecting to the inverter wireless access point, such as failure to find the access point or connection failure, the first test result will indicate that the WiFi connection is abnormal. At this time, it can be determined that the inverter's WiFi test result is "WiFi connection failure". This indicates that the inverter's WiFi module may have hardware or software problems, resulting in the inability to establish a normal WiFi connection.
[0113] If there is a problem in the process of data communication with the inverter, such as the data acquisition instruction sent by the host computer is not correctly transmitted, or the data returned by the inverter does not meet expectations, the second test result will indicate that the WiFi communication is abnormal. At this time, it can be determined that the WiFi test result of the inverter is "WiFi communication failure". This means that although the WiFi connection has been established, there are errors or anomalies in the data transmission process, resulting in the inability to interact with the data normally.
[0114] If there is a problem when trying to disconnect the WiFi connection with the inverter, such as the connection status is still not disconnected after calling the WlanDisconnect function, or the status word indicates a disconnection abnormality, the third test result will indicate a WiFi disconnection abnormality. At this point, it can be determined that the WiFi test result of the inverter is "WiFi disconnection failure". This indicates that there is a problem with the inverter's WiFi module during the disconnection process, which may be an abnormality in software control or status management.
[0115] In actual applications, if any test result is found to be abnormal, further analysis and troubleshooting should be conducted. It may be necessary to check the inverter's WiFi module hardware, driver, firmware version, etc., and perform corresponding repairs or updates. At the same time, attention should also be paid to the test environment and test conditions, such as signal interference, network settings, etc., to ensure the accuracy and repeatability of the test results.
[0116] In this embodiment, during the WiFi function test of the inverter, the results of the WiFi connection test, WiFi communication test, and WiFi disconnection test are comprehensively considered to comprehensively evaluate the WiFi function of the inverter. The WiFi performance of the inverter can be effectively evaluated, and potential problems can be discovered and solved in a timely manner, thereby improving the reliability of the inverter and user experience. In order to facilitate the understanding of the WiFi function test method of the inverter provided in this embodiment, a practical application description of the above-mentioned WiFi function test method of the inverter is provided here, such as Figure 2 The wifi function test system of the inverter shown in the figure includes: a host computer (which can be a desktop calculator), a wireless network card device, a photovoltaic inverter with a wifi communication board, a communication cable, etc. The specific test steps are as follows:
[0117] Step 1: Send control instructions to the inverter through the host computer software to control the inverter to connect to the grid at full power.
[0118] like Figure 3 As shown:
[0119] (1) Through the host computer software, the serial port data communication connection between the computer and the communication board with WiFi function in the inverter is realized.
[0120] (2) The host computer sends an inverter mode control command to the inverter through the serial port to control the inverter to enter the boost (power increase) constant current mode, and sends an inverter mode read command to the inverter to query and verify whether the current operating mode of the inverter is the boost constant current mode.
[0121] (3) The host computer sends the inverter grid-connected AC output command through the serial port, adjusts the grid-connected output small current to 10A, and then sends the enable control command to the inverter, so that the inverter starts the grid-connected mode.
[0122] (4) After waiting for the grid to stabilize for 120 seconds, the host computer sends the inverter grid-connected AC output command through the serial port, adjusts the grid-connected output large current to 238A, and waits for the current to stabilize for 30 seconds before the inverter officially enters the full-power grid-connected state.
[0123] (5) After the inverter enters the full power state, the host computer communicates data with the inverter through the serial port, and performs MPPT current accuracy verification, PV voltage accuracy verification, three-phase current calibration, and three-phase current accuracy verification in sequence to determine whether the inverter in the full power grid-connected mode is operating normally and the indicator status is normal. When the product is running at full power and connected to the grid, the wifi function mode monitoring is started.
[0124] Step 2: Test the WiFi connection of the inverter
[0125] like Figure 4 As shown:
[0126] (1) Obtain the globally unique identifier GUID (Globally Unique Identifier) of the wireless network card through the host computer software.
[0127] (2) Obtain the barcode of the Wi-Fi device through the host computer software to determine the device's service set identifier SSID (Service Set Identifier). It is known that the device barcode and the device's SSID are consistent.
[0128] (3) Scan the wifi access points through the host computer software, obtain the list of surrounding wireless access points, and determine whether the SSID in step (2) exists in the scan list. If the SSID does not exist in the scan list, 10 retries are performed. If it still fails after 10 retries, the test is terminated and the total test result is displayed as a failure state. The failed test result is saved in the test record file and the file is stored in the computer's hard disk. If the SSID exists in the scan list, the test continues.
[0129] (4) Through the host computer software, based on the success of step (3), the WiFi authentication method name and WiFi encryption method of the WiFi access point corresponding to the specified SSID are obtained, and the WiFi password of the device is set. The WiFi configuration file is created through the Windows API function WlanSetProfile, which can realize the automatic WiFi connection function of the specified password.
[0130] (5): Use the Windows API function WlanConnect to connect to the wifi access point of the specified SSID. If the connection fails, retries are performed three times. If it still fails after three retries, the test is terminated and the total test result is displayed as a failure. The failed test result is saved in the test record file and the file is stored in the computer's hard disk. If the wifi access point of the specified SSID is successfully connected, the test continues.
[0131] (6): Based on the success of step (5), obtain the wifi connection status word of the specified SSID. If the status word is 1, it means that the connection status is successful and the test continues; if the status word is not 1, it means that the connection status is unsuccessful, and the failed test results are saved in the test record file, and the file is stored in the computer's hard disk.
[0132] Step 3: Test the inverter's WiFi connection communication function
[0133] like Figure 5 As shown:
[0134] (1) Based on the success of step 2, the host computer acts as the client and the wifi device acts as the server. When the IP and port number of the wifi device are known, the host computer connects to the server through the ModBus TCP protocol. ModBus TCP (Transmission Control Protocol) is an extension of the ModBus protocol. It uses the TCP / IP protocol for communication and can transmit data between a local area network (LAN) and a wide area network (WAN).
[0135] (2) Upon the success of step (1), the host computer software sends control and data query instructions to the WiFi device through the ModBus TCP protocol, and saves the data returned by the query instructions in the cache area. The host computer software determines whether the data in the cache area is consistent with the preset data. If they are consistent, the WiFi device function test is successful. If they are inconsistent, the abnormal results need to be saved in the test record. The total test result is shown as a failure state, and the failed test results are saved in the test record file, and the file is stored in the computer's hard disk.
[0136] Step 3: Test the inverter for WiFi disconnection
[0137] like Figure 6 As shown:
[0138] (1) If step 2 is successful, it means that the device's WiFi connection and communication functions are normal. The WiFi connection is disconnected through the Windows API function WlanDisconnect, and the WiFi connection status word of the specified SSID is obtained. If the status word is not 1, it means that the WiFi disconnection state is not connected, which means that the disconnection state is successful and the test continues; if the status word is 1, it means that the WiFi disconnection state is unsuccessful, and the failed test results are saved in the test record file, and the file is stored in the computer's hard disk.
[0139] Step 4: Get the test results
[0140] If step 3 is successful, it means that the device WiFi connection and disconnection, communication function are normal, and the overall test result is successful. The successful test result is saved to the test record file, and the file is stored in the computer's hard disk.
[0141] Step 5: Upload the saved test result file to the MOM (Manufacturing Operation Management) system.
[0142] Compared with the existing test method, the embodiment of the present application, (1) after the inverter is powered on, the inverter is controlled to be fully powered and connected to the grid, and the wifi function related test is performed when the inverter is fully powered and connected to the grid and the performance is normal, and the test conditions are tightened. The test method can cover the actual use scenarios of customers and improve the quality of product delivery. (2) A full automation method for the production line is proposed to reduce manual intervention in the process. In terms of efficiency: it can improve the production test efficiency, reduce production hours, and thus reduce the production test cost; in terms of reliability: automatic testing can avoid the unstable factors caused by manual operation. (3) After the wifi connection, the host computer and the inverter are tested for sending and receiving data in real time, and the host computer automatically judges the results, which can reduce the misjudgment rate and improve the test quality. At the same time, the communication data can be saved in the test record to improve the traceability of the test results. (4) A method of using a wireless network card to replace a mobile phone device. In terms of cost: the wireless network card replaces the original mobile phone solution, which has a price advantage and can reduce the test cost.
[0143] Embodiment 2:
[0144] like Figure 7 As shown, this embodiment provides a wifi function test device 700 for an inverter, comprising:
[0145] The switching module 701 is used to switch the operation mode of the inverter to the boost constant current mode through the host computer;
[0146] The control module 702 is connected to the switching module and is used to control the inverter to be fully powered and connected to the grid when the inverter is in a boost constant current mode;
[0147] The test module 703 is connected to the control module and is used to test the Wi-Fi function of the inverter and obtain Wi-Fi test results.
[0148] Optionally, the control module 702 includes:
[0149] A control unit is used to control the inverter to adjust the constant current value in the boost constant current mode from the first current to the second current when the inverter is in a boost constant current mode, wherein the first current is less than the second current and the second current is determined based on the rated power of the inverter.
[0150] Optionally, the test module 703 includes:
[0151] A first testing unit, configured to perform a WiFi connection test on the inverter to obtain a first test result;
[0152] A second test unit is connected to the first test unit, and performs a WiFi communication test on the inverter to obtain a second test result when the first test result indicates that the WiFi connection of the inverter is normal;
[0153] A third test unit, connected to the second test unit, is used to perform a WiFi disconnection test on the inverter to obtain a third test result when the second test result indicates that the WiFi communication of the inverter is normal;
[0154] The first determining unit is connected to the first testing unit, the second testing unit and the third testing unit respectively, and is used to obtain the WiFi test result of the inverter based on the first test result, the second test result and the third test result.
[0155] In this embodiment, the inverter can be switched to the boost constant current mode by control, and the inverter can be controlled to be connected to the grid at full power. The WiFi function of the inverter can be tested under the condition of full power grid connection to obtain the test results. Therefore, the evaluation of the WiFi performance of the inverter under the condition of full power grid connection is closer to the actual application scenario. The automated test process can improve the test efficiency, reduce manual operation and intervention, and ensure the consistency and repeatability of the test results. That is, through automated testing and standardized test environment, the test efficiency and accuracy are improved.
[0156] The above-mentioned inverter wifi function testing device 700 can be used to execute the steps of the inverter wifi function testing method provided in any of the above-mentioned embodiments.
[0157] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0158] The electronic device may include a processor 801 and a memory 802 storing computer program instructions.
[0159] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0160] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.
[0161] The memory may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure (the above-mentioned inverter wifi function test method).
[0162] The processor 801 implements any one of the scheduling methods in the above embodiments by reading and executing computer program instructions stored in the memory 802 .
[0163] In one example, the electronic device may further include a communication interface 803 and a bus 408. Figure 8 As shown, the processor 801, the memory 802, and the communication interface 803 are connected via a bus 810 and communicate with each other.
[0164] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0165] Bus 810 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 810 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0166] In addition, in combination with the scheduling method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the scheduling methods in the above embodiment is implemented.
[0167] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0168] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0169] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0170] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable scheduling device to produce a machine so that these instructions executed by the processor of the computer or other programmable scheduling device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0171] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for testing the wifi function of an inverter, characterized in that: The method comprises: Switching the operation mode of the inverter to a boost constant current mode through a host computer; When the inverter is in boost constant current mode, controlling the inverter to be fully powered and connected to the grid; The wifi function of the inverter is tested to obtain a wifi test result.
2. The method according to claim 1, characterized in that When the inverter is in the boost constant current mode, controlling the inverter to be fully powered and connected to the grid includes: When the inverter is in a boost constant current mode, the inverter is controlled to adjust a constant current value in the boost constant current mode from a first current to a second current, wherein the first current is less than the second current and the second current is determined based on a rated power of the inverter.
3. The method according to claim 1, characterized in that When the inverter is in a full power grid-connected state, the wifi function of the inverter is tested to obtain a test result, including: The following steps are performed when the inverter is in full power grid-connected state: Performing a WiFi connection test on the inverter to obtain a first test result; When the first test result indicates that the WiFi connection of the inverter is normal, performing a WiFi communication test on the inverter to obtain a second test result; When the second test result indicates that the WiFi communication of the inverter is normal, performing a WiFi disconnection test on the inverter to obtain a third test result; A WiFi test result of the inverter is obtained based on the first test result, the second test result and the third test result.
4. The method according to claim 3, characterized in that The performing a WiFi connection test on the inverter to obtain a first test result includes: Searching for a wireless access point of the inverter; When the wireless access point of the inverter is found, connecting to the wireless access point of the inverter through the host computer; When the connection is successful, it is determined that the first test result is that the WiFi connection is normal.
5. The method according to claim 3, characterized in that: The performing of a WiFi communication test on the inverter to obtain a second test result includes: Sending a data acquisition instruction to the inverter through the host computer, wherein the data acquisition instruction is used to instruct the inverter to return the first data to the host computer through wireless transmission; The host computer receives second data returned by the inverter, where the second data is data returned by the inverter after receiving the data acquisition instruction; When the second data is consistent with the first data pre-stored in the host computer, it is determined that the second test result is that the WiFi communication is normal.
6. The method according to claim 3, characterized in that The performing of a WiFi disconnection test on the inverter to obtain a third test result includes: Obtaining a globally unique identifier of a wireless access point of the inverter; Calling the WlanDisconnect function according to the globally unique identifier disconnects the WiFi connection between the host computer and the inverter; Obtaining the WiFi connection status word of the inverter; When the WiFi connection status word indicates that the WiFi connection of the inverter is disconnected, it is determined that the third test result is normal disconnection.
7. The method according to claim 3, characterized in that The obtaining the WiFi test result of the inverter based on the first test result, the second test result and the third test result includes: When the first test result indicates that the WiFi connection of the inverter is abnormal, determining that the WiFi test result of the inverter is a WiFi connection failure; When the second test result indicates that the WiFi communication of the inverter is abnormal, determining that the WiFi test result of the inverter is a WiFi communication failure; When the third test result indicates that the WiFi disconnection of the inverter is abnormal, it is determined that the WiFi test result of the inverter is a WiFi disconnection failure.
8. A wifi function test device for an inverter, characterized in that: The device comprises: A switching module, used to switch the operation mode of the inverter to a boost constant current mode through a host computer; A control module, connected to the switching module, for controlling the inverter to be fully powered and connected to the grid when the inverter is in a boost constant current mode; The test module is connected to the control module and is used to test the WiFi function of the inverter to obtain WiFi test results.
9. The device according to claim 8, characterized in that The control module comprises: A control unit is used to control the inverter to adjust the constant current value in the boost constant current mode from a first current to a second current when the inverter is in a boost constant current mode, wherein the first current is less than the second current and the second current is determined based on the rated power of the inverter.
10. The device according to claim 8, characterized in that The test module includes: A first testing unit, configured to perform a WiFi connection test on the inverter to obtain a first test result; A second test unit is connected to the first test unit, and performs a WiFi communication test on the inverter to obtain a second test result when the first test result indicates that the WiFi connection of the inverter is normal; A third test unit, connected to the second test unit, is used to perform a WiFi disconnection test on the inverter to obtain a third test result when the second test result indicates that the WiFi communication of the inverter is normal; The first determining unit is connected to the first testing unit, the second testing unit and the third testing unit respectively, and is used to obtain the WiFi test result of the inverter based on the first test result, the second test result and the third test result.
11. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method according to any one of claims 1 to 7 is implemented.
12. A computer storage medium, characterized in that: The computer storage medium stores computer program instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 7.
