Generator set controller historical record reading method and device and electronic equipment

By using the MODBUS protocol to assign addresses to historical data in the generator set controller, and through the MODBUS protocol communication between the upper computer and the generator set controller, the problem of reading historical data interfaces and protocols is solved, and the problem of reading historical data is achieved. Efficient and low-cost data reading and maintenance.

CN119420720APending Publication Date: 2025-02-11BEIJING CAMPOWER ELECTRIC SCIENCE & TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411265338.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the prior art, there are many types of interfaces and protocols for reading the historical record data of the generator set controller, resulting in high secondary development costs for users and complex maintenance and upgrades.

Method used

The MODBUS protocol is used to allocate the address of historical data to the generator set controller. Through the MODBUS protocol communication between the upper computer and the generator set controller, the historical data can be read and written to realize the synchronization and update of data.

Benefits of technology

The process of reading the historical data of the generator set controller is simplified, the maintenance and upgrade costs are reduced, the versatility and communication efficiency are improved, and the logic is simple, the communication is high-speed and the reliability is high.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420720A_ABST
    Figure CN119420720A_ABST
Patent Text Reader

Abstract

The invention provides a generator set controller historical record reading method and device and electronic equipment, and the method comprises the steps that a generator set controller distributes MODBUS addresses for historical record data, and the MODBUS addresses comprise the total number address, the currently read address and the historical record data content address; the upper computer reads the total piece number address through the MODBUS protocol and records the total piece number of the historical record data; the upper computer writes a serial number of the to-be-read address into the to-be-read address through the MODBUS protocol, wherein the serial number is a natural number between 1 and the total number of the to-be-read address; the generator set controller updates the data content corresponding to the serial number in the historical record to the historical record data content address according to the serial number written by the upper computer; the upper computer reads the updated historical record data content address through the MODBUS protocol and records the updated historical record data content; and continuing to read the next historical record, and repeatedly writing the sequence number and the following steps. The universality is high, and the maintenance cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology for a generator set controller, and in particular to a method, a device and an electronic device for reading historical records of a generator set controller. Background Art

[0002] In the current generator industry, the communication between the host computer and the generator controller is often completed through serial ports. Common serial port communications include RS232, RS422, and RS485. Different software protocols are used on the basis of serial port communications to meet different needs. For the historical record data of the generator set, due to its large amount of data, the use of multiple different software protocols and interfaces will not only increase the cost of secondary development for users, but also make the maintenance and upgrade of the software itself more complicated. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method, device and electronic device for reading historical records of a generator set controller, which solves the problem of a wide variety of interfaces and protocols for reading historical record data of a generator set controller in the current industry. It has strong versatility, low maintenance cost, and is easy for secondary development. It also has simple logic, high-speed communication and high reliability.

[0004] According to one aspect of the present invention, a method for reading historical records of a generator set controller is provided, the method comprising:

[0005] S1. The generator set controller allocates a MODBUS address for the historical record data, wherein the MODBUS address includes the total number of addresses, the address of the current record to be read, and the address of the content of the historical record data;

[0006] S2, the host computer reads the total number of addresses through the MODBUS protocol and records the total number of historical record data;

[0007] S3, the host computer writes the serial number of the number of the current number of the read address to the number of the read address through the MODBUS protocol, and the serial number is a natural number between 1 and the total number of the read address;

[0008] S4, the generator set controller updates the data content corresponding to the serial number in the historical record to the historical record data content address according to the serial number written by the host computer;

[0009] S5. The host computer reads the updated historical record data content address through the MODBUS protocol and records the updated historical record data content;

[0010] S6. Continue to read the next historical record and repeat steps S3-S5.

[0011] Furthermore, the historical record data content address includes an event type address, an event item address, a time address, a power generation information address, a load information address, a city power information address and an engine information address.

[0012] According to another aspect of the present invention, a method for reading historical records of a generator set controller is provided, the method comprising:

[0013] S1', the generator set controller allocates a MODBUS address for the historical record data, wherein the MODBUS address includes the total number of addresses, the address of the current record to be read, the address of the current record to be updated, and the address of the content of the historical record data;

