New! View global litigation for patent families

CN100543680C - Method for downloading and updating chip program of electric energy meter - Google Patents

Method for downloading and updating chip program of electric energy meter Download PDF

Info

Publication number
CN100543680C
CN100543680C CN 200710072952 CN200710072952A CN100543680C CN 100543680 C CN100543680 C CN 100543680C CN 200710072952 CN200710072952 CN 200710072952 CN 200710072952 A CN200710072952 A CN 200710072952A CN 100543680 C CN100543680 C CN 100543680C
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
method
downloading
updating
chip
meter
Prior art date
Application number
CN 200710072952
Other languages
Chinese (zh)
Other versions
CN101221506A (en )
Inventor
伟 刘
Original Assignee
深圳市科陆电子科技股份有限公司
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
Grant date

Links

Abstract

本发明涉及一种对电能表芯片程序进行下载更新的方法,在上层软件执行如下步骤:a.上层软件下行广播指令帧1...N;b.上层软件下行问答指令帧N+1,下行上层软件输出CRC16校验结果;c.上层软件下行问答指令帧N+2,读取电能表返回的标志位数据;在电能表执行如下步骤:d.电能表接收到广播指令帧数据后,切换到更新程序状态并进行相应的更新处理;e.接收到上层软件下行的指令帧N+1后,将上层软件的下行CRC16校验结果与电能表内部的CRC16校验结果进行比较处理;f.接收到上层软件下行的指令帧N+2后,电能表向上层软件返回带标志位数据的应答帧。 The present invention relates to a chip meter program means for downloading update software in the upper layer to perform the steps: a top software instructions downlink broadcast frame 1 ... N; b Q upper software instructions downlink frame N + 1, the downlink. CRC16 check result output upper software; C Q upper software instructions downlink frame N + 2, meter reading flag data returned; the meter to perform the steps: d after the broadcast command received meter data frame, the switching to update the program status and the corresponding update processing;. e upper software instructions received downlink frame N + 1, the result of the CRC16 checksum CRC16 upper software downlink check result to the internal process of comparing energy meter; f. receiving an instruction to an upper layer software of downlink frame N + 2, the meter returns the response frame with a flag bit data to the upper layer software. 实施本发明,使得电能表批量化生产过程中电能表芯片程序下载更新,速度更快、可靠性更高。 Embodiment of the present invention, so that the meter mass production process of a chip meter download updates faster, more reliable.

Description

一种对电能表芯片程序进行下载更新的方法 A method of downloading an updated program to the chip meter

技术领域 FIELD

本发明涉及电能表和通讯技术领域,更具体地说,涉及一种对电能表芯片程序进行下载更新的方法。 The present invention relates to a meter and communication technology, and more particularly, relates to a method to download program chip meter updates.

背景技木 Background technology of wood

在电能表生产过程中, 一般存在储备大量的库存品以备急时,库存品中有各种型号产品,产品中芯片程序也各有不同。 Meter in the production process, there is generally a large amount of inventory reserves to prepare for emergency, there are various types of inventory products, also different programs in the chip. 当需要出货时, 一般是从库存品中调出相适应型号的产品,但库存品中产品功能可能不能全面符合市场需求, 这时需要对库存品中的芯片程序进行下载更新,以至满足市场需求。 When you need to ship, usually transferred from inventory in the product compatible models, but inventory in product functionality may not be fully in line with market demand, then the need to inventory the chip program to download updates, as well as to meet market demand. 在批量化生产过程中,特别是在交货时间紧,出货量大时更显得尤为方便重要。 In the mass production process, especially in the tight delivery times, particularly when large shipments more convenient important.

如图1所示,在现有技术中, 一般采用问答式的软件下载更新方案,下载更新的步骤如下: 1, in the prior art, the general formula Q download software updates embodiment, the step of downloading the updated as follows:

51、 上层软件向电能表发送指令帧。 51, the upper frame to the software sends instructions meter. 上层软件下行广播指令帧l...N, N 由芯片程序大小决定,每128字节为一帧。 Software instructions upper downlink broadcast frame l ... N, N is determined by the chip size of the program, one of 128 bytes each.

