CN102426347A - 避免因电能表动态自检而发生错误的方法 - Google Patents

避免因电能表动态自检而发生错误的方法 Download PDF

Info

Publication number
CN102426347A
CN102426347A CN2011103372036A CN201110337203A CN102426347A CN 102426347 A CN102426347 A CN 102426347A CN 2011103372036 A CN2011103372036 A CN 2011103372036A CN 201110337203 A CN201110337203 A CN 201110337203A CN 102426347 A CN102426347 A CN 102426347A
Authority
CN
China
Prior art keywords
checking
dynamic self
interrupt
electric energy
energy meter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011103372036A
Other languages
English (en)
Other versions
CN102426347B (zh
Inventor
郑坚江
周忠祥
何昂
胡宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Sanxing Smart Electric Co Ltd
Original Assignee
Ningbo Sanxing Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Sanxing Electric Co Ltd filed Critical Ningbo Sanxing Electric Co Ltd
Priority to CN 201110337203 priority Critical patent/CN102426347B/zh
Publication of CN102426347A publication Critical patent/CN102426347A/zh
Application granted granted Critical
Publication of CN102426347B publication Critical patent/CN102426347B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Current Or Voltage (AREA)

Abstract

本发明公开了一种避免因电能表动态自检而发生错误的方法,它包括以下步骤:1)每次开始动态自检时,先在中断服务程序中设一个动态自检标志,动态自检结束后,把中断服务程序中的动态自检标志去除;2)检测中断,有中断出现,中断服务程序开始运行;3)查询中断服务程序中是否有动态自检标志;4)将内存中的动态自检数据缓存;5)恢复电能表内存数据为动态自检前数据;6)处理中断;7)查询中断服务程序中是否有动态自检标志;8)将缓存的动态自检数据恢复至内存中;9)结束。通过查询动态自检标志是否存在,可以有效的防止中断程序读取到电能表动态自检时改写的内存数据,防止错误发生。

Description

避免因电能表动态自检而发生错误的方法
技术领域
本发明涉及电能表领域,特别涉及一种避免因电能表动态自检而发生错误的方法。
背景技术
电能表的动态自检是指系统正常运行时的自检工作,可以定在某一固定时刻进行,一般只进行关键核心部分的器件的自检,如单片机内部、外部RAM等。
进行动态自检会带来一定的风险,因为在进行动态自检时,内存的数据会被改写,如果此时有中断发生,这些被改写的数据就可能被中断程序读取,造成意想不到的错误。
发明内容
本发明所要解决的技术问题是:提供一种避免因中断程序读取到电能表动态自检时改写的内存数据而发生错误的避免因电能表动态自检而发生错误的方法。
本发明解决上述问题所采用的技术方案为:一种避免因电能表动态自检而发生错误的方法,它包括以下步骤:
1)、每次开始动态自检时,先在中断服务程序中设一个动态自检标志,动态自检结束后,把中断服务程序中的动态自检标志去除;
2)、检测中断,有中断出现,中断服务程序开始运行;
3)、查询中断服务程序中是否有动态自检标志,若是,则执行步骤(4);若不是,则跳到步骤(6);
4)、将内存中的动态自检数据缓存;
5)、恢复电能表内存数据为动态自检前数据;
6)、处理中断;
7)、中断处理完毕,查询中断服务程序中是否有动态自检标志,若是,则执行步骤(8);若不是,则跳到步骤(9);
8)、将缓存的动态自检数据恢复至内存中;
9)、结束。
与现有技术相比,本发明的优点在于:通过查询动态自检标志是否存在,可以有效的防止中断程序读取到电能表动态自检时改写的内存数据,防止错误发生。
附图说明
图为本发明电能表中避免因动态自检而发生错误的方法中中断出现后的处理流程图。
具体实施方式
为便于说明本发明的处理方法,下面结合附图,对本发明电能表中避免因动态自检而发生错误的方法做详细说明:
一种避免因电能表动态自检而发生错误的方法,它包括以下步骤:
1)、每次开始动态自检时,先在中断服务程序中设一个动态自检标志,动态自检结束后,把中断服务程序中的动态自检标志去除;
2)、检测中断,有中断出现,中断服务程序开始运行;
3)、查询中断服务程序中是否有动态自检标志,若是,则执行步骤(4);若不是,则跳到步骤(6);
4)、将内存中的动态自检数据缓存;
5)、恢复电能表内存数据为动态自检前数据;
6)、处理中断;
7)、中断处理完毕,查询中断服务程序中是否有动态自检标志,若是,则执行步骤(8);若不是,则跳到步骤(9);
8)、将缓存的动态自检数据恢复至内存中;
9)、结束。
通过上述方法,可以有效的防止中断程序读取到电能表动态自检时改写的内存数据,防止错误发生。

Claims (1)

1.一种避免因电能表动态自检而发生错误的方法,其特征在于:它包括以下步骤:
1)、每次开始动态自检时,先在中断服务程序中设一个动态自检标志,动态自检结束后,把中断服务程序中的动态自检标志去除;
2)、检测中断,有中断出现,中断服务程序开始运行;
3)、查询中断服务程序中是否有动态自检标志,若是,则执行步骤(4);若不是,则跳到步骤(6);
4)、将内存中的动态自检数据缓存;
5)、恢复电能表内存数据为动态自检前数据;
6)、处理中断;
7)、中断处理完毕,查询中断服务程序中是否有动态自检标志,若是,则执行步骤(8);若不是,则跳到步骤(9);
8)、将缓存的动态自检数据恢复至内存中;
9)、结束。
CN 201110337203 2011-10-31 2011-10-31 避免因电能表动态自检而发生错误的方法 Active CN102426347B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110337203 CN102426347B (zh) 2011-10-31 2011-10-31 避免因电能表动态自检而发生错误的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110337203 CN102426347B (zh) 2011-10-31 2011-10-31 避免因电能表动态自检而发生错误的方法