[0014] S2', the host computer reads the total number of addresses through the MODBUS protocol and records the total number of historical record data;

[0015] S3', the host computer writes the serial number of the item to be read to the address of the item to be read currently through the MODBUS protocol, and the serial number is a natural number between 1 and the total number of items;

[0016] S4', the generator set controller updates the data content corresponding to the serial number in the historical record to the address of the historical record data content according to the serial number written by the host computer, and updates the data in the address of the currently updated number to the serial number corresponding to the data content in the address of the historical record data content;

[0017] S5', the host computer determines whether the data content in the historical record data content address has been updated by comparing the current serial number in the currently updated address with the serial number of the address currently to be read written by the host computer in step S3', and records the update result;

[0018] S6', continue to read the next historical record, and repeat steps S3'-S5'.

[0019] Furthermore, the host computer determines whether the data content in the historical record data content address is updated by comparing the current serial number in the currently updated address with the serial number of the address currently to be read written by the host computer in step S3', and records the update result, including:

[0020] The host computer reads the current serial number in the address of the currently updated item through the MODBUS protocol, and compares the serial number with the serial number of the address of the currently to be read item written by the host computer in step S3'. If they are consistent, the updated historical record data content address in step S4' is read and the historical record data content of this update is recorded; if they are inconsistent, this step is repeated. After repeating the preset number of times, it is still inconsistent, and the host computer records that the reading of this historical record has failed.

[0021] Furthermore, the historical record data content address includes an event type address, an event item address, a time address, a power generation information address, a load information address, a city power information address and an engine information address.

[0022] According to another aspect of the present invention, a device for reading historical records of a generator set controller is provided, comprising:

[0023] The first address allocation module is used for the generator set controller to allocate a MODBUS address for the historical record data, wherein the MODBUS address includes the total number of addresses, the address of the current record to be read, and the address of the content of the historical record data;

[0024] A first total number acquisition module is used for the host computer to read the total number address through the MODBUS protocol and record the total number of historical record data;

[0025] The first read sequence number writing module is used for the host computer to write the sequence number of the current to-be-read address through the MODBUS protocol, where the sequence number is a natural number between 1 and the total number of entries;

[0026] A historical record data content update module is used for the generator set controller to update the data content corresponding to the serial number in the historical record to the historical record data content address according to the serial number written by the host computer;

[0027] The first update result recording module is used for the host computer to read the updated historical record data content address through the MODBUS protocol and record the historical record data content updated this time;

[0028] The first loop module is used to continue reading the next historical record and control the first read sequence number writing module, the historical record data content updating module and the first update result recording module to be executed repeatedly.

[0029] According to another aspect of the present invention, a device for reading historical records of a generator set controller is provided, comprising:

[0030] The second address allocation module is used for the generator set controller to allocate MODBUS addresses for historical record data, wherein the MODBUS addresses include the total number of addresses, the address of the number of records to be read currently, the address of the number of records to be updated currently, and the address of the content of the historical record data;

[0031] A second total number acquisition module is used for the host computer to read the total number address through the MODBUS protocol and record the total number of historical record data;

[0032] The second read sequence number writing module is used for the host computer to write the sequence number of the current to-be-read address through the MODBUS protocol, where the sequence number is a natural number between 1 and the total number of entries;

[0033] The historical record data content and sequence number update module is used for the generator set controller to update the data content corresponding to the sequence number in the historical record to the historical record data content address according to the sequence number written by the host computer, and update the data in the address of the currently updated number to the sequence number corresponding to the data content in the historical record data content address;

[0034] The second update result recording module is used for the host computer to determine whether the data content in the historical record data content address has been updated by comparing the current serial number in the currently updated address with the serial number of the address currently to be read written by the host computer, and record the update result;

[0035] The second loop module is used to continue reading the next historical record, and control the second read sequence number writing module, the historical record data content and sequence number updating module and the second update result recording module to be executed repeatedly.

[0036] Furthermore, the second update structure recording module includes:

[0037] The comparison module is used by the host computer to read the current serial number in the address currently being updated through the MODBUS protocol, and compare the serial number with the serial number of the address currently being read written by the host computer.

[0038] The read success record module is used to read the updated historical record data content address and record the updated historical record data content when the comparison results are consistent.