52、 电能表接收并处理所述指令帧。 52, the power meter receives and processes the command frame. 电能表处理上层软件模块发送来的指令帧l...N,并且对于上层软件发送来的每一指令帧都会返回应答帧。 Meter software instruction processing module is transmitted to the upper frame l ... N, and for each of the upper layer software instructions transmitted frame returns a response frame.

53、 上层软件对电能表返回的应答帧进行处理。 53, the upper layer software meter response frame returned for processing. 也就是说,上层软件模块对于电能表返回的应答帧l...N都会一一处理。 That is, the upper layer software modules to the meter returns the response frame will be 11 l ... N process.

54、 上层软件在对返回的应答帧的处理过程中,对应答帧进行校验,如果处理没有出错,则表示电能表合格,程序下载更新成功;否则表示电能表不合 54, the upper layer software in the process of returning a response frame, the response frame to verify if the processing is not an error, then qualified energy meter, download the update is successful; otherwise substandard meter represents

格,程序下载更新不成功。 Grid, download the update was not successful.

55、 继续下一块电能表芯片程序的下载更新,并循环执行步骤S1。 55, continue to the next one meter chip to download the update program, and loops to step S1. 由此可知,现有技术只能对电能表芯片一次一块地进行更新,速度比较慢, It can be seen, the prior art only one time for the chip meter to be updated more slowly,

浪费时间较多;而且该方案对电能表芯片的下载更新只进行了一次的校验,该校验很难保证100%下载更新数据包的完整性和安全性,这样也会造成数据下 More waste of time; and the downloaded program is updated only meter chip once the Check, which is difficult to ensure a 100% download the update packet integrity and security, it will also result in the data

载更新不成功。 Upload update unsuccessful. 发明内容 SUMMARY

针对现有技术的上述缺陷,本发明要解决现有技术中对电能表芯片程序进行下载更新的方法中所存在的速度慢,安全性低等问题,提供了一种对电能表芯片程序进行下载更新的方法,以对电能表进行高速,高效、准确的下载更新。 For the above-described drawbacks of the prior art, the present invention is to solve the prior art methods of meter by downloading an updated program chip present in slow, low security problem, there is provided a program for downloading the chip meter method to power meter for high-speed, efficient, accurate download updates.

本发明解决其技术问题所采用的技术方案是:提供一种对电能表芯片程序进行下载更新的方法,在上层软件与电能表之间进行数据传输, 在上层软件执行如下步骤: The present invention solves the technical problem using the technical solution is to: provide an energy meter chip program update method of downloading, data transfer between the meter and the upper layer software, software in the upper layer to perform the steps:

a、 上层软件下行广播指令帧l...N,其中N由电能表的芯片程序大小决定; a, the upper layer software instructions downlink broadcast frame l ... N, wherein N is determined by the size of the chip program energy meter;

b、 上层软件下行问答指令帧N+l,下行上层软件输出循环冗余校验的校验结果,所述CRC16校验结果由所述广播指令帧l...N中的校验和进行循环冗余校验运算所得到; B, the upper layer software instructions Q downlink frame N + l, the upper layer software downlink check result outputting cyclic redundancy check, the check result CRC16 instruction by the broadcast frame l ... N checksum circulates the resulting redundancy check operation;

c、 上层软件下行问答指令帧N+2,读取电能表返回的标志位数据; 在电能表执行如下步骤: c, the upper layer software instructions Q downlink frame N + 2, meter reading flag data returned; the meter to perform the steps:

d、 电能表接收到所述广播指令帧数据后,切换到更新程序状态并进行相应的更新处理; After receiving d, meter data frame to the broadcast command, switching to the update status and the corresponding update processing;

e、 接收到上层软件下行的指令帧N+l后,将上层软件的下行循环冗余校验的校验结果与电能表内部的循环冗余校验的校验结果进行比较处理; e, a downlink receiving an instruction of the upper layer software after frame N + l, the check result of the CRC check result of the internal downlink cyclic redundancy check meter and the upper layer software comparison process;

f、 接收到上层软件下行的指令帧N+2后,电能表向上层软件发送带标志位数据的应答帧。 F, the upper layer software receives the instruction of downlink frame N + 2, the meter software to send to the upper band response frame flag bit data.

