A storage unit data processing method, device, equipment and storage medium
By comparing the information of the storage unit and the running software in the frequency converter, calculating the correction code, and performing corresponding parameter initialization operations, the problem of low reliability of parameter information in the frequency converter memory unit is solved, and the correct reading of parameter information is achieved and use, improve the reliability and production efficiency of the frequency converter.
Patent Information
- Application Number
- CN202111524608.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-12-14
AI Technical Summary
How to improve the reliability of parameter information in the inverter storage unit and ensure that the parameter information can be read and used correctly when powered on.
By reading the software information in the inverter storage unit and comparing the current running software information, calculating the calibration code of the parameter information, and performing factory parameters initialization or normal power-on parameters initialization operations when necessary to ensure the correctness of the parameter information .
It effectively improves the reliability of parameter information in the storage unit, ensures that the inverter can operate normally when powered on, and simplifies the production process.
Smart Images

Figure CN114201208B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of frequency converters, and more specifically, to a storage unit data processing method, device, equipment and storage medium. Background Art
[0002] The inverter generally includes a storage unit (usually EEPROM), which mainly stores parameter information such as inverter manufacturer configuration information, motor parameter information, encoder information, user function configuration information, operating data, etc. Every time the inverter is powered on, the DSP of the inverter needs to be powered on and read the above parameter information to achieve corresponding use; therefore, how to ensure the reliability of the parameter information in the storage unit of the inverter is a problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0003] The object of the present invention is to provide a storage unit data processing method, device, equipment and storage medium, which can effectively improve the reliability of parameter information in the storage unit and effectively simplify the production process.
[0004] In order to achieve the above object, the present invention provides the following technical solutions:
[0005] A storage unit data processing method, comprising:
[0006] Reading software information in a storage unit of the frequency converter, and comparing the software information in the storage unit with software information of software currently running on the frequency converter;
[0007] If the comparison result is that the two are different, the correction code of the preset parameter information is calculated, and the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter are all written into the storage unit to implement the factory parameter initialization operation;
[0008] If the comparison result is that the two are the same, the parameter information and the corresponding correction code in the storage unit are read, the correction code of the parameter information in the storage unit is calculated, and it is determined whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same. If so, it is determined that the parameter information in the storage unit is correct; otherwise, it is determined that there is a problem with the parameter information in the storage unit, so as to achieve normal power-on parameter initialization operation.
[0009] Preferably, calculating the correction code of the preset parameter information and calculating the correction code of the parameter information in the storage unit both include:
[0010] Dividing the target parameter information into a plurality of information groups, and calculating the correction code of each information group respectively; wherein the target parameter information is preset parameter information or parameter information in the storage unit, and a single information group contains a plurality of data information belonging to the target parameter information;
[0011] Correspondingly, determining whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same includes:
[0012] It is determined whether the calculated correction codes of the parameter information in the storage unit corresponding to each information group are the same as the correction codes of the corresponding information groups in the storage unit.
[0013] Preferably, it also includes:
[0014] The parameter information input into the parameter change entry is the information to be updated. If the information to be updated is the same as the corresponding parameter information in the storage unit, it is determined that there is no need to update the corresponding parameter information. Otherwise, the corresponding parameter information in the storage unit is replaced with the information to be updated, and the correction code of the information group to which the information to be updated belongs is calculated, and the corresponding correction code in the storage unit is replaced with the calculated correction code of the information group to which the information to be updated belongs.
[0015] Preferably, before replacing the corresponding parameter information in the storage unit with the information to be updated, the method further includes:
[0016] The information to be updated is compared with the corresponding information range. If the information to be updated is within the corresponding information range, the step of replacing the corresponding parameter information in the storage unit with the information to be updated is performed; otherwise, the information to be updated is corrected to a value within the corresponding information range that is closest to the information to be updated.
[0017] Preferably, comparing the software information in the storage unit with the software information of the software currently running on the inverter includes:
[0018] The software version in the storage unit is compared with the software version of the software currently running the inverter, and the software identification code in the storage unit is compared with the software identification code of the software currently running the inverter. If the comparison results show that the two are the same, it is determined that the software information in the storage unit is the same as the software information of the software currently running the inverter. Otherwise, it is determined that the software information in the storage unit is different from the software information of the software currently running the inverter; wherein the software information includes the software version and the software identification code.
[0019] Preferably, the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter are all written into the storage unit, including:
[0020] Calculate the total length value of the preset parameter information, write the preset parameter information into the byte unit of the storage unit from 0 to the total length value minus 1, write the correction code corresponding to the preset parameter information into the byte unit of the storage unit from the length value to the length value plus the total number of information groups minus 1, write the software information of the software currently running the inverter into the last two byte units of the storage unit, and clear all data information of other byte units to zero.
[0021] Preferably, it also includes:
[0022] If the calculated correction code of the parameter information in the storage unit is different from the correction code in the storage unit, a corresponding question mark is added to the byte unit where the information group with different correction codes is located in the storage unit.
[0023] A storage unit data processing device, comprising:
[0024] A comparison module, used to: read the software information in the storage unit of the inverter, and compare the software information in the storage unit with the software information of the software currently running on the inverter;
[0025] A first initialization module is used to: if the comparison result is that the two are different, calculate the correction code of the preset parameter information, and write the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter into the storage unit to implement the factory parameter initialization operation;
[0026] The second initialization module is used to: if the comparison result is that the two are the same, read the parameter information and the corresponding correction code in the storage unit, calculate the correction code of the parameter information in the storage unit, and determine whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same; if so, determine that the parameter information in the storage unit is correct; otherwise, determine that there is a problem with the parameter information in the storage unit, so as to achieve normal power-on parameter initialization operation.
[0027] A storage unit data processing device, comprising:
[0028] Memory for storing computer programs;
[0029] A processor is used to implement the steps of the storage unit data processing method as described in any one of the above items when executing the computer program.
[0030] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the storage unit data processing method as described in any one of the above items.
[0031] The present invention provides a storage unit data processing method, device, equipment and storage medium, the method comprising: reading software information in a storage unit of a frequency converter, and comparing the software information in the storage unit with the software information of the software currently running the frequency converter; if the comparison result is that the two are different, calculating the correction code of the preset parameter information, and writing the preset parameter information, the corresponding correction code and the software information of the software currently running the frequency converter into the storage unit to implement the factory parameter initialization operation; if the comparison result is that the two are the same, reading the parameter information and the corresponding correction code in the storage unit, calculating the correction code of the parameter information in the storage unit, and judging whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same, if so, determining that the parameter information in the storage unit is correct, otherwise, determining that there is a problem with the parameter information in the storage unit to implement the normal power-on parameter initialization operation. When the inverter is powered on, the present application enters the normal power-on parameter initialization operation if the software information in the storage unit of the inverter is the same as the software information of the software currently running the inverter, otherwise enters the factory parameter initialization operation; when performing the factory parameter initialization operation, the preset parameter information and the corresponding correction code are obtained, and both and the software information of the software currently running the inverter are stored in the storage unit. When performing the normal power-on parameter initialization operation, the parameter information and the correction code in the storage unit are read. If the correction code calculated for the parameter information in the storage unit is the same as the correction code in the storage unit, it means that the parameter information in the storage unit is correct and can be read to implement operations such as the use of the inverter. Otherwise, it means that there is a problem with the parameter information in the storage unit and it may not be available for reading to implement operations such as the use of the inverter. It can be seen that the present application can verify whether the parameter information in the storage unit has been changed by comparing the correction code corresponding to the parameter information, so that when the parameter information in the storage unit has not been changed, it can be read normally to realize operations such as the use of the inverter, and when the parameter information in the storage unit is changed, it is determined that there is a problem with the parameter information in the storage unit, avoiding the occurrence of unexpected problems caused by reading it, thereby effectively improving the reliability of the parameter information in the storage unit; and, the present application can automatically realize the update of the parameter information in the storage unit when the software update is switched, thereby effectively simplifying the corresponding production process. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0033] Figure 1 A flowchart of a storage unit data processing method provided by an embodiment of the present invention;
[0034] Figure 2 A schematic structural diagram of a storage unit data processing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0036] See also Figure 1 , which shows a flow chart of a storage unit data processing method provided by an embodiment of the present invention, which may specifically include:
[0037] S11: Read the software information in the storage unit of the inverter, and compare the software information in the storage unit with the software information of the software currently running the inverter.
[0038] It should be noted that the currently running software is the software currently running on the hardware platform of the frequency converter, and the storage unit of the frequency converter needs to store the default parameters (preset parameter information) solidified in the software, and the default parameters include but are not limited to operation data, etc. Since the software running on the hardware platform of the frequency converter may be different, the embodiment of the present application needs to read the software information in the storage unit of the frequency converter when the frequency converter is powered on, and then compare the software information in the storage unit with the software information of the current running software of the frequency converter to determine whether it is necessary to implement the factory parameter initialization operation or the normal power-on parameter initialization operation, that is, if the software information in the storage unit is different from the software information of the current running software of the frequency converter, it means that the factory parameter initialization operation needs to be implemented, and if the software information in the storage unit is the same as the software information of the current running software of the frequency converter, it means that the normal power-on parameter initialization operation needs to be implemented. Among them, the software information is the information representing the corresponding software, which may include information representing the software version, software name, software number, etc., and can be set accordingly according to actual needs.
[0039] S12: If the comparison result is that the two are different, the correction code of the preset parameter information is calculated, and the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter are all written into the storage unit to implement the factory parameter initialization operation.
[0040] When implementing the factory parameter initialization operation, the default parameters solidified in the current running software of the inverter can be first obtained as the preset parameter information, the preset parameter information is calculated to obtain the corresponding correction code, and then the preset parameter information and the calculated corresponding correction code are stored in the storage unit, so that the parameter information stored in the storage unit is the parameter information corresponding to the current running software of the inverter; in order to facilitate the subsequent operation judgment based on the software information in the storage unit when the inverter is powered on next time, the embodiment of the present application will also write the software information of the current running software of the inverter into the storage unit. In addition, in order to avoid the occupation of the storage unit by invalid data and the influence on the use of the inverter, when the embodiment of the present application writes the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter into the storage unit, these data information can be replaced with the corresponding data information already stored in the storage unit, or the parameter information, correction code and software information in the storage unit can be cleared first, and then the preset parameter information, corresponding correction code and the software information of the current running software of the inverter are written into the storage unit, which can be set according to actual needs.
[0041] S13: If the comparison result is that the two are the same, the parameter information and the corresponding correction code in the storage unit are read, the correction code of the parameter information in the storage unit is calculated, and it is determined whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same. If so, it is determined that the parameter information in the storage unit is correct. Otherwise, it is determined that there is a problem with the parameter information in the storage unit to achieve normal power-on parameter initialization operation.
[0042] When implementing the normal power-on parameter initialization operation, the parameter information and the corresponding correction code in the storage unit can be read first, and then the parameter information in the read storage unit is calculated to obtain the corresponding correction code, and then the correction code calculated from the parameter information in the read storage unit and the correction code read from the storage unit are compared. If the two are consistent, it means that the parameter information in the storage unit is correct and can be read to implement operations such as the use of the inverter. Otherwise, it means that the parameter information in the storage unit has been tampered with or changed due to other reasons after being written to the storage unit. Therefore, the parameter information in the storage unit may not be read to implement operations such as the use of the inverter, thereby effectively improving the reliability of the data information in the storage unit.
[0043] When the inverter is powered on, the present application enters the normal power-on parameter initialization operation if the software information in the storage unit of the inverter is the same as the software information of the software currently running the inverter, otherwise enters the factory parameter initialization operation; when performing the factory parameter initialization operation, the preset parameter information and the corresponding correction code are obtained, and both and the software information of the software currently running the inverter are stored in the storage unit. When performing the normal power-on parameter initialization operation, the parameter information and the correction code in the storage unit are read. If the correction code calculated for the parameter information in the storage unit is the same as the correction code in the storage unit, it means that the parameter information in the storage unit is correct and can be read to implement operations such as the use of the inverter. Otherwise, it means that there is a problem with the parameter information in the storage unit and it may not be available for reading to implement operations such as the use of the inverter. It can be seen that the present application can verify whether the parameter information in the storage unit has been changed by comparing the correction code corresponding to the parameter information, so that when the parameter information in the storage unit has not been changed, it can be read normally to realize operations such as the use of the inverter, and when the parameter information in the storage unit is changed, it is determined that there is a problem with the parameter information in the storage unit, avoiding the occurrence of unexpected problems caused by reading it, thereby effectively improving the reliability of the parameter information in the storage unit; and, the present application can automatically realize the update of the parameter information in the storage unit when the software update is switched, thereby effectively simplifying the corresponding production process.
[0044] A storage unit data processing method provided by an embodiment of the present invention calculates a correction code of preset parameter information and calculates a correction code of parameter information in a storage unit, both of which include:
[0045] Divide the target parameter information into a plurality of information groups, and respectively calculate the correction code of each information group; wherein the target parameter information is preset parameter information or parameter information in a storage unit, and a single information group contains a plurality of data information belonging to the target parameter information;
[0046] Accordingly, determining whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same includes:
[0047] It is determined whether the calculated correction codes of the parameter information corresponding to each information group in the storage unit correspond to the correction codes of the corresponding information group in the storage unit and are respectively the same.
[0048] The embodiment of the present application can use CRC16 to calculate the correction code of parameter information. Of course, other settings made according to actual needs are also within the protection scope of the present invention. The parameter information in the embodiment of the present application may be multiple. In order to facilitate the rapid and accurate positioning of the parameter information with problems, the embodiment of the present application may divide the parameter information into multiple information groups, and a single information group contains multiple parameter information (i.e., data information belonging to the parameter information). Then, each information group is calculated in turn to obtain a correction code corresponding to each information group. Then, when the correction code is compared, the correction code of each information group corresponding to the parameter information in the storage unit is respectively compared with the correction code of each information group corresponding to the parameter information in the storage unit obtained by calculation, so as to determine that the information group corresponding to the correction code with different comparison results in the storage unit is part of the parameter information with problems. For example, the correction code of the nth information group corresponding to each information group of the parameter information in the storage unit is compared with the correction code of the nth information group corresponding to each information group of the parameter information in the storage unit obtained by calculation (n is any value from 1 to the total number of information groups obtained by grouping the parameter information in the storage unit, and includes 1 and the total number of information groups obtained by grouping the parameter information in the storage unit). If the comparison results are different, it means that the parameter information with problems is the parameter information in the nth information group.
[0049] In addition, when implementing grouping, the parameter information may be grouped into groups of m, the total number of groups is represented by GroupLen, the total length value of the parameter information is represented by DataLen, and m is specifically described as 10. In this case, the following formula exists (if the parameter information in any information group is less than 10, it can be padded with zeros):
[0050] C.1) A = DataLen / 10 (this is a division and rounding operation in C language);
[0051] C.2) B = DataLen% 10 (this is a modulo operation in C language);
[0052] C.3) If B>0, then GroupLen=A+1, otherwise GroupLen=A.
[0053] A storage unit data processing method provided by an embodiment of the present invention may further include:
[0054] The parameter information input into the parameter change entry is the information to be updated. If the information to be updated is the same as the corresponding parameter information in the storage unit, it is determined that there is no need to update the corresponding parameter information. Otherwise, the corresponding parameter information in the storage unit is replaced with the information to be updated, the correction code of the information group to which the information to be updated belongs is calculated, and the corresponding correction code in the storage unit is replaced with the calculated correction code of the information group to which the information to be updated belongs.
[0055] In order to facilitate the update operation of parameter information, the embodiment of the present application can also be provided with a parameter change entry, so that the user or other module terminals can update the parameter information in the storage unit. Specifically, the following steps can be included: monitoring the parameter change entry; comparing the corresponding parameter information in the current storage unit with the parameter information sent into the parameter change entry, if the two are equal, there is no need to update the corresponding parameter information in the storage unit, otherwise, the parameter information sent into the parameter change entry replaces the corresponding parameter information in the current storage unit, after the replacement is completed, the information group to which the parameter information sent into the parameter change entry belongs is calculated to obtain the corresponding correction code, and the obtained correction code replaces the original correction code of the parameter information sent into the parameter change entry in the storage unit, thereby quickly and effectively realizing the automatic parameter update.
[0056] A storage unit data processing method provided by an embodiment of the present invention further includes, before replacing corresponding parameter information in the storage unit with information to be updated:
[0057] The information to be updated is compared with the corresponding information range. If the information to be updated is within the corresponding information range, the step of replacing the corresponding parameter information in the storage unit with the information to be updated is performed; otherwise, the information to be updated is corrected to a value within the corresponding information range that is closest to the information to be updated.
[0058] It should be noted that since the parameter information in the storage unit has a certain modification range, when the corresponding parameter information in the storage unit needs to be replaced with the information to be updated, the information to be updated can be compared with the corresponding modification range, such as with the corresponding maximum value, minimum value and other boundaries. If the information to be updated is greater than the maximum value of the corresponding modification range, the information to be updated is corrected to the maximum value of the corresponding modification range. If the information to be updated is less than the minimum value of the corresponding modification range, the information to be updated is corrected to the minimum value of the corresponding modification range, thereby further ensuring the reliability of the parameter information in the storage unit. In addition, usually after the parameter information is updated, power-off and power-on operations will not change the parameter information (except for the parameter information that changes in real time, such as the cumulative count of power-on time and the cumulative count of running time).
[0059] In addition, after reading the parameter information in the storage unit in step S13, each parameter information read can be compared with the corresponding information range respectively. If each parameter information read is within the corresponding information range, it means that the parameter information is correct. Otherwise, the parameter information that is not within the corresponding information range is determined to be the parameter information to be corrected, and then the parameter information to be corrected is corrected to a value within the corresponding information range that is closest to the information to be corrected, and after the correction is completed, the parameter information to be corrected replaces the original parameter information in the storage unit, thereby preventing the reading of out-of-bounds parameters due to storage failure by performing boundary detection, forcing the out-of-bounds parameters to be modified, and preventing unpredictable problems from occurring in the system.
[0060] A storage unit data processing method provided by an embodiment of the present invention compares software information in the storage unit with software information of software currently running in the inverter, which may include:
[0061] The software version in the storage unit is compared with the software version of the software currently running the inverter, and the software identification code in the storage unit is compared with the software identification code of the software currently running the inverter. If the comparison results show that the two are the same, it is determined that the software information in the storage unit is the same as the software information of the software currently running the inverter. Otherwise, it is determined that the software information in the storage unit is different from the software information of the software currently running the inverter; wherein the software information includes the software version and the software identification code.
[0062] It should be noted that in order to quickly and effectively determine the parameter initialization operation that needs to be implemented subsequently, when the inverter is powered on, the embodiment of the present application can read the software identification code and software version stored in the storage unit, and then compare them with the software identification code and software version solidified in the current running software of the inverter, so as to determine whether to perform the factory parameter initialization operation for the storage unit. Specifically, since different software are provided with a unique software identification code (assuming the storage length is N1 bytes), the software version of the same software is also unique due to the iterative upgrade of the software (assuming the storage length is N2 bytes), and accordingly, since the size of the storage unit is determined by the product hardware itself, the embodiment of the present application can store the above two information (software identification code and software version) in the last N1+N2 byte units of the storage unit. In a specific implementation, implementing software information comparison may include: confirming the maximum storable address MaxAdd according to the storage unit manual, reading the unique software identification code SoftId and the software version SoftVersion in the software code, reading the stored software identification code SoftId_Save by the storage unit address (MaxAdd-1), reading the stored software version SoftVersion_Save by the storage unit address MaxAdd, judging whether SoftId is equal to SoftId_Save, and judging whether SoftVersion is equal to SoftVersion_Save. If any one of the judgment results is unequal, entering the factory parameter initialization operation, otherwise entering the normal power-on parameter initialization operation.
[0063] A storage unit data processing method provided by an embodiment of the present invention writes preset parameter information, corresponding correction codes and software information of the current running software of the inverter into the storage unit, which may include:
[0064] Calculate the total length value of the preset parameter information, write the preset parameter information into the byte unit of the storage unit from 0 to the total length value minus 1, write the correction code corresponding to the preset parameter information into the byte unit of the storage unit from the length value to the length value plus the total number of information groups minus 1, write the software information of the current running software of the inverter into the last two byte units of the storage unit, and clear all data information of other byte units to zero.
[0065] It should be noted that the embodiment of the present application can first calculate the total length value DataLen of the parameter information to be stored, and then write the default parameters solidified in the code of the software currently running the inverter as parameter information into the storage unit in sequence, and store 0 to (DataLen-1) byte units in sequence; store the corresponding correction code of the parameter information to be stored in DataLen to (DataLen+GroupLen-1) byte units; write the software information of the software currently running the inverter into (MaxAdd-1) to MaxAdd; and clear all the data information of the storage unit address (DataLen+GroupLen) to (MaxAdd-2) to zero in sequence, so as to facilitate the reading, storage and other processing operations of the above-mentioned data information. In addition, when calculating the total length value of the parameter information to be stored, it can be to first determine the data length of each parameter information to be stored (generally in bytes as the minimum unit), and then accumulate the above data lengths in sequence, which is the total length value DataLen of the parameter information to be stored.
[0066] A storage unit data processing method provided by an embodiment of the present invention may further include:
[0067] If the calculated correction code of the parameter information in the storage unit is different from the correction code in the storage unit, a corresponding question mark is added to the byte unit where the information group with different correction codes is located in the storage unit.
[0068] After the correction code comparison is implemented in the embodiment of the present application, a corresponding problem mark is added to the position of the information group corresponding to the correction code whose comparison results are different in the storage unit, so as to warn the user that there is a problem with the corresponding parameter information through the added problem mark, so as to facilitate the user to implement the corresponding parameter information processing operation.
[0069] In a specific implementation, a storage unit data processing method provided by an embodiment of the present invention may include:
[0070] Step 1: Confirm the maximum storable address MaxAdd according to the memory unit manual.
[0071] Step 2: Determine whether factory parameter initialization is required:
[0072] Read the software identification code SoftId and software version SoftVersion in the software currently running the inverter, read the stored software identification code SoftId_Save from the storage unit address (MaxAdd-1), read the stored software version SoftVersion_Save from the storage unit address MaxAdd, and determine whether SoftId is equal to SoftId_Save, and whether SoftVersion is equal to SoftVersion_Save. If any of the judgment results is unequal, go to step 3 to perform factory parameter initialization operation, otherwise go to step 4 to perform normal power-on parameter initialization operation.
[0073] Step 3: Factory parameter initialization operation:
[0074] Calculate the total length of the data to be stored DataLen;
[0075] Write the default parameters solidified in the software code of the inverter's currently running software into the storage unit in sequence, storing 0 to (DataLen-1) byte units in sequence;
[0076] Group all data into groups of m to obtain multiple information groups, with a total number of groups being GroupLen;
[0077] Calculate the correction code of each information group and store the correction code in the storage unit address DataLen~(DataLen+GroupLen-1);
[0078] The data information of the storage unit addresses (DataLen+GroupLen) to (MaxAdd-2) are all cleared to zero in sequence.
[0079] Step 4: Normal power-on parameter initialization operation:
[0080] According to the DataLen calculated in step 3, the parameter information is read one by one from the storage units;
[0081] Compare the read parameter information with the modification range designed in the software, so as to realize the corresponding parameter information correction;
[0082] Refer to step 3 to group the parameter information read this time and generate a correction code;
[0083] The newly generated correction code is compared one by one with the correction code stored in the storage unit (address: DataLen~(DataLen+GroupLen-1)) to determine whether they are equal. If they are not equal, the corresponding area (position in the storage unit) is marked.
[0084] Step 5: Correct the calibration code in real time:
[0085] Monitoring parameter change entry;
[0086] Compare the current parameter information in the judgment storage unit with the parameter information sent in the parameter change entry to determine whether they are equal. If they are not equal, the correction code needs to be recalculated, otherwise no update is required;
[0087] Get the serial number GroupLen_Point of the parameter information sent in the parameter change entry in the total number of groups GroupLen (the GroupLen serial number is encoded according to 0 to GroupLen-1);
[0088] Recalculate the correction code according to the parameter information of GroupLen_Point×10 to GroupLen_Point×10+9, and store the calculated correction code to the storage unit address DataLen+GroupLen_Point again;
[0089] Among them, calculating the serial number GroupLen_Point of the parameter information sent into the parameter change entry in the total number of groups GroupLen may include: obtaining the address tempAdd of the parameter information sent into the parameter change entry in the storage unit (which can be obtained by performing the "&" instruction on the variable in C language); obtaining the relative starting address tempStart of the parameter information sent into the parameter change entry (the method is the same as above); GroupLen_Point = (tempAdd-tempStart) / m (this is a division and rounding operation in C language).
[0090] It can be seen that the present application can complete the factory parameter initialization, power-on parameter correction, power-on parameter out-of-bounds detection, parameter change and correction code update and other operations of the storage unit according to the above-mentioned implementation method; when the software update is switched, the factory parameters can be automatically updated, simplifying the production process; by performing boundary detection, it can prevent the reading of out-of-bounds parameters due to storage failure or modification, and force the modification of out-of-bounds parameters to prevent unpredictable problems in the system; by comparing the correction code to verify whether the parameters have been changed, the user can be alerted to avoid unpredictable accidents in advance.
[0091] The embodiment of the present invention further provides a storage unit data processing device, such as Figure 2 As shown, it may specifically include:
[0092] The comparison module 11 is used to: read the software information in the storage unit of the inverter, and compare the software information in the storage unit with the software information of the software currently running in the inverter;
[0093] The first initialization module 12 is used to: if the comparison result is that the two are different, calculate the correction code of the preset parameter information, and write the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter into the storage unit to realize the factory parameter initialization operation;
[0094] The second initialization module 13 is used to: if the comparison result is that the two are the same, read the parameter information and the corresponding correction code in the storage unit, calculate the correction code of the parameter information in the storage unit, and determine whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same; if so, determine that the parameter information in the storage unit is correct; otherwise, determine that there is a problem with the parameter information in the storage unit, so as to achieve normal power-on parameter initialization operation.
[0095] An embodiment of the present invention further provides a storage unit data processing device, which may include:
[0096] Memory for storing computer programs;
[0097] A processor is used to implement the steps of any of the above storage unit data processing methods when executing a computer program.
[0098] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above storage unit data processing methods are implemented.
[0099] It should be noted that for the description of the relevant parts of a storage unit data processing device, equipment and storage medium provided in the embodiment of the present invention, please refer to the detailed description of the corresponding parts in a storage unit data processing method provided in the embodiment of the present invention, which will not be repeated here. In addition, the parts of the above technical solutions provided in the embodiment of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0100] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A storage unit data processing method, characterized in that: include: Reading software information in a storage unit of the frequency converter, and comparing the software information in the storage unit with software information of software currently running on the frequency converter; If the comparison result is that the two are different, the correction code of the preset parameter information is calculated, and the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter are all written into the storage unit to implement the factory parameter initialization operation; If the comparison result is that the two are the same, the parameter information and the corresponding correction code in the storage unit are read, the correction code of the parameter information in the storage unit is calculated, and it is determined whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same. If so, it is determined that the parameter information in the storage unit is correct; otherwise, it is determined that there is a problem with the parameter information in the storage unit, so as to achieve normal power-on parameter initialization operation.
2. The method according to claim 1, characterized in that Calculating the correction code of the preset parameter information and calculating the correction code of the parameter information in the storage unit both include: Dividing the target parameter information into a plurality of information groups, and calculating the correction code of each information group respectively; wherein the target parameter information is preset parameter information or parameter information in the storage unit, and a single information group contains a plurality of data information belonging to the target parameter information; Correspondingly, determining whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same includes: It is determined whether the calculated correction codes of the parameter information in the storage unit corresponding to each information group are the same as the correction codes of the corresponding information groups in the storage unit.
3. The method according to claim 2, characterized in that Also includes: The parameter information input into the parameter change entry is the information to be updated. If the information to be updated is the same as the corresponding parameter information in the storage unit, it is determined that there is no need to update the corresponding parameter information. Otherwise, the corresponding parameter information in the storage unit is replaced with the information to be updated, and the correction code of the information group to which the information to be updated belongs is calculated, and the corresponding correction code in the storage unit is replaced with the calculated correction code of the information group to which the information to be updated belongs.
4. The method according to claim 3, characterized in that Before replacing the corresponding parameter information in the storage unit with the information to be updated, the method further includes: The information to be updated is compared with the corresponding information range. If the information to be updated is within the corresponding information range, the step of replacing the corresponding parameter information in the storage unit with the information to be updated is performed; otherwise, the information to be updated is corrected to a value within the corresponding information range that is closest to the information to be updated.
5. The method according to claim 4, characterized in that Comparing the software information in the storage unit with the software information of the software currently running on the inverter includes: The software version in the storage unit is compared with the software version of the software currently running the inverter, and the software identification code in the storage unit is compared with the software identification code of the software currently running the inverter. If the comparison results show that the two are the same, it is determined that the software information in the storage unit is the same as the software information of the software currently running the inverter. Otherwise, it is determined that the software information in the storage unit is different from the software information of the software currently running the inverter; wherein the software information includes the software version and the software identification code.
6. The method according to claim 5, characterized in that Writing the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter into the storage unit includes: Calculate the total length value of the preset parameter information, write the preset parameter information into the byte unit of the storage unit from 0 to the value obtained by subtracting 1 from the total length value, write the correction code corresponding to the preset parameter information into the byte unit of the storage unit from the length value to the value obtained by adding the length value to the total number of information groups and subtracting 1, write the software information of the software currently running the inverter into the last two byte units of the storage unit, and clear all data information of other byte units to zero.
7. The method according to claim 6, characterized in that Also includes: If the calculated correction code of the parameter information in the storage unit is different from the correction code in the storage unit, a corresponding question mark is added to the byte unit where the information group with different correction codes is located in the storage unit.
8. A storage unit data processing device, characterized in that: include: A comparison module, used to: read the software information in the storage unit of the inverter, and compare the software information in the storage unit with the software information of the software currently running on the inverter; A first initialization module is used to: if the comparison result is that the two are different, calculate the correction code of the preset parameter information, and write the preset parameter information, the corresponding correction code and the software information of the current running software of the inverter into the storage unit to implement the factory parameter initialization operation; The second initialization module is used to: if the comparison result is that the two are the same, read the parameter information and the corresponding correction code in the storage unit, calculate the correction code of the parameter information in the storage unit, and determine whether the calculated correction code of the parameter information in the storage unit and the correction code in the storage unit are the same; if so, determine that the parameter information in the storage unit is correct; otherwise, determine that there is a problem with the parameter information in the storage unit, so as to achieve normal power-on parameter initialization operation.
9. A storage unit data processing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the storage unit data processing method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the storage unit data processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for actuating mobile terminal and mobile phone television signal receiving chip
CN101351003A
Firmware updating method and program of fast charging equipment, fast charging equipment and storage medium
CN111831308A