[0039] The read failure record module is used to control the comparison module to repeat when the comparison results are inconsistent. If there is still inconsistency after a preset number of repetitions, the host computer will record the failure of reading this historical record.

[0040] According to another aspect of the present invention, there is provided an electronic device, comprising:

[0041] Processor; and

[0042] Memory for storing programs,

[0043] The program includes instructions, which, when executed by the processor, cause the processor to execute the above-mentioned generator set controller historical record reading method.

[0044] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned generator set controller history record reading method.

[0045] One or more technical solutions provided in the embodiments of the present application can achieve the following technical effects:

[0046] It solves the problem of a wide variety of interfaces and protocols for reading historical record data of generator set controllers in the current industry. It has strong versatility, low maintenance cost, is easy for secondary development, and has simple logic, high-speed communication and high reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0048] Figure 1 A flow chart showing a method for reading a historical record of a generator set controller according to an exemplary embodiment of the present invention is shown;

[0049] Figure 2 A flow chart showing a method for reading a historical record of a generator set controller according to another exemplary embodiment of the present invention is shown;

[0050] Figure 3 A schematic block diagram of a historical record reading device for a generator set controller according to an exemplary embodiment of the present invention is shown;

[0051] Figure 4 A schematic block diagram of a historical record reading device for a generator set controller according to an exemplary embodiment of the present invention is shown;

[0052] Figure 5 A schematic block diagram of a second update result recording module according to an exemplary embodiment of the present invention is shown;

[0053] Figure 6 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0054] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0055] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0056] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0057] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0058] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0059] Aspects of the present invention are described below with reference to the accompanying drawings.

[0060] like Figure 1 As shown, an exemplary embodiment of the present invention provides a method for reading historical records of a generator set controller, comprising the following steps:

[0061] S1. The generator set controller allocates a MODBUS address for the historical record data. The MODBUS address includes the total number of addresses, the address of the current record to be read, and the address of the historical record data content.

[0062] Optionally, the total number of addresses, the address of the number of entries currently to be read, and the address of the content of the historical record data are allocated in this order, and each address uses a certain number of holding registers.

[0063] Among them, the historical record data content address includes event type address, event item address, time address, power generation information address, load information address, AC information address and engine information address. The above addresses are also allocated in sequence, and each address uses a certain number of holding registers.

[0064] The total number of addresses, the address of the current number to be read, the event type address, and the event item address each occupy a holding register, the time address occupies 6 holding registers, the power generation information address occupies 7 holding registers, the load information address occupies 4 holding registers, and the AC power information address occupies 7 holding registers; the "event type" includes: 0, power on / off event; 1, shutdown alarm event; 2, tripping shutdown event; 3, tripping alarm event; and the "event item" is a specific item under a certain "event type".

[0065] S2. The host computer reads the total number of addresses through the MODBUS protocol and records the total number of historical record data. The total number is a natural number greater than or equal to 1. The 03 function code in the MODBUS protocol is used to read the "total number".

[0066] S3. The host computer writes the serial number of the record to be read to the address of the record to be read through the MODBUS protocol. The serial number is a natural number between 1 and the total number of records, representing which historical record the host computer needs to read. The serial number of the record to be read uses the 06 function code in the MODBUS protocol.

[0067] S4. The generator controller updates the data content corresponding to the serial number in the historical record to the historical record data content address according to the serial number written by the host computer; the generator controller updates the data by traversing the historical record to find the data content corresponding to the written serial number, and updates the data to the historical record data content address. Optionally, the event type address, event item address, time address, power generation information address, load information address, mains information address, and engine information address are updated respectively.

[0068] Step S4 is the generator set controller responding to the upper computer's operation of reading historical records. Normally, the serial number written does not exceed the total number of records. If the serial number in the address of the current record to be read is greater than the total number of historical records, no response will be given, and then step S3 will be repeated to rewrite the serial number of the current record to be read.

[0069] S5. The host computer reads the updated historical record data content address through the MODBUS protocol and records the updated historical record data content. The written sequence number is matched with the updated historical record data content to form a complete historical record data, thus completing the reading of a historical record data.