Publications (2)

Publication Number Publication Date
CN102426347A true CN102426347A (zh) 2012-04-25
CN102426347B CN102426347B (zh) 2013-09-11

Family

ID=45960352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110337203 Active CN102426347B (zh) 2011-10-31 2011-10-31 避免因电能表动态自检而发生错误的方法

Country Status (1)

Country Link
CN (1) CN102426347B (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5347649A (en) * 1989-05-12 1994-09-13 International Business Machines Corp. System for dynamically generating, correlating and reading multiprocessing trace data in a shared memory
US5522035A (en) * 1993-04-22 1996-05-28 Sony Corporation Buffer memory self-diagnosis method for information signal processing apparatus
US20060218387A1 (en) * 2005-03-25 2006-09-28 Xing-Xing Fu System and method for backup and recovery of data stored in a hard disk of a computer
CN101004854A (zh) * 2006-01-16 2007-07-25 上海乐金广电电子有限公司 使用远程信息处理装置的汽车自我检测系统及其方法
CN101441589A (zh) * 2007-11-21 2009-05-27 英业达股份有限公司 基板管理控制器的检测方法及服务器

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5347649A (en) * 1989-05-12 1994-09-13 International Business Machines Corp. System for dynamically generating, correlating and reading multiprocessing trace data in a shared memory
US5522035A (en) * 1993-04-22 1996-05-28 Sony Corporation Buffer memory self-diagnosis method for information signal processing apparatus
US20060218387A1 (en) * 2005-03-25 2006-09-28 Xing-Xing Fu System and method for backup and recovery of data stored in a hard disk of a computer
CN101004854A (zh) * 2006-01-16 2007-07-25 上海乐金广电电子有限公司 使用远程信息处理装置的汽车自我检测系统及其方法
CN101441589A (zh) * 2007-11-21 2009-05-27 英业达股份有限公司 基板管理控制器的检测方法及服务器

Also Published As

Publication number Publication date
CN102426347B (zh) 2013-09-11

Similar Documents

Publication Publication Date Title
CN103034538B (zh) 一种嵌入式操作系统中驱动程序的多级缓存处理方法
CN106910528B (zh) 一种固态硬盘数据巡检的优化方法及装置
CN106682193B (zh) 基于缓存的数据持久化存储方法及装置
CN103092664A (zh) 一种安卓系统的数据文件的处理方法和装置
CN103218275B (zh) 数据错误修复方法、装置和设备
CN107436414B (zh) 一种存储系统中bbu的有效性测试方法和装置
CN102779128A (zh) 一种移动终端中的html5应用程序离线运行的方法及设备
CN102890662B (zh) 通过对usb hid设备进行二次枚举以识别主机操作系统的方法
CN104461925A (zh) 一种存储设备地址对齐的自动纠正方法和装置
CN102521175B (zh) 一种sdram控制器及其工作方法
TWI439925B (zh) 內嵌式系統及其執行緒與緩衝區管理方法
CN104460406B (zh) 单线通信的方法及基于单线通信的单片机固件升级方法
CN105095032A (zh) 一种快速定位故障内存条的检测装置和方法
CN109375870A (zh) 一种加速ssd主控芯片d2h无映射读取的方法及其系统
US20100153622A1 (en) Data Access Controller and Data Accessing Method
CN102426347B (zh) 避免因电能表动态自检而发生错误的方法
CN105487989A (zh) 一种降低响应延时提高系统效率的中断控制器及控制方法
CN102799835B (zh) 插件防再生方法及相应的插件防再生系统
CN102629212A (zh) 一种基于j-link间接烧写程序到nandflash的方法
CN107844395B (zh) 一种reboot测试控制方法及系统
WO2015085891A1 (zh) 一种建立处理器Cache检查点的方法、装置及系统
CN111124959B (zh) 一种NVMe协议管理命令处理的硬件卸载方法
US20100180282A1 (en) Computer system and method for installing driver program in the computer system
CN204407010U (zh) 脱机烧录系统
CN103076995B (zh) NandFlash的数据处理方法及装置

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: 315191 Yinzhou Industrial Park, Zhejiang, Ningbo, Yinzhou District, Ningbo

Patentee after: NINGBO SANXING MEDICAL ELECTRIC CO., LTD.

Address before: 315191 Zhejiang city of Ningbo province Jiangshan town Yinzhou District Mingguang Road No. 1166

Patentee before: Ningbo Sanxing Electric Co., Ltd.

TR01 Transfer of patent right

Effective date of registration: 20210810

Address after: No.16 Fengwan Road, Cicheng Town, Jiangbei District, Ningbo City, Zhejiang Province

Patentee after: NINGBO SANXING SMART ELECTRIC Co.,Ltd.

Address before: 315191 Yinzhou Industrial Park, Ningbo City, Zhejiang Province (Jiangshan Town, Yinzhou District, Ningbo City)

Patentee before: NINGBO SANXING ELECTRIC Co.,Ltd.

TR01 Transfer of patent right