Inverter access method and device, storage medium and acquisition and monitoring terminal
By reading and replacing the communication configuration information of the inverter in the inverter access method, the protocol mismatch problem between inverter access acquisition and monitoring terminals of different manufacturers is solved, and the protocol of the inverter is realized Adapt and fast access reduce maintenance costs and replacement difficulties.
Patent Information
- Application Number
- CN202411508251.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-07
AI Technical Summary
When connecting inverters produced by different manufacturers to the acquisition and monitoring terminals, the inverter cannot be accessed normally due to different data register addresses or communication addresses in the communication protocol. The existing solutions rely on software upgrades and take time to use It is labor-intensive and susceptible to the network environment.
Connect the inverter through a preset interface to read the real-time communication configuration information in the inverter's characteristic registers, and replace the original communication configuration information according to success or not, or access the candidate communication configuration information to realize the inverter protocol adaptation.
It realizes fast and convenient access to the inverter, reduces the maintenance costs of the acquisition and monitoring terminals, avoids the time and energy consumption of software upgrades, and improves the convenience of inverter replacement.
Smart Images

Figure CN119402352A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power technology, and in particular to an access method, device, storage medium and acquisition and monitoring terminal for an inverter. Background Art
[0002] Distributed power collection and monitoring terminals are terminals for collecting and monitoring distributed power sources such as low-voltage photovoltaic inverters, energy meters, circuit breakers, energy storage, and charging piles. At present, when inverter equipment produced by different manufacturers is connected to the collection and monitoring terminal, the inverter cannot be connected normally due to different data register addresses or communication addresses in the communication protocols used by each manufacturer.
[0003] In order to solve the above problems, the common method is to upgrade the software of the acquisition and monitoring terminal to meet the requirements of the communication protocol. However, the software upgrade method is not only time-consuming and labor-intensive, but also limited by the support of existing application software and the communication connection status of the network. It is easy to cause slow upgrades due to poor network environment and poor communication, which leads to upgrade failure. Therefore, it is urgent to propose a new method to solve the above problems. Summary of the invention
[0004] The present invention provides an inverter access method, device, storage medium and acquisition and monitoring terminal, which realize protocol adaptation of an inverter accessed from a preset interface and improve the convenience when replacing the inverter.
[0005] According to one aspect of the present invention, there is provided an inverter access method, which is applied to a data acquisition and monitoring terminal, wherein the inverter is connected to the data acquisition and monitoring terminal via a preset interface. The method comprises:
[0006] Reading first real-time communication configuration information from a feature register of the inverter according to original communication configuration information corresponding to a preset interface in the inverter file;
[0007] If the first real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface is replaced with the first real-time communication configuration information;
[0008] If reading the first real-time communication configuration information fails, reading the second real-time communication configuration information from the feature register of the inverter according to the candidate communication configuration information;
[0009] If the second real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface is replaced with the second real-time communication configuration information.
[0010] According to another aspect of the present invention, there is provided an access device for an inverter, which is applied to a data acquisition and monitoring terminal. The inverter is connected to the data acquisition and monitoring terminal via a preset interface. The device comprises:
[0011] A reading module, configured to read first real-time communication configuration information from a feature register of the inverter according to original communication configuration information corresponding to the preset interface in the inverter file;
[0012] A first determination module, configured to replace the original communication configuration information corresponding to the preset interface with the first real-time communication configuration information if the first real-time communication configuration information is read successfully; and to read second real-time communication configuration information from a feature register of the inverter according to candidate communication configuration information if the first real-time communication configuration information is read unsuccessfully;
[0013] The second determining module is configured to replace the original communication configuration information corresponding to the preset interface with the second real-time communication configuration information if the second real-time communication configuration information is read successfully.
[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the inverter access method described in any embodiment of the present invention when executed.
[0015] According to another aspect of the present invention, there is provided a collection and monitoring terminal, the collection and monitoring terminal comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the inverter access method described in any embodiment of the present invention.
[0019] The inverter access method provided by the embodiment of the present invention reads the first real-time communication configuration information from the characteristic register of the inverter according to the original communication configuration information corresponding to the preset interface in the inverter file; if the first real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface is replaced with the first real-time communication configuration information; if the first real-time communication configuration information is read unsuccessfully, the second real-time communication configuration information is read from the characteristic register of the inverter according to the candidate communication configuration information; if the second real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface is replaced with the second real-time communication configuration information. In the above technical scheme, on the one hand, it is determined whether the first real-time communication configuration information is read successfully, and if successful, the original communication configuration information corresponding to the preset interface in the inverter file is replaced by the first real-time communication configuration information, so as to realize the real-time update of the communication configuration information corresponding to the preset interface in the inverter file. On the other hand, when the first real-time communication configuration information fails to be read, the preset candidate communication configuration information is used to try to read the second real-time communication configuration information from the characteristic register of the inverter in sequence, so as to realize the configuration information of the inverter connected to the preset interface is quickly determined directly from a plurality of preset candidate communication configuration information, so as to realize the determination of the inverter communication protocol. At the same time, after determining that the second real-time communication configuration information is read successfully, the second real-time communication configuration information directly replaces the original communication configuration information corresponding to the preset interface, which solves the current problem of needing to perform software upgrades on the collection and monitoring terminal to meet the requirements of the communication protocol when inverters produced by different manufacturers are connected to the collection and monitoring terminal. It realizes protocol adaptation for the inverter connected from the preset interface, reduces the maintenance cost of the collection and monitoring terminal, and improves the convenience of replacing inverter equipment.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of a flow chart of an inverter access method provided by an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of the structure of a collection and monitoring terminal provided by an embodiment of the present invention;
[0024] Figure 3 An example diagram of an inverter access collection and monitoring terminal provided in an embodiment of the present invention;
[0025] Figure 4 A flow chart of another inverter access method provided by an embodiment of the present invention;
[0026] Figure 5 A flow chart of another inverter access method provided by an embodiment of the present invention;
[0027] Figure 6 A schematic diagram of the structure of an inverter access device provided by an embodiment of the present invention;
[0028] Figure 7 Another structural schematic diagram of the collection and monitoring terminal provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any other variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Figure 1A flow chart of an inverter access method provided in an embodiment of the present invention, this embodiment can be applied to the case of determining the communication protocol of an inverter accessing a collection and monitoring terminal through a preset interface, the method can be executed by an access device of the inverter, the access device of the inverter can be implemented in the form of hardware and / or software, and the access device of the inverter can be configured in the collection and monitoring terminal. For example, it is configured in a microcontroller module in the collection and monitoring terminal. In this embodiment, the collection and monitoring terminal is a collection and monitoring terminal for distributed power sources. The collection and monitoring terminal is a device purchased uniformly by the State Grid Corporation, and its hardware structure and software meet the technical requirements of the State Grid.
[0032] Before introducing the inverter access method provided by the present invention, the structure of the data collection and monitoring terminal is briefly introduced. Figure 2 A schematic diagram of the structure of a collection and monitoring terminal provided by an embodiment of the present invention. Figure 2 , a collection and monitoring terminal includes specific modules. Among them, the power module is used to supply power to the entire collection and monitoring terminal, the security module is used to ensure the security of the collection and monitoring terminal, the microcontroller module is a microcontroller unit in the collection and monitoring terminal, generally a microcontroller unit (MCU), which plays a role in controlling the work of other modules, the serial port management module is used to manage the work of the inverter connected through each preset interface, and the storage module is used to store files or access history information transmitted to the collection and monitoring terminal. Figure 3 This is an example diagram of an inverter access collection and monitoring terminal provided by an embodiment of the present invention. Figure 3 As shown, the inverter device is connected to the acquisition and monitoring terminal through different preset interfaces, such as port 1 and port 2, using a 485 serial port connection line. When the inverter is connected to the acquisition and monitoring terminal through a 485 serial port connection line, in order to ensure the normal interaction between the acquisition and monitoring terminal and the inverter, it is necessary to determine the communication protocol of the connected inverter. In the prior art, it is necessary to perform software upgrades on the acquisition and monitoring terminal to meet the requirements of different communication protocols of different inverters. However, when the frequency of replacing the inverter is relatively frequent, frequent software upgrades of the acquisition and monitoring terminal will increase its maintenance cost and waste a lot of time and energy. For example, local upgrades require one-to-one connection to the local maintenance port through the maintenance equipment, which is time-consuming and labor-intensive; although remote upgrades are more flexible than local upgrades, it is necessary to ensure that the channels of the master station, concentrator, and acquisition and monitoring terminal remain unobstructed before they can be operated. It is not only limited by the support level of existing application software, but also more dependent on the communication connection status of the network. It is easy to cause slow upgrades due to poor network environment and poor communication, thereby causing upgrade failures.
[0033] Continue to refer to Figure 1 ,like Figure 1As shown, the method includes:
[0034] S101. Read first real-time communication configuration information from a feature register of an inverter according to original communication configuration information corresponding to a preset interface in an inverter file.
[0035] Among them, the inverter file is a file stored in the storage module of the acquisition and monitoring terminal, which is used to record the communication protocol related information of the inverter connected through the preset interface. In this embodiment, the inverter file stores the configuration information such as the manufacturer type, inverter address, whether to connect the adapter, protocol version and corresponding baud rate of the inverter connected to each preset interface. In the inverter file, one preset interface corresponds to one communication configuration information, which is generally the original communication configuration information when the inverter file was last updated, that is, the configuration information of the inverter connected to the preset interface at the time of the last update. Alternatively, it may be the configuration information of the inverter connected to the current preset interface. The first real-time communication configuration information is the real-time communication configuration information of the inverter connected to the preset interface.
[0036] Specifically, when it is determined that the preset interface is connected to the inverter, the inverter can be tested according to the original communication configuration information corresponding to the preset interface in the inverter file. The process of the test copy is that the acquisition and monitoring terminal sends a request instruction to the inverter corresponding to the preset interface according to the original communication configuration information, and waits for the inverter to feedback a response result of receiving the request instruction, and the response result includes the first real-time communication configuration information.
[0037] S102, determining whether the first real-time communication configuration information is read successfully; if successful, executing S103; if unsuccessful, executing S104.
[0038] Specifically, after the acquisition and monitoring terminal sends a request instruction to the inverter corresponding to the preset interface according to the original communication configuration information, it is necessary to determine whether the feedback result of the inverter is received, that is, whether the first real-time communication configuration information is read successfully. If the first real-time communication configuration information is read successfully, it means that the feedback result of the inverter is received, so S103 can be directly executed. If the first real-time communication configuration information fails to be read, it means that the feedback result of the inverter is not received, so S104 needs to be directly executed.
[0039] S103: Replace original communication configuration information corresponding to the preset interface with first real-time communication configuration information.
[0040] Specifically, since the inverter file stores the communication configuration information of the inverter connected to the preset interface, such as the inverter address, manufacturer type, access port, protocol version, etc. of this inverter, the original communication configuration information is replaced with the first real-time communication configuration information to prevent the inverter connected to the preset interface from changing. That is, the original communication configuration information of the inverter corresponding to the preset interface stored in the inverter file may be the inverter connected to the preset interface when the inverter file was last updated, and this inverter is different from the inverter currently connected to the preset interface. Therefore, in order to ensure the real-time matching of the inverter configuration information, each time this method is used, if it is determined that the first real-time communication configuration information is read successfully, the original communication configuration information will still be replaced with the first real-time communication configuration information to update the communication configuration information of the inverter currently connected to the preset interface corresponding to the preset interface in the inverter file.
[0041] In this embodiment, it is determined whether the first real-time communication configuration information is read successfully. If successful, the first real-time communication configuration information is used to replace the original communication configuration information corresponding to the preset interface in the inverter file, thereby realizing real-time update of the communication configuration information corresponding to the preset interface in the inverter file.
[0042] S104. Read second real-time communication configuration information from a feature register of the inverter according to the candidate communication configuration information.
[0043] Among them, the candidate communication configuration information is the communication configuration information of multiple inverters that are preset. The feature register of the inverter is used to store various parameters and status information of the inverter to facilitate monitoring and control of the operation of the inverter. The second real-time communication configuration information is also the real-time communication configuration information of the inverter connected to the preset interface, that is, the second real-time communication configuration information is the same as the first real-time communication configuration information. In this embodiment, in order to distinguish whether the communication configuration information of the inverter connected to the preset interface is determined according to the original communication configuration information or the candidate communication configuration information, the first real-time communication configuration information is used to distinguish the second real-time communication configuration information.
[0044] Specifically, if the first real-time communication configuration information fails to be read, it means that the inverter currently connected to the acquisition and monitoring terminal through the preset interface may change. Therefore, it is necessary to read the second real-time communication configuration information from the feature register of the inverter according to the candidate communication configuration information.
[0045] Exemplarily, since the inverter access protocol is determined according to the production specifications of the manufacturer that produces the inverter, it is possible to obtain the production specifications of different manufacturers, such as the feature information of different inverters stored in the manufacturer's feature register, and obtain conventional inverter configuration information, such as baud rate, inverter address and other information, as candidate communication configuration information. In addition, a plurality of pre-set candidate communication configuration information is sent to the inverter in sequence, and the inverter determines the comparison result based on the plurality of candidate communication configuration information and the parameters and status information of the inverter stored in the feature register, and feeds the comparison result back to the acquisition and monitoring terminal. The comparison result is divided into response and non-response. If the comparison result is a response, the comparison result includes the read second real-time communication configuration information.
[0046] S105, determining whether the second real-time communication configuration information is read successfully; if successful, executing S106; if unsuccessful, returning to executing S101.
[0047] Specifically, after the acquisition and monitoring terminal sends a comparison instruction and candidate communication configuration information to the inverter according to the candidate communication configuration information, it is necessary to determine whether the comparison result of the inverter is received, that is, whether the second real-time communication configuration information is read successfully. If the second real-time communication configuration information is read successfully, it means that the comparison result of the inverter has been received. Among them, the comparison result includes the second real-time communication configuration information. Therefore, S106 can be executed directly. If the second real-time communication configuration information fails to be read, it means that the comparison result of the inverter has not been received, so it is necessary to return to execute S101.
[0048] Exemplarily, if the reading of the second real-time communication configuration information fails, it is necessary to return to the step of reading the first real-time communication configuration information from the feature register of the inverter according to the original communication configuration information corresponding to the preset interface in the inverter file. In one implementation, when returning to this step, the inverter connected to the preset interface may have changed, so the configuration information of the newly connected inverter can be updated again according to the above steps. In another implementation, when returning to this step, the inverter connected to the preset interface has not changed. Then, the configuration information of the inverter can be re-determined according to the above steps again.
[0049] S106: Replace the original communication configuration information corresponding to the preset interface with the second real-time communication configuration information.
[0050] Specifically, after the second real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface in the inverter file may be replaced with the second real-time communication configuration information.
[0051] For example, in one implementation, when it is determined to execute step S104, the original communication configuration information corresponding to the preset interface in the inverter file can be deleted. Therefore, after it is determined that the second real-time communication configuration information is read successfully, the second real-time communication configuration information can be directly filled into the empty space corresponding to the preset interface from which the original communication configuration information has been deleted. In another implementation, if the original communication configuration information corresponding to the preset interface in the inverter file is not deleted when it is determined to execute step S104, then after it is determined that the second real-time communication configuration information is read successfully, the second real-time communication configuration information can be directly replaced with the original communication configuration information corresponding to the preset interface.
[0052] In this embodiment, when the first real-time communication configuration information fails to be read, the pre-set candidate communication configuration information is used to try to read the second real-time communication configuration information from the characteristic register of the inverter in turn, so as to realize the configuration information of the inverter connected to the preset interface directly from multiple pre-set candidate communication configuration information, and realize the determination of the inverter communication protocol. At the same time, after determining that the second real-time communication configuration information is read successfully, the second real-time communication configuration information is directly replaced with the original communication configuration information corresponding to the preset interface, which solves the problem that when inverters produced by different manufacturers are connected to the collection and monitoring terminal, the software of the collection and monitoring terminal needs to be upgraded to meet the requirements of the communication protocol, and realizes the protocol adaptation of the inverter connected from the preset interface, reduces the maintenance cost of the collection and monitoring terminal, and improves the convenience of replacing the inverter equipment.
[0053] The inverter access method provided by the embodiment of the present invention reads the first real-time communication configuration information from the characteristic register of the inverter according to the original communication configuration information corresponding to the preset interface in the inverter file; if the first real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface is replaced with the first real-time communication configuration information; if the first real-time communication configuration information is read unsuccessfully, the second real-time communication configuration information is read from the characteristic register of the inverter according to the candidate communication configuration information; if the second real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface is replaced with the second real-time communication configuration information. In the above technical scheme, on the one hand, it is determined whether the first real-time communication configuration information is read successfully, and if successful, the original communication configuration information corresponding to the preset interface in the inverter file is replaced by the first real-time communication configuration information, so as to realize the real-time update of the communication configuration information corresponding to the preset interface in the inverter file. On the other hand, when the first real-time communication configuration information fails to be read, the preset candidate communication configuration information is used to try to read the second real-time communication configuration information from the characteristic register of the inverter in sequence, so as to realize the configuration information of the inverter connected to the preset interface is quickly determined directly from a plurality of preset candidate communication configuration information, so as to realize the determination of the inverter communication protocol. At the same time, after determining that the second real-time communication configuration information is read successfully, the second real-time communication configuration information directly replaces the original communication configuration information corresponding to the preset interface, which solves the current problem of needing to perform software upgrades on the collection and monitoring terminal to meet the requirements of the communication protocol when inverters produced by different manufacturers are connected to the collection and monitoring terminal. It realizes protocol adaptation for the inverter connected from the preset interface, reduces the maintenance cost of the collection and monitoring terminal, and improves the convenience of replacing inverter equipment.
[0054] Figure 4 This is a flowchart of another inverter access method provided by an embodiment of the present invention. Based on the above embodiment, this embodiment introduces in detail the steps of "before reading the second real-time configuration information from the feature register of the inverter according to the candidate communication configuration information" and "reading the second real-time configuration information from the feature register of the inverter according to the candidate communication configuration information". Figure 4 As shown, the method includes:
[0055] S401. Read first real-time communication configuration information from a feature register of the inverter according to original communication configuration information corresponding to a preset interface in an inverter file.
[0056] S402, determining whether the first real-time communication configuration information is read successfully; if successful, executing S403; if unsuccessful, executing S404.
[0057] S403: Replace the original communication configuration information corresponding to the preset interface with the first real-time communication configuration information.
[0058] S404: Acquire multiple candidate baud rates, multiple candidate manufacturer characteristic information, and multiple inverter addresses.
[0059] Among them, the baud rate is the number of changes in the signal waveform transmitted per unit time. In this embodiment, the baud rate is the baud rate supported by the inverter. Candidate baud rates generally include 2400 bits per second (bps), 4800bps, 9600bps, 19200bps, 38400bps, 57600bps and 115200bps. The manufacturer characteristic information of the candidate manufacturer includes the manufacturer type and the configuration information corresponding to the inverter produced by the manufacturer. The configuration information corresponding to the inverter produced by the manufacturer can be obtained based on the manufacturer's manufacturer characteristic register. The inverter address is used to identify and distinguish different inverter devices.
[0060] Specifically, different inverters have different inverter attribute information and communication protocol information according to different manufacturers or different uses. Therefore, based on the baud rate, manufacturer feature information and inverter address that are more important to the communication protocol of the inverter, an attempt can be made to match the inverter connected to the preset interface. Thus, multiple candidate baud rates can be determined. For example, the baud rates supported by conventional inverters, such as 2400bps, 4800bps, 9600bps, 19200bps, 38400bps, 57600bps and 115200bps, are used as candidate baud rates. And determine the manufacturer feature information of multiple candidate manufacturers. For example, determine multiple types of manufacturers that can produce inverters, such as Sungrow Power Supply, Shangneng Electric, TBEA and other manufacturers, and obtain the configuration information corresponding to the inverters produced by these manufacturers based on the manufacturer feature registers of these manufacturers. Multiple inverter addresses may also be determined based on the configuration information corresponding to the inverters produced by these manufacturers. For example, the configuration information corresponding to the inverters produced by these manufacturers may form a string of messages, and the first byte of the message is the inverter address.
[0061] S405: Combine the candidate baud rates, manufacturer feature information, and inverter addresses to obtain multiple candidate communication configuration information.
[0062] Among them, a candidate communication configuration information includes a candidate baud rate, a manufacturer characteristic information and an inverter address.
[0063] Specifically, after determining multiple candidate baud rates, multiple manufacturer characteristic information and multiple inverter addresses, the multiple candidate baud rates, multiple manufacturer characteristic information and multiple inverter addresses can be arranged and combined randomly or in sequence to obtain multiple candidate communication configuration information.
[0064] Exemplarily, in one implementation, if multiple candidate baud rates, multiple manufacturer characteristic information, and multiple inverter addresses are arranged and combined in order, then a candidate baud rate can be used as a reference, such as 9600bps as the reference candidate baud rate, and multiple manufacturer characteristic information can be numbered, such as the manufacturer characteristic information is numbered from 1-i, and multiple inverter addresses are numbered, such as the inverter addresses are numbered from 1-j (since the Modbus protocol allows a maximum of 247 devices to be connected on a network, j is generally 247). Then, multiple candidate configuration information with 9600bps as the reference candidate baud rate can be determined, such as: (9600bps, 1, 1), (9600bps, 1, 2), ..., (9600bps, 1, 247), (9600bps, 2, 1), (9600bps, 2, 2), ..., (9600bps, i, 247). Furthermore, by changing the candidate baud rate, a plurality of candidate configuration information based on the candidate baud rates mentioned above can be obtained.
[0065] In another implementation, each candidate baud rate, each manufacturer characteristic information and each inverter address may be arranged and combined in a random order, and a plurality of candidate configuration information may be obtained.
[0066] S406: Determine one of the multiple candidate communication configuration information as the current communication configuration information.
[0067] Specifically, after determining a plurality of candidate communication configuration information, one of the candidate communication configuration information may be selected as the current communication configuration information, or each candidate communication configuration information may be selected in sequence as the current communication configuration information.
[0068] S407. Read second real-time configuration information from a feature register of the inverter according to the current communication configuration information.
[0069] Specifically, the baud rate in the current communication configuration information can be set to the current baud rate for reading the inverter. And, according to the manufacturer characteristic information in the current communication configuration information, the manufacturer type corresponding to the manufacturer characteristic information and the inverter characteristic information stored in the manufacturer's characteristic register are determined. And, using the inverter address in the current communication configuration information, send instructions to the inverter connected to the preset interface, and determine whether the inverter responds to the sent instructions. This process is the process of reading the second real-time configuration information from the characteristic register of the inverter according to the current communication configuration information.
[0070] S408, determining whether the second real-time communication configuration information is read successfully; if successful, executing S409; if unsuccessful, executing S410.
[0071] Specifically, if it is determined according to the above process that the inverter responds to the sent instruction, and the response information matches the information carried in the sent instruction, for example, the return frame in the response information is correct, then it means that the second real-time communication configuration information is read successfully. At this time, S409 can be directly executed. If it is determined according to the above process that the inverter does not respond to the sent instruction, or the response information does not match the information carried in the sent instruction, for example, the return frame in the response information is incorrect, then it means that the second real-time communication configuration information fails to read. At this time, S410 can be executed. Among them, when it is determined according to the above process that the inverter does not respond to the sent instruction, in order to improve the accuracy of sending instructions and receiving responses, the instruction can be repeatedly sent to the inverter once or a specified number of times. If the instruction is repeatedly sent once or a specified number of times and the response instruction is still not received, S410 is directly executed.
[0072] In this embodiment, based on the baud rate, manufacturer characteristic information and inverter address configuration information that are more important to the inverter access protocol, the baud rate, manufacturer characteristic information and inverter address are set in sequence by using a permutation and combination method, thereby achieving protocol adaptation of the inverter that traverses multiple candidate communication configuration information and accesses a preset interface, reducing manual operations when it is necessary to determine the communication protocol of the connected inverter.
[0073] S409: Replace the original communication configuration information corresponding to the preset interface with the second real-time communication configuration information.
[0074] Specifically, if it is determined that the second real-time communication configuration information is read successfully, it means that the second real-time communication configuration information can be successfully read from the inverter according to the candidate communication configuration information. Therefore, when the reading is successful, the original communication configuration information corresponding to the preset interface can be replaced with the second real-time communication configuration information.
[0075] S410: Are all candidate communication configuration information determined to be current communication configuration information? If so, return to execute S401; if not, execute S411.
[0076] Specifically, if it is determined that the second real-time communication configuration information fails to be read, it is necessary to determine whether there is any candidate communication configuration information that is not used as the current communication configuration information. That is, it is determined whether all candidate communication configuration information are determined as the current communication configuration information. If so, it means that the communication protocol of the inverter connected from the preset interface using the candidate communication configuration information has failed, and it is necessary to return to S401. If not, S411 can be continued.
[0077] S411. Replace the current communication configuration information from a plurality of candidate communication configuration information, and return to execute S407.
[0078] Specifically, if the candidate communication configuration information used as the current communication configuration information is not the last configuration information that is not used as the current communication configuration information, then the candidate communication configuration information that is not used as the current communication configuration information can be selected from multiple candidate communication configuration information as the current communication configuration information, and the process returns to execute S407 until all candidate communication configuration information are used as the current communication configuration information.
[0079] In this embodiment, after determining that the second real-time communication configuration information is successfully read using multiple candidate communication configuration information, the second real-time communication configuration information directly replaces the original communication configuration information corresponding to the preset interface, thereby solving the current problem of needing to perform software upgrades on the collection and monitoring terminal to meet the requirements of the communication protocol when inverters produced by different manufacturers are connected to the collection and monitoring terminal. This realizes protocol adaptation for the inverter connected from the preset interface, reduces the maintenance cost of the collection and monitoring terminal, and improves the convenience of replacing inverter equipment.
[0080] The inverter access method provided by the embodiment of the present invention is based on the configuration information of the baud rate, manufacturer characteristic information and inverter address that are more important to the inverter access protocol, and uses the method of permutation and combination to sequentially set the baud rate, manufacturer characteristic information and inverter address, thereby realizing protocol adaptation of traversing multiple candidate communication configuration information and the inverter accessing the preset interface, and reducing the manual operation when the communication protocol of the inverter to be accessed needs to be determined. At the same time, after determining that the second real-time communication configuration information is successfully read using multiple candidate communication configuration information, the second real-time communication configuration information directly replaces the original communication configuration information corresponding to the preset interface, solving the current problem that when inverters produced by different manufacturers are connected to the collection and monitoring terminal, the software of the collection and monitoring terminal needs to be upgraded to meet the requirements of the communication protocol, realizing protocol adaptation of the inverter accessed from the preset interface, reducing the maintenance cost of the collection and monitoring terminal, and improving the convenience of replacing the inverter equipment.
[0081] Figure 5 This is a flowchart of another inverter access method provided by an embodiment of the present invention. Based on the above embodiment, this embodiment introduces in detail the steps of "before reading the first real-time communication configuration information from the characteristic register of the inverter according to the original communication configuration information corresponding to the preset interface in the inverter file" and "reading the second real-time configuration information from the characteristic register of the inverter according to the candidate communication configuration information". Figure 5 As shown, the method includes:
[0082] S501, determine whether the preset adaptive configuration is activated; if so, execute S502; if not, return to execute S501.
[0083] The adaptive configuration is a configuration preset by a user to enable an adaptive period of the inverter communication protocol accessing a preset interface. In this embodiment, the adaptive configuration includes a user-specified configuration period and a configuration switch.
[0084] Specifically, in one implementation, when the user needs to determine the communication protocol of the inverter currently connected through the preset interface, the configuration switch can be turned on directly. In another implementation, the user can directly set the configuration cycle, so that the acquisition and monitoring terminal will automatically determine the communication protocol of the inverter currently connected through the preset interface in each cycle according to the configuration cycle. In another implementation, the user can pre-set the configuration cycle and turn on the configuration switch.
[0085] Specifically, it is determined whether the preset adaptive configuration is started. If it is started, the step S502 can be automatically executed according to the configuration cycle of the preset adaptive configuration or the switch state of the configuration switch. If it is not started, it is necessary to wait for the user to initiate a startup command of the adaptive configuration before continuing to execute the subsequent steps.
[0086] In this embodiment, a pre-set adaptive configuration command is added, and the subsequent steps of the inverter access method provided by the present invention are automatically executed by determining whether the adaptive configuration is started. While meeting the needs of customers, it reduces manpower and time costs and realizes the process of automatically determining the communication protocol of the inverter.
[0087] S502: Obtain inverter files.
[0088] Specifically, when it is determined that the adaptive configuration is started, such as when the current cycle reaches the user's configuration cycle, and / or when the configuration switch is turned on, the inverter profile needs to be obtained.
[0089] Exemplarily, the acquisition and monitoring terminal determines whether the inverter file sent is stored in its storage module. If yes, the inverter manufacturer type, inverter address, whether to connect an adapter, protocol version, and baud rate in the file configuration can be determined from the 4039 auxiliary information in the inverter file. If no, it is necessary to return to the step of executing S501.
[0090] S503: Read first real-time communication configuration information from a feature register of the inverter according to original communication configuration information corresponding to a preset interface in the inverter file.
[0091] S504, determining whether the first real-time communication configuration information is read successfully; if successful, executing S505; if unsuccessful, executing S506.
[0092] S505: Replace the original communication configuration information corresponding to the preset interface with the first real-time communication configuration information.
[0093] S506. Send a read instruction to the inverter through a preset interface so that the inverter receives the read instruction and determines a response result of reading the second real-time communication configuration information based on the candidate baud rate, manufacturer feature information, inverter address and feature register of the inverter in the candidate communication configuration information carried in the read instruction.
[0094] Specifically, the candidate baud rate in the candidate communication configuration information can be set to the current baud rate of the inverter. And, according to the manufacturer characteristic information in the candidate communication configuration information, the manufacturer type corresponding to the manufacturer characteristic information and the inverter characteristic information stored in the manufacturer's characteristic register are determined. And, using the inverter address in the candidate communication configuration information, send instructions to the inverter characteristic register of the inverter connected to the preset interface, and determine whether the inverter responds to the sent instructions. At this time, determining whether the inverter responds to the sent instructions is the response result of reading the second real-time communication configuration information.
[0095] S507: Receive a response result.
[0096] The response result includes failure to read the second real-time communication configuration information and success to read the second real-time communication configuration information.
[0097] Specifically, in one implementation, if the inverter does not send a response instruction to the acquisition and monitoring terminal, the response result can be directly determined as a failure to read the second real-time communication configuration information. In another implementation, if the inverter sends a response instruction to the acquisition and monitoring terminal, it is necessary to determine whether the response information carried in the response instruction is correct, for example, to determine whether the return frame in the response information is correct. If correct, the response result is a success in reading the second real-time communication configuration information. If incorrect, the response result is a failure to read the second real-time communication configuration information.
[0098] S508, determining whether the second real-time communication configuration information is read successfully; if successful, executing S509; if unsuccessful, returning to executing S501.
[0099] Specifically, if it is determined that the second real-time communication configuration information is read successfully, S509 is executed; if it fails, the process returns to S501.
[0100] S509: Replace the original communication configuration information corresponding to the preset interface with the second real-time communication configuration information.
[0101] The inverter access method provided in an embodiment of the present invention further adds a pre-set adaptive configuration command, and automatically implements the execution of subsequent steps of the inverter access method provided by the present invention by determining whether the adaptive configuration is started. While meeting the needs of customers, it reduces manpower and time costs and realizes the process of automatically determining the communication protocol of the inverter.
[0102] Figure 6 The structure diagram of an inverter access device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, it is applied to a collection and monitoring terminal, and the inverter is connected to the collection and monitoring terminal through a preset interface. The device includes:
[0103] The reading module 601 is used to read the first real-time communication configuration information from the feature register of the inverter according to the original communication configuration information corresponding to the preset interface in the inverter file;
[0104] A first determination module 602 is configured to replace the original communication configuration information corresponding to the preset interface with the first real-time communication configuration information if the first real-time communication configuration information is read successfully; and to read the second real-time communication configuration information from the feature register of the inverter according to the candidate communication configuration information if the first real-time communication configuration information is read unsuccessfully;
[0105] The second determining module 603 is configured to replace the original communication configuration information corresponding to the preset interface with the second real-time communication configuration information if the second real-time communication configuration information is read successfully.
[0106] Optionally, before reading the second real-time configuration information from the feature register of the inverter according to the candidate communication configuration information, the first determining module 602 is further configured to:
[0107] Acquire multiple candidate baud rates, multiple candidate manufacturer characteristic information and multiple inverter addresses; combine the candidate baud rates, manufacturer characteristic information and inverter addresses to obtain multiple candidate communication configuration information, wherein one candidate communication configuration information includes one candidate baud rate, one manufacturer characteristic information and one inverter address.
[0108] Optionally, the first determining module 602 is specifically configured to:
[0109] One of the multiple candidate communication configuration information is determined as the current communication configuration information, and the second real-time configuration information is read from the feature register of the inverter according to the current communication configuration information; if reading the second real-time communication configuration information fails, the current communication configuration information is replaced from the multiple candidate communication configuration information until all the candidate communication configuration information are determined as the current communication configuration information.
[0110] Optionally, the candidate baud rate, the manufacturer characteristic information and the inverter address are combined to obtain a plurality of candidate communication configuration information, and the first determination module 602 is specifically used for:
[0111] Taking a candidate baud rate as the base baud rate, the manufacturer characteristic information and the inverter address are combined to determine an intermediate communication configuration information group, wherein the candidate baud rate of each intermediate communication configuration information in the intermediate communication configuration information group is the base baud rate; and multiple intermediate communication configuration information groups determined with each candidate baud rate as the base baud rate are used as multiple candidate communication configuration information.
[0112] Optionally, the candidate communication configuration information includes a candidate baud rate, a manufacturer characteristic information and an inverter address, and the first determination module 602 is specifically used to:
[0113] A read instruction is sent to the inverter through a preset interface so that the inverter receives the read instruction and determines a response result of reading the second real-time communication configuration information based on the candidate baud rate, manufacturer characteristic information, inverter address and characteristic register of the inverter in the candidate communication configuration information carried in the read instruction; and receives the response result, wherein the response result includes a failure to read the second real-time communication configuration information and a success to read the second real-time communication configuration information.
[0114] Optionally, before reading the first real-time communication configuration information from the feature register of the inverter according to the original communication configuration information corresponding to the preset interface in the inverter file, the device further includes a switch module, and the switch module is further used to:
[0115] Determine whether the preset adaptive configuration is started; if started, obtain the inverter file; if not started, return to the step of determining whether the preset adaptive configuration is started.
[0116] Optionally, the adaptive configuration includes a user-specified configuration period and a configuration switch; determining whether the preset adaptive configuration is started, the switch module is specifically used to:
[0117] Determine whether the current cycle has reached the user-specified configuration cycle or whether the configuration switch is turned on.
[0118] The inverter access device provided in the embodiment of the present invention can execute the inverter access method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0119] Figure 7Another structural diagram of the acquisition and monitoring terminal 10 provided for an embodiment of the present invention. The acquisition and monitoring terminal can be presented in the form of an electronic device. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0120] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0121] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0122] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the inverter access method.
[0123] In some embodiments, the inverter access method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the inverter access method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the inverter access method in any other appropriate manner (e.g., by means of firmware).
[0124] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0125] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0126] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0127] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0128] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0129] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0130] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0131] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for connecting an inverter, characterized in that: Applied to a data acquisition and monitoring terminal, the inverter is connected to the data acquisition and monitoring terminal via a preset interface, and the method includes: Reading first real-time communication configuration information from a feature register of the inverter according to original communication configuration information corresponding to the preset interface in the inverter file; If the first real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface is replaced with the first real-time communication configuration information; If reading the first real-time communication configuration information fails, reading the second real-time communication configuration information from the feature register of the inverter according to the candidate communication configuration information; If the second real-time communication configuration information is read successfully, the original communication configuration information corresponding to the preset interface is replaced with the second real-time communication configuration information.
2. The inverter access method according to claim 1, characterized in that: Before reading the second real-time configuration information from the feature register of the inverter according to the candidate communication configuration information, the method further includes: Obtain multiple candidate baud rates, multiple candidate manufacturers' manufacturer characteristic information, and multiple inverter addresses; The candidate baud rates, the manufacturer characteristic information and the inverter address are combined to obtain a plurality of the candidate communication configuration information, wherein one of the candidate communication configuration information includes one of the candidate baud rates, one of the manufacturer characteristic information and one of the inverter address.
3. The inverter access method according to claim 2, characterized in that: The step of reading the second real-time configuration information from the feature register of the inverter according to the candidate communication configuration information comprises: Determine one of the plurality of candidate communication configuration information as current communication configuration information, and read the second real-time configuration information from the feature register of the inverter according to the current communication configuration information; If reading the second real-time communication configuration information fails, the current communication configuration information is replaced from a plurality of the candidate communication configuration information until all the candidate communication configuration information are determined as the current communication configuration information.
4. The inverter access method according to claim 2, characterized in that: The combining of the candidate baud rate, the manufacturer characteristic information and the inverter address to obtain a plurality of candidate communication configuration information includes: Taking one of the candidate baud rates as a reference baud rate, combining the manufacturer characteristic information with the inverter address, and determining an intermediate communication configuration information group, wherein the candidate baud rate of each of the intermediate communication configuration information in the intermediate communication configuration information group is the reference baud rate; The plurality of intermediate communication configuration information groups determined with each of the candidate baud rates as a reference baud rate are used as the plurality of candidate communication configuration information.
5. The inverter access method according to claim 1, characterized in that: The candidate communication configuration information includes a candidate baud rate, a manufacturer characteristic information and an inverter address; The step of reading the second real-time configuration information from the feature register of the inverter according to the candidate communication configuration information comprises: Sending a read instruction to the inverter through the preset interface, so that the inverter receives the read instruction, and determines a response result of reading the second real-time communication configuration information based on the candidate baud rate, the manufacturer characteristic information, the inverter address and the characteristic register of the inverter in the candidate communication configuration information carried in the read instruction; The response result is received, wherein the response result includes failure to read the second real-time communication configuration information and success to read the second real-time communication configuration information.
6. The inverter access method according to claim 1, characterized in that: Before reading the first real-time communication configuration information from the feature register of the inverter according to the original communication configuration information corresponding to the preset interface in the inverter file, the method further includes: Determine whether the preset adaptive configuration is activated; If enabled, the inverter file is obtained; If not started, return to the step of determining whether the preset adaptive configuration is started.
7. The inverter access method according to claim 6, characterized in that: The adaptive configuration includes a user-specified configuration cycle and a configuration switch; The step of determining whether the preset adaptive configuration is started includes: Determine whether the current cycle has reached the user-specified configuration cycle or whether the configuration switch is turned on.
8. An inverter access device, characterized in that: Applied to a data acquisition and monitoring terminal, the inverter is connected to the data acquisition and monitoring terminal through a preset interface, and the device includes: A reading module, configured to read first real-time communication configuration information from a feature register of the inverter according to original communication configuration information corresponding to the preset interface in the inverter file; A first determination module, configured to replace the original communication configuration information corresponding to the preset interface with the first real-time communication configuration information if the first real-time communication configuration information is read successfully; and to read second real-time communication configuration information from a feature register of the inverter according to candidate communication configuration information if the first real-time communication configuration information is read unsuccessfully; The second determining module is configured to replace the original communication configuration information corresponding to the preset interface with the second real-time communication configuration information if the second real-time communication configuration information is read successfully.
9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the inverter access method according to any one of claims 1 to 7 is implemented.
10. A collection and monitoring terminal, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the inverter access method according to any one of claims 1 to 7.
Citation Information
Cited By
Distributed energy adaptive access method and system
CN120073803A