[0070] S6. Continue to read the next historical record, and repeat steps S3-S5 until all the records are read.

[0071] As an example, the total number of historical record data read and recorded by the host computer is 10. The host computer writes the serial number 1 to the address of the current record to be read through the MODBUS protocol, and the generator set controller updates the content of the first historical record data in the historical record to the historical record data content address. Then the host computer reads and records the updated historical record data content through the MODBUS protocol, and the reading of the first historical record data is completed. Then the host computer can write serial number 2, and complete the reading of the second historical record data in the same way; repeat this until the reading of 10 historical record data is completed. The serial numbers written by the host computer can be written in order from large to small or from small to large, or they can be written randomly, as long as the total number of records is read. Preferably, the written serial numbers are written in order from large to small or from small to large.

[0072] This application implements the reading of historical records of generator set controllers based on the MODBUS protocol, realizes data synchronization between the host computer and the generator set controller, and solves the problem of a wide variety of interfaces and protocols for reading historical record data of generator set controllers in the current industry. It has strong versatility, low maintenance cost, is easy for secondary development, and has simple logic, high-speed communication, and high reliability.

[0073] like Figure 2 As shown, an exemplary embodiment of the present invention provides a method for reading historical records of a generator set controller, the method comprising:

[0074] S1', the generator set controller allocates a MODBUS address for the historical record data. The MODBUS address includes the total number of addresses, the address of the current record to be read, the address of the current record to be updated, and the address of the content of the historical record data.

[0075] Optionally, the total number of addresses, the address of the number of entries currently to be read, the address of the number of entries currently updated, and the address of the content of the historical record data are allocated in this order, and each address uses a certain number of holding registers.

[0076] Among them, the historical record data content address includes event type address, event item address, time address, power generation information address, load information address, AC information address and engine information address. The above addresses are also allocated in sequence, and each address uses a certain number of holding registers.

[0077] The total number of addresses, the address of the current number to be read, the address of the current number to be updated, the event type address, and the event item address each occupy a holding register, the time address occupies 6 holding registers, the power generation information address occupies 7 holding registers, the load information address occupies 4 holding registers, and the AC power information address occupies 7 holding registers; the "event type" includes: 0, power on / off event; 1, shutdown alarm event; 2, tripping shutdown event; 3, tripping alarm event; and the "event item" is a specific item under a certain "event type".

[0078] S2', the host computer reads the total number of addresses through the MODBUS protocol and records the total number of historical records. Reading the "total number" uses the 03 function code in the MODBUS protocol.

[0079] S3', the host computer writes the serial number of the record to be read to the address of the record to be read through the MODBUS protocol. The serial number is a natural number between 1 and the total number of records; it represents which historical record the host computer needs to read. The serial number of the record to be read uses the 06 function code in the MODBUS protocol.

[0080] S4', the generator set controller updates the data content corresponding to the serial number in the historical record to the historical record data content address according to the serial number written by the host computer, and updates the data in the address of the current update to the serial number corresponding to the data content in the historical record data content address.

[0081] Step S4' is the generator set controller responding to the operation of the host computer reading the historical records. Usually, the serial number written does not exceed the total number of records. The generator set controller updates the data by traversing the historical records to find the data content corresponding to the written serial number, and updates the data to the historical record data content address, and correspondingly updates the serial number corresponding to the historical data content to the address of the currently updated record to ensure the integrity of the data. If the serial number in the address of the record to be read is greater than the total number of historical records, no response will be given, that is, if the generator set controller traverses the historical records and fails to retrieve the historical record data content corresponding to the written serial number, the historical record data content address will not be updated, nor will the data in the address of the currently updated record be updated, so as to prompt the host computer that the record is damaged or does not exist; then continue to repeat step S3' and rewrite the serial number of the record to be read.

[0082] S5', the host computer determines whether the data content in the historical record data content address is updated by comparing the current serial number in the currently updated address (i.e., the serial number in the currently updated address after the update in step S4') with the serial number of the address currently to be read written by the host computer in step S3', and records the update result; specifically including:

[0083] The host computer reads the current serial number in the address of the currently updated record through the MODBUS protocol, and compares the serial number with the serial number of the address of the currently to be read record written by the host computer in step S3'. If they are consistent, the updated historical record data content address in step S4' is read and the historical record data content of this update is recorded, indicating that the historical record has been read and is a complete historical record; if they are inconsistent, this step is repeated. If there is still inconsistency after repeating the preset number of times (preferably three times), it means that the historical record may be damaged, and the host computer records that the reading of this historical record has failed.

[0084] By comparing the data in the address currently being updated with the data in the address currently being read, it is determined whether the data in the historical record data content address has been updated, thereby achieving synchronization between the generator set controller and the host computer data and ensuring the integrity of the historical record data reading.

[0085] S6', continue to read the next historical record, and repeat steps S3'-S5' until all the records are read.

[0086] As an example, the total number of historical record data read and recorded by the host computer is 10. The host computer writes the serial number 1 to the address of the current record to be read through the MODBUS protocol. The generator set controller updates the content of the first historical record data in the historical record to the address of the historical record data content. Then the host computer reads and records the content of the historical record data updated this time through the MODBUS protocol. After the historical record data is updated, the actual serial number corresponding to the content of the historical record data is used as the current serial number in the address of the current update to update the address of the current update; then a comparison is performed. If the updated serial number in the address of the current update is 1, which is consistent with the written serial number 1, it indicates that the target read historical record data content is consistent with the actual read historical record data content, and the historical record data content is updated, and the reading of the first historical record data is completed. If the updated serial number in the address of the current update is other than 1, that is, the actual serial number corresponding to the data content updated to the address of the historical record data content is not necessarily the same as the serial number to be written, it indicates that the target updated historical record data content is not the same as the actual updated historical record data content, and the historical record is damaged. The integrity of the historical record data is verified by comparison. Then the host computer can write serial number 2 and complete the reading of the second historical record data in the same way; repeat this process until the reading of 10 historical record data is completed.

[0087] An exemplary embodiment of the present invention provides a generator set controller history record reading device 1100, such as Figure 3 As shown, including:

[0088] The first address allocation module 1101 is used for the generator set controller to allocate MODBUS addresses for historical record data. The MODBUS address includes the total number of addresses, the address of the current record to be read, and the address of the content of the historical record data;

[0089] The first total number acquisition module 1102 is used for the host computer to read the total number address through the MODBUS protocol and record the total number of historical record data;

[0090] The first read sequence number writing module 1103 is used by the host computer to write the sequence number of the current to-be-read address through the MODBUS protocol, and the sequence number is a natural number between 1 and the total number of entries;

[0091] The historical record data content update module 1104 is used for the generator set controller to update the data content corresponding to the serial number in the historical record to the historical record data content address according to the serial number written by the host computer;

[0092] The first update result recording module 1105 is used for the host computer to read the updated historical record data content address through the MODBUS protocol and record the historical record data content updated this time;

[0093] The first loop module 1106 is used to continue reading the next historical record and control the first read sequence number writing module, the historical record data content updating module and the first update result recording module to be executed repeatedly.

[0094] An exemplary embodiment of the present invention provides a generator set controller history record reading device 1100, such as Figure 4 As shown, including:

[0095] The second address allocation module 1101' is used for the generator set controller to allocate MODBUS addresses for historical record data. The MODBUS address includes the total number of addresses, the address of the current record to be read, the address of the current record to be updated, and the address of the content of the historical record data;

[0096] The second total number acquisition module 1102' is used for the host computer to read the total number address through the MODBUS protocol and record the total number of historical record data;

[0097] The second read sequence number writing module 1103' is used by the host computer to write the sequence number of the current to-be-read address through the MODBUS protocol, and the sequence number is a natural number between 1 and the total number of entries;

[0098] The historical record data content and sequence number updating module 1104' is used for the generator set controller to update the data content corresponding to the sequence number in the historical record to the historical record data content address according to the sequence number written by the host computer, and to update the data in the address of the current update to the sequence number corresponding to the data content in the historical record data content address;

[0099] The second update result recording module 1105' is used by the host computer to determine whether the data content in the historical record data content address has been updated by comparing the current serial number in the address of the current update with the serial number of the address of the current read written by the host computer, and record the update result;