在本发明所述的方法中,所述步骤c具体包括: 若所述标志位数据为1,则表示该电能表芯片程序更新不成功; 若所述标志位数据为0,则表示该电能表芯片程序更新成功。 In the method according to the present invention, the step c comprises: if the flag data is 1, it indicates that the update is unsuccessful chip meter; if the flag bit data is 0, it indicates that the power meter chip program update was successful. 在本发明所述的方法中,所述步骤d中,所述相应的更新处理具体包括: dl、置标志位为0; In the method according to the present invention, the step d, the corresponding update process comprises: dl, flag is set to 0;

d2、当收到完整的广播指令帧l...N后,进行校验和运算,并核对所述指令帧是否安全完整; d2, when the broadcast command received full frame after L ... N, checksum calculation, and checks whether the command frame complete safety;

d3、进行电能表程序的更新;若校验或更新过程出现任何非法情况,则置 d3, meter update procedure; if the check or update any illegal case, set

标志位为l,但整个广播过程中不上行任何指令帧。 Flag bit is l, but the whole process does not broadcast any instruction uplink frames.

在本发明所述的方法中,所述步骤e中,所述比较处理具体包括: 若上层软件的下行循环冗余校验的校验结果与电能表内部的循环冗余校 In the method according to the present invention, the step e, the comparison process comprises: if the result of cyclic redundancy check CRC downlink upper layer software inside the meter

验的校验结果相同,则表示所收到的指令帧连续的,且每一帧都是完整的; Same experimental verification result indicates that the received command frames continuously, and each frame is complete;

若上层软件的下行循环冗余校验的校验结果与电能表内部的循环冗余校验的校验结果不同,则表示所收到的数据包为非法,将其标志位置为l。 If the CRC check result of a downlink upper layer software is different from the CRC check result inside the meter, then the received data packet is illegal, its flag is l. 在本发明所述的方法中,所述上层软件与所述电能表之间的数据传输采用 In the method according to the present invention, the data transmission between the upper layer software using the power meter

DL/T645-1997通讯规约。 DL / T645-1997 communication protocol.

在本发明所述的方法中,广播指令帧每一帧数据为128字节,在广播指令帧下行过程中,电能表禁止上行指令帧,并且在芯片程序更新过程中电能表禁止主动上行指令帧。 In the method according to the present invention, a broadcast command frame data of each frame is 128 bytes, a broadcast command in the downlink frame during meter prohibition instruction uplink frame and the chip during update prohibition meter upstream active command frame .

在本发明所述的方法中,所述循环冗余校验采用循环冗余校验16位的校验方法对所有广播指令帧的校验和结果进行校验。 In the method according to the present invention, the cyclic redundancy check using the CRC check method for the 16-bit checksum of all broadcast command checksum result frames.

在本发明所述的方法中,当电能表接收到广播指令帧数据后,进行更新芯片程序;若该更新过程中若出现错误,则将标志位置为1,表示电能表更新程序为不合格。 In the method according to the present invention, when the broadcast command received meter data frame, chip update procedure; if the update process, if an error occurs, then the flag is 1, it indicates the update is failed meter.

在本发明所述的方法中,所述上层软件通过RS232或RS485串口与所述电能表连接。 In the method according to the present invention, the upper layer software is connected to the meter via RS232 or RS485 serial port.

在本发明所述的方法中,所述上层软件与功率源、标准表、误差板之间的数据传输采用内部标准通信协议。 In the method according to the present invention, the data transmission between the power source and the upper layer software, the standard tables, using the internal standard error of the plate protocol.

本发明解决了现有技术中的下载更新系统中的二个主要问题:其一下载更新的效率问题,其二下载更新时数据传输的完整与安全问题。 The invention solves the two main problems of the prior art system to download the update: First download the updated efficiency, integrity and security issues Second download the update data transmission. 从而使得电能表的生产过程效率大大提高,程序下载可靠性更高、安全性更强,数据更完整, 能达到更实用的效果。 So that the production efficiency is greatly improved energy meter, program download higher reliability, enhanced security, data is more complete, more practical effect can be achieved.

附图说明 BRIEF DESCRIPTION

6下面将结合附图及实施例对本发明作进一步说明,附图中: 6 in conjunction with the following drawings and embodiments of the present invention is further illustrated drawings in which:

图1是现有技术的电能表芯片程序的下载更新的流程图; 1 is a flowchart of a program to download chip meter prior art updated;

图2是本发明的电能表芯片程序的下载更新的流程图; FIG 2 is a flowchart of a chip meter download program updates the present invention;

图3是本发明的多个电能表芯片程序的下载更新的结构示意图; FIG 3 is a schematic view of a plurality of download the update program chips meter of the present invention;

图4是图3的多个电能表芯片程序的下载更新的流程图。 FIG 4 is a flowchart of FIG download the updated plurality of chips program meter 3.

具体实施方式 detailed description

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。 To make the objectives, technical solutions and advantages of the present invention will become more apparent hereinafter in conjunction with the accompanying drawings and embodiments of the present invention will be further described in detail. 应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。 It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention.

如图2所示, 一种对电能表芯片程序进行下载更新的方法,其中, 对于任一个需要更新芯片程序的电能表,上层软件按以下步骤向电能表发送指令帧数据: As shown, A method of downloading an updated program to the chip energy meter 2, wherein, for any one chip to update the program meter, the upper layer software sends instructions to the meter data frame by the steps of:

a、 上层软件下行广播指令帧1…N, N由芯片程序大小决定,每128字节为一帧,每帧按DL/T645-1997《多功能电能表通信规约》帧格式下行。 a, the upper layer software instructions downlink broadcast frame 1 ... N, N is determined by the chip size of the program, one of 128 bytes each, each frame format of a downlink frame by DL / T645-1997 "multifunction meter communication protocol."

b、 上层软件下行问答指令帧N+l ,下行上层软件输出循环冗余校验(Cyclic Redundancy Check/Code,简称CRC)的校验结果,本发明优选实施例中循环冗余校验采用的是循环冗余校验16位的校验方法,即CRC16,该CRC16校验结果由广播指令帧l...N中的校验和进行CRC16校验运算所得出。 B, the upper layer software instructions Q downlink frame N + l, the upper layer software outputs downlink CRC (Cyclic Redundancy Check / Code, abbreviated CRC) check result, the preferred embodiment of the invention uses a cyclic redundancy check 16-bit cyclic redundancy check verification method, i.e. CRC16, the CRC16 check result by the broadcast command frame l ... N in the checksum CRC16 checksum calculation derived.

c、 上层软件下行问答指令帧N+2,读取电能表标志位数据,如果标识位为1,表示电能表不合格,程序下载更新不成功;否则表示电能表合格,程序下载更新成功。 C, the upper layer software instructions Q downlink frame N + 2, meter reading data flag, if the flag is 1, represents a power meter failed, download the update is unsuccessful; indicates otherwise qualified energy meter, download updated successfully.

对于电能表,则按以下步骤接收并处理由上层软件发来的指令帧: For meter, proceed as follows to upper layer software receives the instruction and processes frames sent:

d、 电能表切换到更新程序状态,并置标志位为0;当收到完整的广播指令帧l...N后,进行校验和运算,并核对所述指令帧是否安全完整;然后再进行电能表程序的更新。 Switching d, meter to update status flag set to 0 and is set; when the broadcast command receiving a complete frame l ... N, the checksum calculation, and checks whether the command frame complete safety; then meter program update. 如果校验或更新过程出现任何非法情况,则置标志位为l, 但整个广播过程中不上行任何指令帧。 If the check or update any illegal case, the L flag is set, but the whole process does not broadcast any instruction uplink frames.

e、 接收到上层软件下行的指令帧N+1后,将上层软件的下行CRC16校验结果与电能表内部的CRC16校验结果进行比较,如果两者相同,则表示所收到的指令帧连续的,且每一帧都是完整的。 E, an upper layer software receives the instruction of downlink frame N + 1, the upper layer software downlink CRC16 checksum CRC16 checksum results were compared with the results of the inside of the meter, and if identical, then the received frame sequential instruction , and each frame is complete. 否则表示所收到的数据包为非法,将其标志位置为1。 Otherwise, it indicates the received packet is illegal, its flag to 1.

f、接收到上层软件下行的指令帧N+2后,电能表作出应答,向上层软件 F, the upper layer software receives the instruction of downlink frame N + 2, the power meter respond to the upper layer software

返回带标志位数据的应答帧。 Returns a response frame with a flag bit data.

