Highly-safe electricity meter self-checking method and system
By judging the status of power supply and memory when the smart meter is started, and judging and updating the calibration data, the inaccurate meter caused by the downtime of the meter is solved, and the meter is highly safe and stable operation of the meter is achieved.
Patent Information
- Application Number
- CN202411752865.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-02-11
AI Technical Summary
There is a possibility of a smart meter downtime during use, resulting in inaccurate metering and equipment failure, and a highly secure self-test method is required to ensure the continuous and stable operation of the meter.
By determining whether the power supply and read and write of the power supply, live erasable programmable read-only memory are normal when the meter is started, the pre-stored calibration data is read and the consistency is determined. If it is inconsistent, the error flag will be recorded and the data will be updated.
It realizes self-check when starting the meter, ensures the power supply of the meter and the normal operation of the memory, avoids metering errors and equipment failures, and achieves the purpose of high safety.
Smart Images

Figure CN119414325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric meter self-test, and in particular to a highly safe electric meter self-test method and system. Background Art
[0002] Existing smart meters are designed with large-scale integrated circuits. Whether it is the SOC solution or the MCU+ metering chip solution, advanced integrated circuits are used to ensure accurate measurement. At the same time, due to the high integration of the chip, the peripheral devices of the meter are more precise and the size of the meter has become smaller. The three-phase rail meter has been reduced from the previous 7P to the current 3P thanks to the development of integrated circuits. Compared with mechanical meters, the service life of electronic smart meters can reach 10 years or longer. Mechanical meters have certain mechanical wear due to the rotation of the induction wheel, while electronic meters only work through component sampling without mechanical damage. The attenuation of component performance is generally not more than 10%, so the electronic type has a longer service life. In addition, the main chip of the electronic meter is powerful and can directly drive or expand LED and LCD displays. It can expand multiple communication interfaces and multiple communication methods. In short, it has changed from a simple measuring instrument to an important node and monitoring equipment in the field of Internet of Things and new energy.
[0003] However, since smart meters are electronic devices, they may fail. Therefore, in order to ensure that the meters continue to work stably, higher requirements are placed on smart meters. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a highly safe electric meter self-test method and system.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] A highly safe electric meter self-test method comprises the following steps:
[0007] S1. When starting the electric meter, determine whether the power supply to the electric meter is normal. If so, proceed to step S2;
[0008] S2, determining whether the power supply of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S3;
[0009] S3, judging whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S4;
[0010] S4. Read the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter, and determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory. If not, determine again after a first preset time interval. When the number of determinations reaches a first preset threshold, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded.
[0011] Furthermore, step S1 is specifically as follows:
[0012] When the electric meter is started, it is determined whether the power supply to the electric meter is normal. If so, it is determined again after a delay of a second preset time and the number of determinations is accumulated. When the number of determinations reaches a second preset threshold, the power supply to the electric meter is normal, and step S2 is performed.
[0013] Furthermore, step S1 further includes:
[0014] If the power supply to the electric meter is abnormal, the second preset time period is delayed and the judgment is repeated and the number of judgments is accumulated again.
[0015] Furthermore, step S2 is specifically as follows:
[0016] Determine whether the power supply of the electric erasable programmable read-only memory of the electric meter is normal. If so, judge again after a third preset time delay and accumulate the number of judgments. When the number of judgments reaches the third preset threshold, the power supply of the electric erasable programmable read-only memory of the electric meter is normal, and proceed to step S3.
[0017] Furthermore, step S3 is specifically as follows:
[0018] Determine whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter are normal. If so, enter step S4; if not, delay for a fourth preset time and judge again and accumulate the number of judgments. When the number of judgments reaches a fourth preset threshold, the reading and writing of the electrically erasable programmable read-only memory of the electric meter are both abnormal, then the electrically erasable programmable read-only memory is determined to be abnormal and the relevant flag is recorded.
[0019] Furthermore, after step S4, the following steps are further included:
[0020] During the operation of the electric meter, it is periodically determined whether the calibration data in the random access memory is consistent with the first calibration data;
[0021] If yes, clear the calibration data error flag;
[0022] If not, determining whether the calibration data in the random access memory is consistent with the second calibration data;
[0023] If yes, after writing the second calibration data into the random access memory and replacing the first calibration data, clear the calibration data error flag;
[0024] If not, determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory and clear the calibration data error flag; if not, record the calibration data error flag.
[0025] Furthermore, after step S4, the following steps are further included:
[0026] When the electric meter is in operation, a power pulse is detected and it is determined whether the power exceeds a first power threshold. If so, the power is written into a first electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a first operating threshold. If so, the power is written into a second electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a second operating threshold. If so, the power is written into a third electrically erasable programmable read-only memory.
[0027] A highly secure electric meter self-checking system includes a processor and a memory, wherein the memory stores a program or an instruction, and when the program or the instruction is executed by the processor, the following steps are implemented:
[0028] S1. When starting the electric meter, determine whether the power supply to the electric meter is normal. If so, proceed to step S2;
[0029] S2, determining whether the power supply of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S3;
[0030] S3, judging whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S4;
[0031] S4. Read the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter, and determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory. If not, determine again after a first preset time interval. When the number of determinations reaches a first preset threshold, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded.
[0032] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented:
[0033] When the electric meter is started, it is determined whether the power supply to the electric meter is normal. If so, it is determined again after a delay of a second preset time and the number of determinations is accumulated. When the number of determinations reaches a second preset threshold, the power supply to the electric meter is normal, and step S2 is performed.
[0034] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented:
[0035] Determine whether the power supply of the electric erasable programmable read-only memory of the electric meter is normal. If so, judge again after a third preset time delay and accumulate the number of judgments. When the number of judgments reaches the third preset threshold, the power supply of the electric erasable programmable read-only memory of the electric meter is normal, and proceed to step S3.
[0036] The beneficial effects of the present invention are:
[0037] The present invention provides a highly secure electric meter self-checking method and system. When starting the electric meter, it is determined whether the power supply to the electric meter is normal. If so, it is determined whether the power supply of the electric meter's electrically erasable programmable read-only memory is normal. If so, it is determined whether the reading and writing of the electric meter's electrically erasable programmable read-only memory are normal. If so, the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter are read, and it is determined whether the first calibration data are consistent with the second calibration data. If so, the first calibration data or the second calibration data is written into a random access memory. If not, it is determined again at an interval of a first preset time length. When the number of determinations reaches a first preset threshold value, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded. In the above manner, self-checking is achieved when the electric meter is started, ensuring that the electric meter works continuously and stably, thereby achieving a highly secure purpose. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 Shown is a flowchart of the steps of a highly safe self-test method for an electric meter according to the present invention;
[0039] Figure 2 Shown is a structural block diagram of a highly secure electric meter self-checking system of the present invention;
[0040] Description of Figure Numbers:
[0041] 1-Processor; 2-Memory. DETAILED DESCRIPTION
[0042] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments:
[0043] like Figure 1 As shown, the present invention provides a highly safe electric meter self-test method, comprising the following steps:
[0044] S1. When starting the electric meter, determine whether the power supply to the electric meter is normal. If so, proceed to step S2;
[0045] S2, determining whether the power supply of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S3;
[0046] S3, judging whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S4;
[0047] S4. Read the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter, and determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory. If not, determine again after a first preset time interval. When the number of determinations reaches a first preset threshold, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded.
[0048] From the above description, it can be seen that the present invention has the following beneficial effects:
[0049] The present invention provides a highly secure self-checking method for an electric meter. When starting the electric meter, it is determined whether the power supply to the electric meter is normal. If so, it is determined whether the power supply of the electric meter's electrically erasable programmable read-only memory is normal. If so, it is determined whether the reading and writing of the electric meter's electrically erasable programmable read-only memory are normal. If so, the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter are read, and it is determined whether the first calibration data are consistent with the second calibration data. If so, the first calibration data or the second calibration data is written into a random access memory. If not, it is determined again at an interval of a first preset time length. When the number of determinations reaches a first preset threshold value, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded. In the above manner, self-checking is achieved when the electric meter is started, ensuring that the electric meter works continuously and stably, thereby achieving a highly secure purpose.
[0050] Furthermore, step S1 is specifically as follows:
[0051] When the electric meter is started, it is determined whether the power supply to the electric meter is normal. If so, it is determined again after a delay of a second preset time and the number of determinations is accumulated. When the number of determinations reaches a second preset threshold, the power supply to the electric meter is normal, and step S2 is performed.
[0052] It can be seen from the above description that through the above multiple delay judgments, it can be ensured that the power supply to the electric meter is normal and stable.
[0053] Furthermore, step S1 further includes:
[0054] If the power supply to the electric meter is abnormal, the second preset time period is delayed and the judgment is repeated and the number of judgments is accumulated again.
[0055] From the above description, it can be seen that as long as an abnormality occurs once, the number of judgments needs to be accumulated again to ensure stability.
[0056] Furthermore, step S2 is specifically as follows:
[0057] Determine whether the power supply of the electric erasable programmable read-only memory of the electric meter is normal. If so, judge again after a third preset time delay and accumulate the number of judgments. When the number of judgments reaches the third preset threshold, the power supply of the electric erasable programmable read-only memory of the electric meter is normal, and proceed to step S3.
[0058] It can be seen from the above description that, through the above multiple delay judgments, it is possible to ensure that the power supply of the electrically erasable programmable read-only memory of the electric meter is normal and stable.
[0059] Furthermore, step S3 is specifically as follows:
[0060] Determine whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter are normal. If so, enter step S4; if not, delay for a fourth preset time and judge again and accumulate the number of judgments. When the number of judgments reaches a fourth preset threshold, the reading and writing of the electrically erasable programmable read-only memory of the electric meter are both abnormal, then the electrically erasable programmable read-only memory is determined to be abnormal and the relevant flag is recorded.
[0061] From the above description, it can be seen that through the above multiple delay judgments, it can ensure that the reading and writing of the electric meter's electrically erasable programmable read-only memory are normal and stable. When an abnormality occurs, it is determined as an abnormality and the relevant flag is recorded to facilitate data extraction.
[0062] Furthermore, after step S4, the following steps are further included:
[0063] During the operation of the electric meter, it is periodically determined whether the calibration data in the random access memory is consistent with the first calibration data;
[0064] If yes, clear the calibration data error flag;
[0065] If not, determining whether the calibration data in the random access memory is consistent with the second calibration data;
[0066] If yes, after writing the second calibration data into the random access memory and replacing the first calibration data, clear the calibration data error flag;
[0067] If not, determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory and clear the calibration data error flag; if not, record the calibration data error flag.
[0068] From the above description, it can be seen that the calibration data is backed up multiple times. In addition to downloading the calibration data from the EEPROM to the RAM after power-on, the calibration data in the EEPROM is also regularly compared with the calibration data in the RAM. When a certain data is abnormal, it will be updated to normal data in time. When all three data are abnormal, the calibration data error flag is recorded, and a copy of the experience calibration data is downloaded to the ROM, which ensures that the meter is still operating normally.
[0069] Furthermore, after step S4, the following steps are further included:
[0070] When the electric meter is in operation, a power pulse is detected and it is determined whether the power exceeds a first power threshold. If so, the power is written into a first electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a first operating threshold. If so, the power is written into a second electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a second operating threshold. If so, the power is written into a third electrically erasable programmable read-only memory.
[0071] From the above description, it can be seen that through the above method, quantitative storage and timed storage of electric energy are achieved, ensuring that the electric energy data that can be restored after a failure of the electric meter is as accurate as possible.
[0072] See also Figure 2 As shown, a highly secure electric meter self-checking system provided by the present invention includes a processor 1 and a memory 2, wherein the memory 2 stores a program or instruction, and when the program or instruction is executed by the processor 1, the following steps are implemented:
[0073] S1. When starting the electric meter, determine whether the power supply to the electric meter is normal. If so, proceed to step S2;
[0074] S2, determining whether the power supply of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S3;
[0075] S3, judging whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S4;
[0076] S4. Read the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter, and determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory. If not, determine again after a first preset time interval. When the number of determinations reaches a first preset threshold, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded.
[0077] From the above description, it can be seen that the present invention has the following beneficial effects:
[0078] The present invention provides a highly secure electric meter self-checking system. When starting the electric meter, it is determined whether the power supply to the electric meter is normal. If so, it is determined whether the power supply of the electric meter's electrically erasable programmable read-only memory is normal. If so, it is determined whether the reading and writing of the electric meter's electrically erasable programmable read-only memory are normal. If so, the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter are read, and it is determined whether the first calibration data are consistent with the second calibration data. If so, the first calibration data or the second calibration data is written into a random access memory. If not, it is determined again at an interval of a first preset time length. When the number of determinations reaches a first preset threshold value, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded. In the above manner, self-checking is achieved when the electric meter is started, ensuring that the electric meter works continuously and stably, thereby achieving a highly secure purpose.
[0079] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented:
[0080] When the electric meter is started, it is determined whether the power supply to the electric meter is normal. If so, it is determined again after a delay of a second preset time and the number of determinations is accumulated. When the number of determinations reaches a second preset threshold, the power supply to the electric meter is normal, and step S2 is performed.
[0081] It can be seen from the above description that through the above multiple delay judgments, it can be ensured that the power supply to the electric meter is normal and stable.
[0082] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented:
[0083] Determine whether the power supply of the electric erasable programmable read-only memory of the electric meter is normal. If so, judge again after a third preset time delay and accumulate the number of judgments. When the number of judgments reaches the third preset threshold, the power supply of the electric erasable programmable read-only memory of the electric meter is normal, and proceed to step S3.
[0084] It can be seen from the above description that, through the above multiple delay judgments, it is possible to ensure that the power supply of the electrically erasable programmable read-only memory of the electric meter is normal and stable.
[0085] Several preferred embodiments or application examples are listed below to help those skilled in the art better understand the technical content of the present invention and the technical contribution made by the present invention relative to the prior art:
[0086] Preferred embodiment one:
[0087] like Figure 1 As shown, the present invention provides a highly safe electric meter self-test method, comprising the following steps:
[0088] S1. When starting the electric meter, determine whether the power supply to the electric meter is normal. If so, proceed to step S2;
[0089] Step S1 is specifically as follows:
[0090] When the electric meter is started, it is determined whether the power supply to the electric meter is normal. If so, it is determined again after a second preset time delay and the number of determinations is accumulated. When the number of determinations reaches the second preset threshold, the power supply to the electric meter is normal, and step S2 is performed. The second preset time is 50ms, and the second preset threshold is 3 times. The above parameters can be set according to actual needs.
[0091] If the power supply to the electric meter is abnormal, the second preset time will be delayed and the judgment will be re-accumulated. As long as there is an abnormality once, the judgment will be re-accumulated, so as to achieve the effect of ensuring stability.
[0092] S2, determining whether the power supply of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S3;
[0093] Step S2 is specifically as follows:
[0094] Determine whether the power supply of the electric erasable programmable read-only memory of the electric meter is normal. If so, judge again after a third preset time delay and accumulate the number of judgments. When the number of judgments reaches the third preset threshold, the power supply of the electric erasable programmable read-only memory of the electric meter is normal, and proceed to step S3.
[0095] S3, judging whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S4;
[0096] Step S3 is specifically as follows:
[0097] Determine whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter are normal. If so, enter step S4; if not, delay for a fourth preset time and judge again and accumulate the number of judgments. When the number of judgments reaches a fourth preset threshold, the reading and writing of the electrically erasable programmable read-only memory of the electric meter are both abnormal, then the electrically erasable programmable read-only memory is determined to be abnormal and the relevant flag is recorded.
[0098] In the above embodiment, in order to reduce the impact of external abnormal environment on the electrically erasable programmable read-only memory (EEPROM), it is necessary to read multiple times in time. If effective reading and writing are still not possible after multiple delayed readings, it is determined that the EEPROM is damaged and the relevant flag is set in the program. In the specific operation process, it is read once at an interval of 50ms, and three consecutive readings are one cycle. When the EEPROM cannot be effectively read within three cycles, it is determined that the EEPROM is abnormal and the relevant flag is set.
[0099] S4. Read the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter, and determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory. If not, determine again after a first preset time interval. When the number of determinations reaches a first preset threshold, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded.
[0100] In this embodiment, the calibration data is very important, which directly determines whether the meter is measuring accurately and working properly. The meter data is triple-backed up, one copy of the data is backed up in RAM, and the other two copies of the data are backed up in EEPROM. The three copies of calibration data are compared regularly. Once a copy of the calibration data is found to be abnormal, the data needs to be restored in time. If all three copies of the data are abnormal, a sign of the meter abnormality is given. The details are as follows:
[0101] After step S4, the following steps are also included:
[0102] During the operation of the electric meter, it is periodically determined whether the calibration data in the random access memory is consistent with the first calibration data;
[0103] If yes, clear the calibration data error flag;
[0104] If not, determining whether the calibration data in the random access memory is consistent with the second calibration data;
[0105] If yes, after writing the second calibration data into the random access memory and replacing the first calibration data, clear the calibration data error flag;
[0106] If not, determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory and clear the calibration data error flag; if not, record the calibration data error flag.
[0107] From the above description, it can be seen that the calibration data is backed up multiple times. In addition to downloading the calibration data from the EEPROM to the RAM after power-on, the calibration data in the EEPROM is also regularly compared with the calibration data in the RAM. When a certain data is abnormal, it will be updated to normal data in time. When all three data are abnormal, the calibration data error flag is recorded, and a copy of the experience calibration data is downloaded to the ROM, which ensures that the meter is still operating normally.
[0108] It should be noted that the read-only memory (ROM) backup of the data, once the meter has an irrecoverable abnormality, the meter needs to accurately judge and obtain a copy of the empirical calibration data from the ROM. Although this data will reduce the accuracy by one level, it can ensure the normal operation of the meter.
[0109] After step S4, the following steps are also included:
[0110] When the electric meter is in operation, a power pulse is detected and it is determined whether the power exceeds a first power threshold. If so, the power is written into a first electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a first operating threshold. If so, the power is written into a second electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a second operating threshold. If so, the power is written into a third electrically erasable programmable read-only memory.
[0111] Through the above method, quantitative storage and timed storage of electric energy are achieved, ensuring that the electric energy data that can be restored after a meter failure is as accurate as possible.
[0112] In this embodiment, quantitative storage is performed, i.e., the electric quantity of the direct-flow meter is stored in the EEPROM once for every 0.01 kWh increase, and the electric quantity of the transformer meter is stored in the EEPROM once for every 0.1 kWh increase. Timing storage is performed, i.e., the electric quantity is stored every 1 second to ensure the effective preservation of the electric quantity during power outages, and the electric quantity is stored again every 10 seconds to compare with the electric quantity stored in 1 second, and whether there is a serious metering error is determined according to the change amount.
[0113] During the production process of the electric meter, when the calibration step is omitted, it can be detected by judging the characteristic bit, specifically:
[0114] The calibration process is generally divided into voltage calibration, current calibration, Imax resistive power calibration, Ib 0.5L power calibration, Imin resistive power calibration, creep test, start-up test, and constant test. The corresponding characteristic bits are shown in Table 1 below:
[0115]
[0116] Table 1
[0117] If all steps are executed during the calibration process, the characteristic bit will display binary 11111111. If some steps are missed, the corresponding execution bit will be 0. Therefore, it is very convenient to determine whether the calibration process is completed normally.
[0118] When an abnormal phenomenon occurs during field application, the power environment parameters at that time are recorded through the status word, specifically:
[0119] In actual application of the electric meter, when abnormal voltage measurement, current measurement, power measurement, frequency measurement, electric energy pulse, or electric energy measurement occurs, it is necessary to count the voltage, current, power, frequency, pulse constant, electric energy, and EEPRMOM status at that time. If it is a transformer electric meter, the CT ratio at that time must also be counted, as shown in Table 2.
[0120] Serial number Data content Status word Serial number Data content Status word 1 Voltage 00000001 5 Pulse constant 00010000 2 Current 00000010 6 Electricity 00100000 3 power 00000100 7 EEPROM Status 01000000 4 frequency 00001000 8 CT ratio 10000000
[0121] Table 2
[0122] When the meter is returned for inspection or repair, these data contents can be used to determine the current status, find out the power environment parameters remembered by the meter and the relevant hardware status of the meter itself, and facilitate the search for abnormalities.
[0123] After the implementation of the above safety methods, the operation of the meter can be made safer and more stable. No matter how much interference the external power supply is subjected to during the operation of the meter, as long as the external power supply can return to normal, the meter will still work normally. When the EEPROM memory reads abnormally during the operation of the meter, it will not wait for reading all the time, but use the delay mechanism and marking characteristics to continue working, waiting for the EEPROM to return to normal and continue reading. Multiple backups of calibration data, in addition to downloading the calibration data from the EEPROM to the RAM after power-on, the calibration data in the EEPROM is also regularly compared with the calibration data in the RAM. When a certain data is abnormal, it will be updated to the normal data in time. When all three data are abnormal, the corresponding flag is set, and a copy of the experience calibration data is downloaded from the ROM at the same time. This data ensures that the meter is still operating normally. Quantitative storage of electric energy, the storage resolution of the direct meter in the EEPROM is 0.01kWh, and the storage resolution of the transformer meter in the EEPROM is 0.1kWh. The electric energy is also stored regularly. The storage resolution of the EEPROM is 1s. Every 10s, a separate area is opened from the EEPROM to store the electric energy, ensuring that the electric energy data that can be restored after the meter fails is as accurate as possible. In the production process, in order to avoid calibration omissions or abnormal introductions caused by human or mechanical failures, the meter has very clear feature words for recording, which is convenient for problem tracing. In actual operation, when the meter has various faults, it can measure various power consumption parameters at the time of the fault, which is convenient for fault analysis and problem reproduction during maintenance.
[0124] Preferred embodiment 2:
[0125] See also Figure 2 As shown, a highly secure electric meter self-checking system provided by the present invention includes a processor 1 and a memory 2, wherein the memory 2 stores a program or instruction, and when the program or instruction is executed by the processor 1, the following steps are implemented:
[0126] S1. When starting the electric meter, determine whether the power supply to the electric meter is normal. If so, proceed to step S2;
[0127] S2, determining whether the power supply of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S3;
[0128] S3, judging whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S4;
[0129] S4. Read the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter, and determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory. If not, determine again after a first preset time interval. When the number of determinations reaches a first preset threshold, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded.
[0130] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented:
[0131] When the electric meter is started, it is determined whether the power supply to the electric meter is normal. If so, it is determined again after a delay of a second preset time and the number of determinations is accumulated. When the number of determinations reaches a second preset threshold, the power supply to the electric meter is normal, and step S2 is performed.
[0132] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented:
[0133] If the power supply to the electric meter is abnormal, the second preset time period is delayed and the judgment is repeated and the number of judgments is accumulated again.
[0134] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented:
[0135] Determine whether the power supply of the electric erasable programmable read-only memory of the electric meter is normal. If so, judge again after a third preset time delay and accumulate the number of judgments. When the number of judgments reaches the third preset threshold, the power supply of the electric erasable programmable read-only memory of the electric meter is normal, and proceed to step S3.
[0136] Furthermore, when the program or instruction is executed by the processor, the following steps are specifically implemented:
[0137] Determine whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter are normal. If so, enter step S4; if not, delay for a fourth preset time and judge again and accumulate the number of judgments. When the number of judgments reaches a fourth preset threshold, the reading and writing of the electrically erasable programmable read-only memory of the electric meter are both abnormal, then the electrically erasable programmable read-only memory is determined to be abnormal and the relevant flag is recorded.
[0138] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented:
[0139] During the operation of the electric meter, it is periodically determined whether the calibration data in the random access memory is consistent with the first calibration data;
[0140] If yes, clear the calibration data error flag;
[0141] If not, determining whether the calibration data in the random access memory is consistent with the second calibration data;
[0142] If yes, after writing the second calibration data into the random access memory and replacing the first calibration data, clear the calibration data error flag;
[0143] If not, determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory and clear the calibration data error flag; if not, record the calibration data error flag.
[0144] Furthermore, when the program or instruction is executed by the processor, the following steps are also implemented:
[0145] When the electric meter is in operation, a power pulse is detected and it is determined whether the power exceeds a first power threshold. If so, the power is written into a first electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a first operating threshold. If so, the power is written into a second electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a second operating threshold. If so, the power is written into a third electrically erasable programmable read-only memory.
[0146] The present invention has been described by the above-mentioned relevant embodiments and drawings, but the above-mentioned embodiments are only examples for implementing the present invention. It must be pointed out that the disclosed embodiments do not limit the scope of the present invention. On the contrary, modifications and equivalent settings included in the spirit and scope of the claims are all included in the scope of the present invention.
Claims
1. A highly safe self-test method for an electric meter, characterized in that: The following steps are involved: S1. When starting the electric meter, determine whether the power supply to the electric meter is normal. If so, proceed to step S2; S2, determining whether the power supply of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S3; S3, judging whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S4; S4. Read the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter, and determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory. If not, determine again after a first preset time interval. When the number of determinations reaches a first preset threshold, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded.
2. A highly safe self-test method for electric meter according to claim 1, characterized in that: Step S1 is specifically as follows: When the electric meter is started, it is determined whether the power supply to the electric meter is normal. If so, it is determined again after a delay of a second preset time and the number of determinations is accumulated. When the number of determinations reaches a second preset threshold, the power supply to the electric meter is normal, and step S2 is performed.
3. A highly safe self-checking method for electric meter according to claim 2, characterized in that: Step S1 also includes: If the power supply to the electric meter is abnormal, the second preset time period is delayed and the judgment is repeated and the number of judgments is accumulated again.
4. A highly safe self-checking method for electric meter according to claim 1, characterized in that: Step S2 is specifically as follows: Determine whether the power supply of the electric erasable programmable read-only memory of the electric meter is normal. If so, judge again after a third preset time delay and accumulate the number of judgments. When the number of judgments reaches the third preset threshold, the power supply of the electric erasable programmable read-only memory of the electric meter is normal, and proceed to step S3.
5. A highly safe self-checking method for electric meter according to claim 1, characterized in that: Step S3 is specifically as follows: Determine whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter are normal. If so, enter step S4; if not, delay for a fourth preset time and judge again and accumulate the number of judgments. When the number of judgments reaches a fourth preset threshold, the reading and writing of the electrically erasable programmable read-only memory of the electric meter are both abnormal, then the electrically erasable programmable read-only memory is determined to be abnormal and the relevant flag is recorded.
6. A highly safe self-checking method for electric meter according to claim 1, characterized in that: After step S4, the following steps are also included: During the operation of the electric meter, it is periodically determined whether the calibration data in the random access memory is consistent with the first calibration data; If yes, clear the calibration data error flag; If not, determining whether the calibration data in the random access memory is consistent with the second calibration data; If yes, after writing the second calibration data into the random access memory and replacing the first calibration data, clear the calibration data error flag; If not, determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory and clear the calibration data error flag; if not, record the calibration data error flag.
7. A highly safe self-test method for electric meter according to claim 1, characterized in that: After step S4, the following steps are also included: When the electric meter is in operation, a power pulse is detected and it is determined whether the power exceeds a first power threshold. If so, the power is written into a first electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a first operating threshold. If so, the power is written into a second electrically erasable programmable read-only memory. It is determined whether the operating time of the electric meter reaches a second operating threshold. If so, the power is written into a third electrically erasable programmable read-only memory.
8. A highly secure electric meter self-checking system, characterized in that: The system comprises a processor and a memory, wherein the memory stores a program or an instruction, and when the program or the instruction is executed by the processor, the following steps are implemented: S1. When starting the electric meter, determine whether the power supply to the electric meter is normal. If so, proceed to step S2; S2, determining whether the power supply of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S3; S3, judging whether the reading and writing of the electrically erasable programmable read-only memory of the electric meter is normal, if so, proceeding to step S4; S4. Read the first calibration data and the second calibration data pre-stored in the electrically erasable programmable read-only memory of the electric meter, and determine whether the first calibration data is consistent with the second calibration data. If so, write the first calibration data or the second calibration data into the random access memory. If not, determine again after a first preset time interval. When the number of determinations reaches a first preset threshold, and the first calibration data is still inconsistent with the second calibration data, a calibration data error flag is recorded.
9. A highly secure electric meter self-checking system according to claim 8, characterized in that: When the program or instruction is executed by the processor, the following steps are specifically implemented: When the electric meter is started, it is determined whether the power supply to the electric meter is normal. If so, it is determined again after a delay of a second preset time and the number of determinations is accumulated. When the number of determinations reaches a second preset threshold, the power supply to the electric meter is normal, and step S2 is performed.
10. A highly secure electric meter self-checking system according to claim 8, characterized in that: When the program or instruction is executed by the processor, the following steps are specifically implemented: Determine whether the power supply of the electric erasable programmable read-only memory of the electric meter is normal. If so, judge again after a third preset time delay and accumulate the number of judgments. When the number of judgments reaches the third preset threshold, the power supply of the electric erasable programmable read-only memory of the electric meter is normal, and proceed to step S3.