[0100] The second loop module 1106' is used to continue reading the next historical record and control the second read sequence number writing module, the historical record data content and sequence number updating module and the second update result recording module to execute repeatedly.

[0101] Furthermore, if Figure 5 As shown, the second update structure recording module 1105' includes:

[0102] Comparison module 11051 is used for the host computer to read the current serial number in the address of the current update through the MODBUS protocol, and compare the serial number with the serial number of the address of the current read written by the host computer.

[0103] The read success record module 11052 is used to read the updated historical record data content address and record the updated historical record data content when the comparison results are consistent.

[0104] The read failure record module 11053 is used to control the comparison module to repeat the execution when the comparison results are inconsistent. If there is still inconsistency after a preset number of repetitions, the host computer records the failure of reading this historical record.

[0105] For the convenience of description, the above devices are described in terms of functions and are divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0106] It should be noted that: the generator set controller history record reading device provided in the above embodiment only uses the division of the above functional modules as an example when reading the generator set controller history record. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the generator set controller history record reading device provided in the above embodiment and the generator set controller history record reading method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0107] The exemplary embodiment of the present invention further provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the electronic device executes the method for reading the historical records of the generator set controller according to the embodiment of the present invention.

[0108] An exemplary embodiment of the present invention further provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a generator set controller history record reading method according to an embodiment of the present invention.

[0109] An exemplary embodiment of the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform a method according to an embodiment of the present invention.

[0110] refer to Figure 6 , a block diagram of an electronic device 800 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, 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, 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.

[0111] like Figure 6 As shown, the electronic device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a ROM (read-only memory) 1202 or a computer program loaded from a storage unit 1208 to a RAM (random access memory) 1203. In the RAM 1203, various programs and data required for the operation of the electronic device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An I / O interface (input / output) 1205 is also connected to the bus 1204.

[0112] A plurality of components in the electronic device 1200 are connected to the I / O interface 1205, including: an input unit 1206, an output unit 1207, a storage unit 1208, and a communication unit 1209. The input unit 1206 may be any type of device capable of inputting information to the electronic device 1200, and the input unit 1206 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 1207 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1204 may include, but is not limited to, a disk, an optical disk. The communication unit 1209 allows the electronic device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0113] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above. For example, in some embodiments, the generator set controller history record reading method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1200 via the ROM 1202 and / or the communication unit 1209. In some embodiments, the computing unit 1201 may be configured to execute the generator set controller history record reading method in any other appropriate manner (e.g., by means of firmware).

[0114] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0115] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable 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. 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.

[0116] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0117] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0118] The systems and techniques described herein may be implemented in a computing system that includes back-end 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 front-end 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 back-end components, middleware components, or front-end 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), and the Internet.

[0119] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

Claims

1. A method for reading historical records of a generator set controller, characterized in that: The method comprises: S1. The generator set controller allocates a MODBUS address for the historical record data, wherein the MODBUS address includes the total number of addresses, the address of the current record to be read, and the address of the content of the historical record data; S2, the host computer reads the total number of addresses through the MODBUS protocol and records the total number of historical record data; S3, the host computer writes the serial number of the number of the current number of the read address to the number of the read address through the MODBUS protocol, and the serial number is a natural number between 1 and the total number of the read address; S4, the generator set controller updates the data content corresponding to the serial number in the historical record to the historical record data content address according to the serial number written by the host computer; S5. The host computer reads the updated historical record data content address through the MODBUS protocol and records the updated historical record data content; S6. Continue to read the next historical record and repeat steps S3-S5.

2. The method for reading the historical records of a generator set controller according to claim 1, characterized in that: The historical record data content address includes an event type address, an event item address, a time address, a power generation information address, a load information address, a city power information address and an engine information address.