本发明所述电能表芯片程序下载的方法采用广播指令下载数据,利用校 The present invention is a chip meter using a program download command to download data broadcast, using the correction

验、再校验以及CRC16校验对数据的完整安全提供了保障。 Inspection, checking and re-checking CRC16 for complete safety data provide a guarantee.

图3示出了多个电能表芯片程序的下载更新的结构示意图,下载更新软件 FIG. 3 shows a schematic structure of a plurality of energy meter chip program download updates, downloads update software

通过PC机串口与机柜中的通讯控制器(如CL2011通讯控制器)相连,通过通 Through the PC serial communication with the enclosure controller (such as CL2011 Communications Controller) is connected, through a through

讯控制器控制功率源(如CL303功率源)、标准表(如CL311V2标准表)、被 The controller controls the power source information (e.g., power source CL303), standard table (e.g. CL311V2 standard table) is

校电能通信(即图3中的精密时基源,如CL191精密时基源),通讯控制器与 Communication power correction (i.e., precision timebase source of FIG. 3, such as the CL191 precision timebase source), the communication controller

功率源、标准表共同遵循内部标准通信协议(如CLT1.0通信协议),并与被校 Power source, to follow the common standard table internal standard communication protocols (e.g. CLT1.0 communication protocol), and is corrected with

表通信协议遵循多功能电能表通信规约DL/T645-1997 。 Table communications protocol follows multifunction meter communication protocol DL / T645-1997.

本发明优选实施例中的挂表架上设置了两排电能表,共12块,也就是说 Preferred embodiments of the invention the hanging frame are provided two rows of Table meter, a total of 12, that is to say

12块电能表芯片程序可以同时进行下载更新,通信控制器分别通过误差计算器(如CL188E误差计算器)与挂表架中的每个电能表进行通信。 12 meter chip program may be downloaded update, the controllers are in communication by an error calculator (e.g., an error calculator CL188E) linked with the table frame for each meter.

如图4所示,根据上述电能表芯片程序下载更新的步骤,具体如下: 步骤l: PC机通过串口与功率源、标准表、通讯控制器以及挂表架进行连 4, the above-described download the updated meter chip procedural steps as follows: Step l: PC power source through a serial port, standard table, the communication controller, and the table frame for hanging even

接,即PC机中的下载更新软件通过PC机串口对功率源、标准表、误差计算器(如CL188E误差计算器)发出连机指令。 Access, i.e., the PC download updated software issues a command to the power supply unit is connected, standard table error calculator (e.g., an error calculator CL188E) through the PC serial port.

步骤2:连机指令成功后,根据被校的电压电流等基本信息,对功率源发 Step 2: even after a successful machine instruction, the correction information is based on the basic current, voltage, power originating

出升源指令,并输出与被校表相适应的功率。 Or source of the command, and outputs the correction power adaptation appearances.

等功率源稳定后,对所有被校表广播指令进入下载更新状态,此时所有被 After a stable power supply, etc., to download the update status of all calibration broadcast command, all this time

校表会呜响(可以设置为鸣响三声),液晶显示进入更新初始状态,所有被校表 Correction table is ringing (ringing can be set to three times), updating the initial state into the liquid crystal display, all calibration

标志位置为0。 Flag set to 0.

步骤3:下载更新程序对需要电能表芯片程序长度进行分块处理,本发明的实施例将需要下载的程序分隔为N帧,即N=Len/128帧,每帧为128字节,最后一帧不足补"0",通过广播指令每帧间隔500ms下行,广播下行1-N Step 3: download the update program of the chip length table requires energy into blocks, embodiments of the present invention will need to download a program is partitioned into N frames, i.e. N = Len / 128 frames, each of 128 bytes, the last frame up less than "0", by a broadcast command interval 500ms each downlink frame, downlink broadcast 1-N

8帧。 8.

步骤4:所有电表接收到广播数据后,则开始对数据进行处理。 Step 4: All the meter after receiving broadcast data, the data processing is started. 处理结果中若有任何错误,则标志位为l;若没有任何错误,则表示正常,标志位不变。 If any errors in the processing result, the flag bit is L; if there are no errors, then normal flag unchanged. 但在程序广播过程中不返回任何上行帧。 But it does not return any upstream frame is broadcast during the program.

步骤5:广播下行N+1帧,该帧为CRC16校验帧结果的数据帧。 Step 5: N + 1 downlink broadcast frame, which is a result of the CRC16 check frame data frame.

步骤6:所有电表接收到广播CRC校验的结果数据后,与自身校验结果进 Step 6: All the meter after receiving the CRC check result of the data broadcast, with its own check result into

行比对,若不相等,则标志位为1;若相等,则标志位不变。 Line matching, if not equal, the flag bit is 1; if equal, the change flag. 但在程序广播过 But the program aired

程中不返回任何上行帧。 Process does not return any uplink frame.

步骤7:广播下行N+2帧,并读取每块被校表标的标志位数据。 Step 7: N + 2 broadcast downstream frames and reads each bit data block is the subject of calibration flag.

步骤8:被校表接收到指令后返回带有标志位数据的数据帧。 Step 8: the data frame is returned with the flag data upon receiving an instruction calibration.

步骤9:下载更新程序根据每块被校表的标志位数据判断,标志位为0则 Step 9: The download the update flag of each block is determined calibration data bit, flag bit 0

表示该表合格,否则表示该表为不合格。 The table represents qualified, or that the table is unacceptable.

由此可知,采用本发明的方法可使电能表批量化生产过程中电能表芯片程 This indicates that the method of the present invention enables mass production of energy meters meter chip during process

序下载更新,速度更快、可靠性更高、安全性更强,数据更完整,本发明下载 Program download updates faster, more reliable, more security, more complete data, the present invention downloads

更新一块表时间与12块表时间一样,比现有技术方案的效率提高12倍,从而 A table update time and the same time table 12, increased by 12 times more efficient than the prior art solutions, thus

达到更实用的效果。 Achieve more practical results.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发 The foregoing is only preferred embodiments of the present invention but are not intended to limit the present invention, where in the present

明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明 Any modifications within the spirit and principle of the next, equivalent replacements, improvements, etc., are all included in the present invention,

的保护范围之内。 Within the scope of protection.