3. A method for reading historical records of a generator set controller, characterized in that: The method comprises: S1', the generator set controller allocates a MODBUS address for the historical record data, wherein the MODBUS address includes the total number of addresses, the address of the current record to be read, the address of the current record to be updated, and the address of the content of the historical record data; S2', the host computer reads the total number of addresses through the MODBUS protocol and records the total number of historical record data; S3', the host computer writes the serial number of the item to be read to the address of the item to be read currently through the MODBUS protocol, and the serial number is a natural number between 1 and the total number of items; S4', the generator set controller updates the data content corresponding to the serial number in the historical record to the address of the historical record data content according to the serial number written by the host computer, and updates the data in the address of the currently updated number to the serial number corresponding to the data content in the address of the historical record data content; S5', the host computer determines whether the data content in the historical record data content address has been updated by comparing the current serial number in the currently updated address with the serial number of the address currently to be read written by the host computer in step S3', and records the update result; S6', continue to read the next historical record, and repeat steps S3'-S5'.

4. The method for reading the historical records of a generator set controller according to claim 3, characterized in that: The host computer determines whether the data content in the historical record data content address has been updated by comparing the current serial number in the currently updated address with the serial number of the address currently to be read written by the host computer in step S3', and records the update result, including: The host computer reads the current serial number in the address of the currently updated item through the MODBUS protocol, and compares the serial number with the serial number of the address of the currently to be read item written by the host computer in step S3'. If they are consistent, the updated historical record data content address in step S4' is read and the historical record data content of this update is recorded; if they are inconsistent, this step is repeated. After repeating the preset number of times, it is still inconsistent, and the host computer records that the reading of this historical record has failed.

5. The method for reading the historical records of a generator set controller according to claim 3, characterized in that: The historical record data content address includes an event type address, an event item address, a time address, a power generation information address, a load information address, a city power information address and an engine information address.

6. A device for reading historical records of a generator set controller, characterized in that: include: The first address allocation module is used for the generator set controller to allocate a MODBUS address for the historical record data, wherein the MODBUS address includes the total number of addresses, the address of the current record to be read, and the address of the content of the historical record data; A first total number acquisition module is used for the host computer to read the total number address through the MODBUS protocol and record the total number of historical record data; The first read sequence number writing module is used for the host computer to write the sequence number of the current to-be-read address through the MODBUS protocol, where the sequence number is a natural number between 1 and the total number of entries; A historical record data content update module is used for the generator set controller to update the data content corresponding to the serial number in the historical record to the historical record data content address according to the serial number written by the host computer; The first update result recording module is used for the host computer to read the updated historical record data content address through the MODBUS protocol and record the historical record data content updated this time; The first loop module is used to continue reading the next historical record and control the first read sequence number writing module, the historical record data content updating module and the first update result recording module to be executed repeatedly.

7. A device for reading historical records of a generator set controller, characterized in that: include: The second address allocation module is used for the generator set controller to allocate MODBUS addresses for historical record data, wherein the MODBUS addresses include the total number of addresses, the address of the number of records to be read currently, the address of the number of records to be updated currently, and the address of the content of the historical record data; A second total number acquisition module is used for the host computer to read the total number address through the MODBUS protocol and record the total number of historical record data; The second read sequence number writing module is used for the host computer to write the sequence number of the current to-be-read address through the MODBUS protocol, where the sequence number is a natural number between 1 and the total number of entries; The historical record data content and sequence number update module is used for the generator set controller to update the data content corresponding to the sequence number in the historical record to the historical record data content address according to the sequence number written by the host computer, and update the data in the address of the currently updated number to the sequence number corresponding to the data content in the historical record data content address; The second update result recording module is used for the host computer to determine whether the data content in the historical record data content address has been updated by comparing the current serial number in the currently updated address with the serial number of the address currently to be read written by the host computer, and record the update result; The second loop module is used to continue reading the next historical record, and control the second read sequence number writing module, the historical record data content and sequence number updating module and the second update result recording module to be executed repeatedly.

8. The device for reading the historical records of the generator set controller according to claim 7, characterized in that: The second update structure recording module includes: The comparison module is used by the host computer to read the current serial number in the address currently being updated through the MODBUS protocol, and compare the serial number with the serial number of the address currently being read written by the host computer. The read success record module is used to read the updated historical record data content address and record the updated historical record data content when the comparison results are consistent. The read failure record module is used to control the comparison module to repeat when the comparison results are inconsistent. If there is still inconsistency after a preset number of repetitions, the host computer will record the failure of reading this historical record.

9. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1-2 or 3-6.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-2 or 3-6.