Claims (9)

  1. 1、一种对电能表芯片程序进行下载更新的方法,在上层软件与电能表之间进行数据传输,其特征在于,在上层软件执行如下步骤:a、上层软件下行广播指令帧1...N,其中N由电能表的芯片程序大小决定;b、上层软件下行问答指令帧N+1,下行上层软件输出循环冗余校验的校验结果,所述循环冗余校验的校验结果由所述广播指令帧1...N中的校验和进行循环冗余校验运算所得到;c、上层软件下行问答指令帧N+2,读取电能表返回的标志位数据;在电能表执行如下步骤:d、电能表接收到所述广播指令帧数据后,切换到更新程序状态并进行相应的更新处理;e、接收到上层软件下行的指令帧N+1后,将上层软件的下行循环冗余校验的校验结果与电能表内部的循环冗余校验的校验结果进行比较处理;f、接收到上层软件下行的指令帧N+2后,电能表向上层软件发送带标 1, for performing the method of the meter-chip program download updated, data transfer between the upper layer and the meter software, wherein the following steps are performed in an upper layer of software: a, the upper layer software downlink broadcast command frame ... 1 N, where N is determined by the size of the chip program energy meter; B, Q upper software instructions downlink frame N + 1, the upper layer software downlink check result outputting cyclic redundancy check, a cyclic redundancy check check result instruction by the broadcast frame 1 ... N in the cyclic redundancy check and checksum calculation are obtained; c, the upper layer software instructions Q downlink frame N + 2, meter reading flag data returned; electrical energy table perform the steps of: d, meter after receiving the broadcast command frame data, updates to the switching state and the corresponding update processing; E, the upper layer software receives the instruction of downlink frame N + 1, the upper layer of software downlink CRC check result is compared with the check result of processing cyclic redundancy check the inside of the power meter; F, the upper layer software receives the instruction of downlink frame N + 2, with the upper layer transmission meter software mark 位数据的应答帧。 Response frame bit data.
  2. 2、 根据权利要求1所述的对电能表芯片程序进行下载更新的方法,其特征在于,所述步骤c具体包括:若所述标志位数据为1,则表示该电能表芯片程序更新不成功; 若所述标志位数据为0,则表示该电能表芯片程序更新成功。 2. The method of meter program download updated chip according to claim 1, wherein said step c comprises: if the flag data is 1, it indicates that the update is unsuccessful chip meter ; if the flag bit data is 0, it indicates that the program is successfully updated chip meter.
  3. 3、 根据权利要求1或2所述的对电能表芯片程序进行下载更新的方法,其特征在于,所述步骤d中,所述相应的更新处理具体包括:dl、置标志位为0;d2、当收到完整的广播指令帧l...N后,进行校验和运算,并核对所述指令帧是否安全完整;d3、进行电能表程序的更新;若校验或更新过程出现任何非法情况,则置标志位为l,但整个广播过程中不上行任何指令帧。 3, the method of the chip meter to download the update program or according to claim 12, wherein said step (d), the respective update processing comprises: dl, flag is set to 0; d2 when receiving the complete broadcast command frame l ... N, the checksum calculation, and checks whether the safety and integrity of the command frame; D3, the program updates the meter; verify or update process if any illegal case, the L flag is set, but the whole process does not broadcast any instruction uplink frames.
  4. 4、 根据权利要求1或2所述的对电能表芯片程序进行下载更新的方法, 其特征在于,所述步骤e中,所述比较处理具体包括:若上层软件的下行循环冗余校验的校验结果与电能表内部的循环冗余校验的校验结果相同,则表示所收到的指令帧连续的,且每一帧都是完整的;若上层软件的下行循环冗余校验的校验结果与电能表内部的循环冗余校验的校验结果不同,则表示所收到的数据包为非法,将其标志位置为l。 4. The method of meter by downloading an updated program chip of claim 1 or claim 2, wherein said step e, the comparison process comprises: a cyclic redundancy check if a downlink upper layer of software check result is a cyclic redundancy check and the check result of the inside of the power meter, this indicates that the received command frames continuously, and each frame is complete; cyclic redundancy checks if downlink upper layer software check result is a cyclic redundancy check and the check result of the inside of the meter are different, the received data packet is illegal, its flag is l.
  5. 5、 根据权利要求1所述的对电能表芯片程序进行下载更新的方法,其特征在于,所述上层软件与所述电能表之间的数据传输采用DL/T645-1997通讯规约。 5. The method of claim chip meter program download updated according to claim 1, characterized in that the data transfer between the upper layer software of the meter using DL / T645-1997 communication protocol.
  6. 6、 根据权利要求1所述的对电能表芯片程序进行下载更新的方法,其特征在于,广播指令帧每一帧数据为128字节,在广播指令帧下行过程中,电能表禁止上行指令帧,并且在芯片程序更新过程中电能表禁止主动上行指令帧。 6. The method of meter program download updated chip according to claim 1, wherein the broadcast command frame data of each frame is 128 bytes, a broadcast command in the downlink frame during meter prohibition instruction uplink frame and update the chip meter is prohibited during active uplink command frame.
  7. 7、 根据权利要求1所述的方法,其特征在于,所述循环冗余校验采用循环冗余校验16位的校验方法对所有广播指令帧的校验和结果进行校验。 7. The method according to claim 1, wherein the cyclic redundancy check using the CRC checksum result verification method 16 for all broadcast command check frames.
  8. 8、 根据权利要求1所述的对电能表芯片程序进行下载更新的方法,其特征在于,当电能表接收到广播指令帧数据后,进行更新芯片程序;若该更新过程中若出现错误,则将标志位置为l,表示电能表更新程序为不合格。 8. The method of meter program download updated chip according to claim 1, wherein, when the broadcast command received meter data frame is updated chip program; if the update process, if an error occurs, the flag is l, showing meter update as unacceptable.
  9. 9、 根据权利要求1所述的对电能表芯片程序进行下载更新的方法,其特征在于,所述上层软件通过RS232或RS485串口与所述电能表连接。 9. The method of meter program download updated chip according to claim 1, characterized in that the upper layer software via RS232 or RS485 serial port is connected to the meter.
CN 200710072952 2007-01-12 2007-01-12 Method for downloading and updating chip program of electric energy meter CN100543680C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710072952 CN100543680C (en) 2007-01-12 2007-01-12 Method for downloading and updating chip program of electric energy meter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710072952 CN100543680C (en) 2007-01-12 2007-01-12 Method for downloading and updating chip program of electric energy meter

Publications (2)

Publication Number Publication Date
CN101221506A true CN101221506A (en) 2008-07-16
CN100543680C true CN100543680C (en) 2009-09-23

Family

ID=39631366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710072952 CN100543680C (en) 2007-01-12 2007-01-12 Method for downloading and updating chip program of electric energy meter

Country Status (1)

Country Link
CN (1) CN100543680C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102890757B (en) * 2012-09-11 2015-08-05 中国电力科学研究院 A method of alignment meter software and its alignment system
CN102929655A (en) * 2012-09-26 2013-02-13 瑞斯康达科技发展股份有限公司 Method for writing data files into flash memory chip as well as pre-treatment method and device
CN103473088B (en) * 2013-08-30 2018-01-02 北京远特科技股份有限公司 A SCM-line method and system upgrade
CN103677943B (en) * 2013-12-27 2017-08-15 浙江众邦机电科技有限公司 A sewing machine controller software upgrade
CN104503897B (en) * 2014-10-21 2017-07-21 惠州市龙鼎盛电力科技有限公司 Meter software design method can achieve a variety of interactive mode
CN105511912B (en) * 2015-11-28 2017-09-12 惠州市蓝微新源技术有限公司 A program can download method based on bus

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5548527A (en) 1992-02-21 1996-08-20 Abb Power T&D Company Inc. Programmable electrical energy meter utilizing a non-volatile memory
FR2879777A1 (en) 2004-12-17 2006-06-23 Actaris Sas Soc Par Actions Si New application code downloading method for energy meter, involves controlling verification of presence of control information of code in memory, and permitting meter to remain in limited operating mode if information is not in memory

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5548527A (en) 1992-02-21 1996-08-20 Abb Power T&D Company Inc. Programmable electrical energy meter utilizing a non-volatile memory
FR2879777A1 (en) 2004-12-17 2006-06-23 Actaris Sas Soc Par Actions Si New application code downloading method for energy meter, involves controlling verification of presence of control information of code in memory, and permitting meter to remain in limited operating mode if information is not in memory

Also Published As

Publication number Publication date Type
CN101221506A (en) 2008-07-16 application

Similar Documents

Publication Publication Date Title
CN101231320A (en) Undervoltage collection copy system detecting device based on virtual electric energy meter module
CN102314369A (en) Self-upgrade method for equipment in remote online monitoring system
CN101042651A (en) Software updating method and system thereof
CN102609287A (en) Device for updating FPGA (Field Programmable Gate Array) from a long distance by CPU (Central Processing Unit) and method therefor
CN101153900A (en) Calibration method and system for electric energy meter
CN101814036A (en) RF remote upgrading method and system
CN101459339A (en) Power factor compensation controller
CN2906782Y (en) Embedded processor-based automatic remote electricity metering terminal
CN101702639A (en) Check value calculation method and device of cyclic redundancy check
CN101546169A (en) Method and device for calibrating time
CN1808999A (en) Method and apparatus of CPU fault detection for signal processing unit
CN101140809A (en) Flash controller supporting pipelined error-correcting code and configurable operations and control method thereof
CN101807155A (en) Embedded software on-line updating method
CN102724092A (en) Profibus-DP communication protocol redundancy master station
CN102376031A (en) Anti-counterfeiting tracking system using chip to identify articles
CN102231631A (en) Encoding method for Reed-Solomon (RS) encoder and RS encoder
CN101261494A (en) Method and its device for time service based on GPS technology
CN102281203A (en) One kind iec101 protocol message transmission method and system
CN201893971U (en) Light emitting diode (LED) landscape lamp control system based on general packet radio service (GPRS) and data mining extensions (DMX) 512
CN101799677A (en) System and method for remotely controlling household intelligent terminal
CN102255687A (en) Rate matching method and device thereof
CN1976517A (en) Mobile terminal and backup data information method thereof
CN202486606U (en) Adaptive multi-signal-source timing equipment in intelligent power grid and report analysis system
CN103019788A (en) Remote online upgrading method based on CAN (Controller Area Network) bus
CN101867916A (en) Method for realizing air update of vehicle terminal

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted