Movatterモバイル変換


[0]ホーム

URL:


CN102014118B - Method for reading multiple electric energy meters generally - Google Patents

Method for reading multiple electric energy meters generally
Download PDF

Info

Publication number
CN102014118B
CN102014118BCN 201010253884CN201010253884ACN102014118BCN 102014118 BCN102014118 BCN 102014118BCN 201010253884CN201010253884CN 201010253884CN 201010253884 ACN201010253884 ACN 201010253884ACN 102014118 BCN102014118 BCN 102014118B
Authority
CN
China
Prior art keywords
reading
meter
protocol
meter reading
interface
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.)
Active
Application number
CN 201010253884
Other languages
Chinese (zh)
Other versions
CN102014118A (en
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.)
Shenzhen Clou Electronics Co Ltd
Original Assignee
Shenzhen Clou Electronics 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 Shenzhen Clou Electronics Co LtdfiledCriticalShenzhen Clou Electronics Co Ltd
Priority to CN 201010253884priorityCriticalpatent/CN102014118B/en
Publication of CN102014118ApublicationCriticalpatent/CN102014118A/en
Application grantedgrantedCritical
Publication of CN102014118BpublicationCriticalpatent/CN102014118B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

Translated fromChinese

一种实现通用抄读多种电能表的方法,包括以下步骤:A)建立电能表协议库平台,电能表协议库提供统一的参数初始化API接口,统一的物理通道初始化API接口,统一的公共数据项抄读API接口;B)通过统一的参数始化API接口输入统一的抄表参数;C)通过统一物理通道初始化API接口初始化抄表物理通信接口;D)电能表协议库平台自适应不同的电能表协议;E)通过统一的公共数据项抄读API接口抄读电能表协议数据。达到抄表功能模块化,独立,易管理,易移植,易使用,可很方便的在不同的电能量采集功能产品上灵活使用,大大节省了开发资源。

A method for realizing universal reading and reading of multiple electric energy meters, comprising the following steps: A) establishing an electric energy meter protocol library platform, the electric energy meter protocol library provides a unified parameter initialization API interface, a unified physical channel initialization API interface, and a unified public data Item reading API interface; B) Input unified meter reading parameters through the unified parameter initialization API interface; C) Initialize the meter reading physical communication interface through the unified physical channel initialization API interface; D) The energy meter protocol library platform adapts to different Electric energy meter protocol; E) read and read electric energy meter protocol data through a unified public data item reading API interface. The meter reading function is modular, independent, easy to manage, easy to transplant, easy to use, and can be flexibly used on different electric energy collection function products, which greatly saves development resources.

Description

Translated fromChinese
一种实现通用抄读多种电能表的方法A Method for Realizing Universal Reading and Reading of Various Electric Energy Meters

技术领域technical field

本发明涉及电力系统的各电能量采集系统的抄表应用,具体地说,一种电力行业各电能量采集系统中同时兼容抄读多种不同协议类型的电能表时,自适应进行各协议转换抄读的软件方法。The present invention relates to the meter reading application of each electric energy acquisition system of the electric power system, specifically, when each electric energy acquisition system in the electric power industry is compatible with reading electric energy meters of various different protocol types at the same time, each protocol conversion is adaptively performed The software method of copying.

背景技术Background technique

目前在电力行业,对电能表数据的数据抄读,是负控、配变、计量,集抄等集成系统的基本应用需要。由于历史的原因,目前各电能表厂家电能表提供对外的抄表通信规约千差万别且互不兼容。进口电能表通信规约大都份是自行定义或采用IEC1107协议,同一个厂家的不同批次的电表也可能使用多种并不兼容的抄表协议;国产表的通信规约虽然大部分基于DL/T645规约,但很多又都在该规约的基础上增补了部分规约(如分相电能、失压记录、负荷曲线等)。各电量计量及抄表系统又必须要随时兼容抄读这些不同的表计。At present, in the electric power industry, the data reading of electric energy meter data is the basic application requirement of integrated systems such as load control, distribution transformer, metering, and centralized reading. Due to historical reasons, the current meter reading communication protocols provided by various electric energy meter manufacturers vary widely and are not compatible with each other. Most of the communication protocols for imported electric energy meters are defined by themselves or adopt the IEC1107 protocol. Different batches of electric meters of the same manufacturer may also use a variety of incompatible meter reading protocols; although most of the communication protocols for domestic meters are based on the DL/T645 protocol , but many of them have added some regulations (such as phase-separated electric energy, voltage loss records, load curves, etc.) on the basis of the regulations. Each electricity metering and meter reading system must be compatible with reading these different meters at any time.

针对上述情况,各抄表终端厂家在面对不同厂家的不同协议的电表时,有的需要根据不同表计规约的情况随时随地修改软件,还有的需要根据不同的终端应用抄表需求来更改软件,有的将各不同类型的电表协议转成统一的部颁标准645协议以兼容其他不同的电表协议,或是推出专门进行抄表协议转换的硬件产品。前两者情况势必造成软件的反复编码修改,不通用,不兼容,工作大量重复。后两者情况的兼容性相对较强,但是由于部颁645协议本身所定义的数据内容不够全面,且数据格式限制数据精度不高,很难兼容像红相之类的高精度的国外表计。而且若使用抄表协议转换器的硬件产品,增加抄表厂家成本不说,所受的应用局限性更大。In view of the above situation, when the meter reading terminal manufacturers face the meters of different protocols from different manufacturers, some need to modify the software anytime and anywhere according to the situation of different meter regulations, and some need to change according to the meter reading requirements of different terminal applications. Software, some convert different types of meter protocols into a unified ministerial standard 645 protocol to be compatible with other different meter protocols, or launch hardware products dedicated to meter reading protocol conversion. The first two situations will inevitably lead to repeated coding and modification of the software, which is not universal, incompatible, and a lot of work is repeated. The compatibility of the latter two cases is relatively strong, but because the data content defined by the 645 agreement issued by the Ministry is not comprehensive enough, and the data format is limited, the data accuracy is not high, so it is difficult to be compatible with high-precision foreign meters such as Hongxiang. . Moreover, if the hardware product of the meter reading protocol converter is used, the cost of the meter reading manufacturer will be increased, and the application limitations will be even greater.

发明内容Contents of the invention

本发明所要解决的技术问题是提供一种实现通用抄读多种电能表的方法,达到抄表功能模块化,独立,易管理,易移植,易使用,可很方便的在不同的电能量采集功能产品上灵活使用,大大节省了开发资源。The technical problem to be solved by the present invention is to provide a method for universal reading of various electric energy meters, to achieve modularized, independent, easy-to-manage, easy-to-transplant, easy-to-use meter reading functions, and can be conveniently collected in different electric energy Flexible use on functional products greatly saves development resources.

为解决上述技术问题,本发明的技术方案是:一种实现通用抄读多种电能表的方法,包括以下步骤:In order to solve the above-mentioned technical problems, the technical solution of the present invention is: a kind of method that realizes general reading and reading various electric energy meters, comprises the following steps:

A)建立电能表协议库平台,电能表协议库提供统一的参数初始化API接口,统一的物理通道初始化API接口,统一的公共数据项抄读API接口;A) Establish an electric energy meter protocol library platform, the electric energy meter protocol library provides a unified parameter initialization API interface, a unified physical channel initialization API interface, and a unified public data item reading API interface;

B)通过统一的参数始化API接口输入统一的抄表参数;B) input unified meter reading parameters through a unified parameter initialization API interface;

C)通过统一物理通道初始化API接口初始化抄表物理通信接口;C) initialize the meter reading physical communication interface through the unified physical channel initialization API interface;

D)电能表协议库平台自适应不同的电能表协议;D) The energy meter protocol library platform adapts to different energy meter protocols;

E)通过统一的公共数据项抄读API接口抄读电能表协议数据。E) Read the energy meter protocol data through the unified public data item reading API interface.

作为改进,所述步骤A)中,具体包括:As an improvement, in the step A), specifically include:

A1)以抄表基础类以及各抄表协议类代码等相关代码,创建常见软件平台下的标准库编译环境;A1) Create the standard library compilation environment under the common software platform with the relevant codes such as the meter reading basic class and each meter reading protocol class code;

A2)编译生成常见软件平台下的抄读电能表协议标准库文件,如WINDOWS平台、LINUX平台等;A2) Compile and generate standard library files for copying and reading energy meter protocols under common software platforms, such as WINDOWS platform, LINUX platform, etc.;

A3)抄读电能表协议库文件以及相关头文件打成包提供对外使用;A3) Copy the energy meter protocol library file and related header files into a package for external use;

A4)应用者在使用时,将电能表协议转换库及头文件放入应用功能模块代码的相应路径,加入其编译环境一起编译使用。A4) When using the application, put the energy meter protocol conversion library and the header file into the corresponding path of the application function module code, and add it to the compilation environment to compile and use it together.

作为改进,所述步骤B)中,抄表参数包含如下内容:电表协议号,配置文件号,电表地址,抄表用户名,抄表密码,抄表端口号,抄表通信波特率,抄表通信数据位、抄表通信检验位,抄表通信停止位等参数。As an improvement, in the step B), the meter reading parameters include the following: meter protocol number, configuration file number, meter address, meter reading user name, meter reading password, meter reading port number, meter reading communication baud rate, meter reading Meter communication data bit, meter reading communication check bit, meter reading communication stop bit and other parameters.

作为改进,所述步骤C)具体包括:As an improvement, the step C) specifically includes:

C1).根据抄表端口号查找实际对应抄表物理端口;C1). Find the actual corresponding meter reading physical port according to the meter reading port number;

C2).初始化抄表端口的波特率、数据位、检验位、停止位等通信参数。C2). Initialize the communication parameters such as the baud rate, data bits, check bits, and stop bits of the meter reading port.

作为改进,所述步骤D)具体包括:As an improvement, the step D) specifically includes:

D1).电能表协议库的实现架构包含抄表基础类,以及基于抄表基础类派生的各不同协议类型电表的抄表协议类,包括公共的协议初始化接口,公共的抄表物理通道初始化接口,公共的数据项抄读接口;D1). The implementation architecture of the energy meter protocol library includes the basic meter reading class and the meter reading protocol classes of different protocol types derived from the meter reading basic class, including the public protocol initialization interface and the public physical channel initialization interface for meter reading , public data item reading interface;

D2).电能表协议库各抄表协议类对应唯一的电表协议号;D2). Each meter reading protocol class of the electric energy meter protocol library corresponds to a unique electric meter protocol number;

D3).电能表协议库各抄表协议类提供统一形式的初始化接口,但实体的是自身协议的初始化;D3). Each meter reading protocol class of the energy meter protocol library provides a unified initialization interface, but the entity is the initialization of its own protocol;

D4).电能表协议库各抄表协议类提供统一形式的数据项抄读接口,但实体的是自身协议的抄读模式;D4). Each meter reading protocol class of the energy meter protocol library provides a unified form of data item reading interface, but the entity is the reading mode of its own protocol;

D5).电能表协议库各抄表协议类各自按照自身协议的规范,实现抄读该协议电能表的功能流程调度;D5). Each meter reading protocol class in the energy meter protocol library implements the functional process scheduling of reading the protocol energy meter according to the specification of its own agreement;

D6).电能表协议库的初始化接口,根据电表协议号,通过抄表基础类的相应接口指向各具体不同的抄表协议类自身的初始化接口;D6). The initialization interface of the electric energy meter protocol library, according to the electric meter protocol number, points to the initialization interface of each specific different meter reading protocol class itself through the corresponding interface of the meter reading basic class;

D7).电能表协议库的抄读数据项接口,根据电表协议号,通过抄表基础类的相应接口指向各具体不同的抄表协议类自身的抄读功能调度。D7). The reading data item interface of the electric energy meter protocol library, according to the electric meter protocol number, points to the reading function scheduling of each specific and different meter reading protocol class itself through the corresponding interface of the basic meter reading class.

作为改进,所述步骤E)具体包括:As an improvement, the step E) specifically includes:

E1)抄读电表数据时,公共数据项抄读API接口的抄读数据项标识使用自定义的统一公共数据标识;E1) When reading the data of the electric meter, the identification of the reading data item of the public data item reading API interface uses a custom unified public data identification;

E2)抄读电表时,各抄表协议类将公共数据标识对应到该电表协议自身的抄表标识;E2) When reading the electric meter, each meter reading protocol class corresponds the public data identification to the meter reading identification of the electric meter protocol itself;

E3)抄表协议类抄读功能返回该电表协议自身的数据格式;E3) The meter reading protocol class reading function returns the data format of the meter protocol itself;

E4)抄表基础类将抄读返回的各电表协议格式的数据,转换为统一的公共格式数据。E4) The meter reading basic class converts the data in the protocol format of each meter returned by reading into a unified public format data.

作为改进,所述公共数据标识为自定义的数据标识,内容包括DL/T645协议定义的所有数据,以及自行扩充的分相电能、事件记录、负荷曲线等标识,满足电力行业的普遍需求,并可在有需要时再进行扩展;公共格式数据为自定义的数据格式,在长度、精度上尽量满足目前电力行业的普遍需求。As an improvement, the public data identification is a self-defined data identification, which includes all data defined by the DL/T645 protocol, as well as self-expanded identifications such as split-phase electric energy, event records, load curves, etc., to meet the general needs of the power industry, and It can be expanded when necessary; the public format data is a self-defined data format, which can meet the general needs of the current electric power industry as much as possible in terms of length and precision.

作为改进,当电能表协议库平台需要新增电表抄读协议时,步骤如下:As an improvement, when the electric energy meter protocol library platform needs to add an electric meter reading protocol, the steps are as follows:

F).需新增唯一的协议号;F). A unique agreement number needs to be added;

G).该抄表协议类需提供与现有协议类相同的规定形式的初始化接口和数据项抄读接口;G). The meter reading protocol class needs to provide the same prescribed form of initialization interface and data item reading interface as the existing protocol class;

H).将该抄表协议类加入电能表协议库,重新编译库文件以供使用。H). Add the meter reading protocol class to the energy meter protocol library, and recompile the library file for use.

本发明与现有技术相比所带来的有益效果是:The beneficial effect brought by the present invention compared with prior art is:

本发明可使抄读电表协议功能独立、集中、模块化管理,可避免反复的编码维护,而且灵活性、可扩展性均非常强;同时可方便移植到多种电能量采集系统的抄表应用功能中,使各应用功能模块从纷繁芜杂的各类型抄表协议中解脱出来,节省大量的开发成本;The present invention enables independent, centralized, and modularized management of meter reading protocol functions, avoids repeated coding maintenance, and has strong flexibility and scalability; at the same time, it can be conveniently transplanted to meter reading applications of various electric energy collection systems function, freeing each application function module from various types of meter reading protocols, saving a lot of development costs;

若不同的电能量采集系统或终端对抄表所得数据的格式、长度、精度等要求不同,可对通过电能表协议库出口抄读所得到的公共格式数据按实际应用需要进行统一的调整,而不用更改电能表协议转换库本身;If different electric energy acquisition systems or terminals have different requirements on the format, length, and accuracy of the data obtained from meter reading, the public format data obtained by reading through the export of the electric energy meter protocol library can be uniformly adjusted according to actual application needs, and No need to change the energy meter protocol conversion library itself;

本电能表协议库平台不仅适用于抄读电能表,还适用于抄读与电能表通信方式类似的测量设备,如外接交采装置,无功补偿装置等;只要新增该装置的抄读规约到电能表协议库平台,有需要时扩展所需读取的公共标识,就可以使用本抄表库平台读取。This energy meter protocol library platform is not only suitable for reading and reading electric energy meters, but also suitable for reading and reading measuring equipment similar to the communication mode of electric energy meters, such as external transfer mining devices, reactive power compensation devices, etc.; as long as the reading protocol of the device is added Go to the electric energy meter protocol library platform, and if necessary, expand the public identification that needs to be read, and then use this meter reading library platform to read.

附图说明Description of drawings

图1是本发明协议库平台的应用架构框图;Fig. 1 is a block diagram of the application architecture of the protocol library platform of the present invention;

图2是本发明协议库平台的功能实现框图;Fig. 2 is a functional realization block diagram of the protocol library platform of the present invention;

图3是本发明协议库台的抄读数据项的调度流程图。Fig. 3 is the scheduling flow chart of the reading data items of the protocol library platform of the present invention.

图4是本发明协议库平台的某一抄表协议抄读功能的具体流程图。Fig. 4 is the specific flow chart of a certain meter reading protocol reading function of the protocol library platform of the present invention.

具体实施方式Detailed ways

下面结合说明书附图对本发明作进一步说明。The present invention will be further described below in conjunction with the accompanying drawings of the description.

如图1、2所示,一种实现通用抄读多种电能表的方法,包括以下步骤:As shown in Figures 1 and 2, a method for realizing universal reading of various electric energy meters comprises the following steps:

A)建立电能表协议库平台,电能表协议库提供统一的参数初始化API接口,统一的物理通道初始化API接口,统一的公共数据项抄读API接口;A) Establish an electric energy meter protocol library platform, the electric energy meter protocol library provides a unified parameter initialization API interface, a unified physical channel initialization API interface, and a unified public data item reading API interface;

B)通过统一的参数始化API接口输入统一的抄表参数,抄表参数包含如下内容:电表协议号,配置文件号,电表地址,抄表用户名,抄表密码,抄表端口号,抄表通信波特率,抄表通信数据位、抄表通信检验位,抄表通信停止位等参数;B) Input unified meter reading parameters through the unified parameter initialization API interface. The meter reading parameters include the following contents: meter protocol number, configuration file number, meter address, meter reading user name, meter reading password, meter reading port number, meter reading Meter communication baud rate, meter reading communication data bit, meter reading communication check bit, meter reading communication stop bit and other parameters;

C)通过统一物理通道初始化API接口初始化抄表物理通信接口;C) initialize the meter reading physical communication interface through the unified physical channel initialization API interface;

D)电能表协议库平台自适应不同的电能表协议;D) The energy meter protocol library platform adapts to different energy meter protocols;

E)通过统一的公共数据项抄读API接口抄读电能表协议数据。E) Read the energy meter protocol data through the unified public data item reading API interface.

所述步骤A)中,具体包括:A1)以抄表基础类以及各抄表协议类代码等相关代码,创建常见软件平台下的标准库编译环境;A2)编译生成常见软件平台下的抄读电能表协议标准库文件,如WINDOWS平台、LINUX平台等;A3)抄读电能表协议库文件以及相关头文件打成包提供对外使用;A4)应用者在使用时,将电能表协议转换库及头文件放入应用功能模块代码的相应路径,加入其编译环境一起编译使用。In described step A), specifically include: A1) create the standard library compiling environment under the common software platform with meter reading basic class and each meter reading protocol class codes and other related codes; A2) compile and generate the reading under the common software platform Electric energy meter protocol standard library files, such as WINDOWS platform, LINUX platform, etc.; A3) read the electric energy meter protocol library files and related header files and package them for external use; A4) When using the energy meter protocol conversion library and Put the header file into the corresponding path of the application function module code, and add it to the compilation environment to compile and use it together.

所述步骤C)具体包括:C1)根据抄表端口号查找实际对应抄表物理端口;C2)初始化抄表端口的波特率、数据位、检验位、停止位等通信参数。Described step C) specifically comprises: C1) search actual corresponding meter reading physical port according to meter reading port number; C2) communication parameters such as baud rate, data bit, check bit, stop bit of initializing meter reading port.

所述步骤D)具体包括:D1).电能表协议库的实现架构包含抄表基础类,以及基于抄表基础类派生的各不同协议类型电表的抄表协议类,包括公共的协议初始化接口,公共的抄表物理通道初始化接口,公共的数据项抄读接口;D2).电能表协议库各抄表协议类对应唯一的电表协议号;D3).电能表协议库各抄表协议类提供统一形式的初始化接口,但实体的是自身协议的初始化;D4).电能表协议库各抄表协议类提供统一形式的数据项抄读接口,但实体的是自身协议的抄读模式;D5).电能表协议库各抄表协议类各自按照自身协议的规范,实现抄读该协议电能表的功能流程调度;D6).电能表协议库的初始化接口,根据电表协议号,通过抄表基础类的相应接口指向各具体不同的抄表协议类自身的初始化接口;D7).电能表协议库的抄读数据项接口,根据电表协议号,通过抄表基础类的相应接口指向各具体不同的抄表协议类自身的抄读功能调度。Described step D) specifically comprises: D1). The realization framework of electric energy meter protocol storehouse comprises meter reading basic class, and the meter reading protocol class of each different protocol type electric meter derived based on meter reading basic class, including public protocol initialization interface, Public meter reading physical channel initialization interface, public data item reading interface; D2). Each meter reading protocol class in the energy meter protocol library corresponds to a unique meter protocol number; D3). Each meter reading protocol class in the energy meter protocol library provides a unified Form initialization interface, but the entity is the initialization of its own protocol; D4). Each meter reading protocol class of the energy meter protocol library provides a unified form of data item reading interface, but the entity is the reading mode of its own protocol; D5). Each meter reading protocol class of the energy meter protocol library implements the function flow scheduling of reading the protocol energy meter according to the specification of its own agreement; D6). The initialization interface of the energy meter protocol library, according to the meter protocol number, through the meter reading basic class The corresponding interface points to the initialization interface of each specific and different meter reading protocol class itself; D7). The reading data item interface of the energy meter protocol library, according to the meter protocol number, points to each specific and different meter reading through the corresponding interface of the meter reading basic class Scheduling of the reading function of the protocol class itself.

如图3所示,所述步骤E)具体包括:E1)抄读电表数据时,公共数据项抄读API接口的抄读数据项标识使用自定义的统一公共数据标识;E2)抄读电表时,各抄表协议类将公共数据标识对应到该电表协议自身的抄表标识;E3)抄表协议类抄读功能返回该电表协议自身的数据格式;E4)抄表基础类将抄读返回的各电表协议格式的数据,转换为统一的公共格式数据。As shown in Figure 3, described step E) specifically comprises: E1) when reading electric meter data, public data item reads and reads the data item identification of API interface to use self-defined unified public data identification; E2) when reading electric meter , each meter reading protocol class corresponds the public data identification to the meter reading identification of the meter reading protocol itself; E3) the reading function of the meter reading protocol class returns the data format of the meter reading protocol itself; E4) the basic class of meter reading reads the returned data The data in the protocol format of each meter is converted into a unified public format data.

所述公共数据标识为自定义的数据标识,内容包括DL/T645协议定义的所有数据,以及自行扩充的分相电能、事件记录、负荷曲线等标识,满足电力行业的普遍需求,并可在有需要时再进行扩展;公共格式数据为自定义的数据格式,在长度、精度上尽量满足目前电力行业的普遍需求。The public data identification is a self-defined data identification, which includes all data defined by the DL/T645 protocol, as well as self-expanded phase-separated electric energy, event records, load curves and other identifications, which meet the general needs of the power industry and can be used in existing It will be expanded when necessary; the public format data is a self-defined data format, and the length and accuracy try to meet the general needs of the current power industry.

当电能表协议库平台需要新增电表抄读协议时,步骤如下:When the energy meter protocol library platform needs to add an energy meter reading protocol, the steps are as follows:

F).需新增唯一的协议号;F). A unique agreement number needs to be added;

G).该抄表协议类需提供与现有协议类相同的规定形式的初始化接口和数据项抄读接口;G). The meter reading protocol class needs to provide the same prescribed form of initialization interface and data item reading interface as the existing protocol class;

H).将该抄表协议类加入电能表协议库,重新编译库文件以供使用。H). Add the meter reading protocol class to the energy meter protocol library, and recompile the library file for use.

本发明可使抄读电表协议功能独立、集中、模块化管理,可避免反复的编码维护,而且灵活性、可扩展性均非常强;同时可方便移植到多种电能量采集系统的抄表应用功能中,使各应用功能模块从纷繁芜杂的各类型抄表协议中解脱出来,节省大量的开发成本;The present invention enables independent, centralized, and modularized management of meter reading protocol functions, avoids repeated coding maintenance, and has strong flexibility and scalability; at the same time, it can be conveniently transplanted to meter reading applications of various electric energy collection systems function, freeing each application function module from various types of meter reading protocols, saving a lot of development costs;

若不同的电能量采集系统或终端对抄表所得数据的格式、长度、精度等要求不同,可对通过电能表协议库出口抄读所得到的公共格式数据按实际应用需要进行统一的调整,而不用更改电能表协议转换库本身;If different electric energy collection systems or terminals have different requirements on the format, length, and accuracy of the data obtained from meter reading, the public format data obtained through the export of the electric energy meter protocol library can be uniformly adjusted according to actual application needs, and No need to change the energy meter protocol conversion library itself;

本电能表协议库平台不仅适用于抄读电能表,还适用于抄读与电能表通信方式类似的测量设备,如外接交采装置,无功补偿装置等;只要新增该装置的抄读规约到电能表协议库平台,有需要时扩展所需读取的公共标识,就可以使用本抄表库平台读取。This energy meter protocol library platform is not only suitable for reading and reading electric energy meters, but also suitable for reading and reading measuring equipment similar to the communication mode of electric energy meters, such as external transfer mining devices, reactive power compensation devices, etc.; as long as the reading protocol of the device is added Go to the electric energy meter protocol library platform, and if necessary, expand the public identification that needs to be read, and then use this meter reading library platform to read.

以上所述实施例仅描述了本软件方法的典型应用,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变通和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only describe typical applications of the software method, but should not be construed as limiting the patent scope of the present invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.

Claims (3)

Translated fromChinese
1.一种实现通用抄读多种电能表的方法,其特征在于:包括以下步骤:1. A method for realizing universal reading of multiple watt-hour meters, characterized in that: comprises the following steps:A)建立电能表协议库平台,电能表协议库提供统一的参数初始化API接口,统一的物理通道初始化API接口,统一的公共数据项抄读API接口;A) Establish an electric energy meter protocol library platform, the electric energy meter protocol library provides a unified parameter initialization API interface, a unified physical channel initialization API interface, and a unified public data item reading API interface;B)通过统一的参数始化API接口输入统一的抄表参数;B) input unified meter reading parameters through a unified parameter initialization API interface;C)通过统一物理通道初始化API接口初始化抄表物理通信接口;C) initialize the meter reading physical communication interface through the unified physical channel initialization API interface;D)电能表协议库平台自适应不同的电能表协议;D) The energy meter protocol library platform adapts to different energy meter protocols;E)通过统一的公共数据项抄读API接口抄读电能表协议数据;E) Read the energy meter protocol data through the unified public data item reading API interface;所述步骤A)中,具体包括:In described step A), specifically include:A1)以抄表基础类以及各抄表协议类代码等相关代码,创建常见软件平台下的标准库编译环境;A1) Create the standard library compilation environment under the common software platform with the relevant codes such as the meter reading basic class and each meter reading protocol class code;A2)编译生成常见软件平台下的抄读电能表协议标准库文件,所述软件平台是WINDOWS平台或LINUX平台;A2) compiling and generating the standard library file of reading electric energy meter agreement under the common software platform, and described software platform is WINDOWS platform or LINUX platform;A3)抄读电能表协议库文件以及相关头文件打成包提供对外使用;A3) Copy the energy meter protocol library file and related header files into a package for external use;A4)应用者在使用时,将电能表协议转换库及头文件放入应用功能模块代码的相应路径,加入其编译环境一起编译使用;A4) When the user is using it, put the energy meter protocol conversion library and the header file into the corresponding path of the application function module code, and add it to the compilation environment to compile and use;所述步骤B)中,抄表参数包含如下内容:电表协议号,配置文件号,电表地址,抄表用户名,抄表密码,抄表端口号,抄表通信波特率,抄表通信数据位、抄表通信检验位,抄表通信停止位;In the described step B), the meter reading parameters include the following content: the meter reading protocol number, the configuration file number, the meter reading address, the meter reading user name, the meter reading password, the meter reading port number, the meter reading communication baud rate, the meter reading communication data bit, meter reading communication check bit, meter reading communication stop bit;所述步骤C)具体包括:Described step C) specifically comprises:C1).根据抄表端口号查找实际对应抄表物理端口;C1). Find the actual corresponding meter reading physical port according to the meter reading port number;C2).初始化抄表端口的波特率、数据位、检验位、停止位通信参数;C2). Initialize the baud rate, data bit, check bit, and stop bit communication parameters of the meter reading port;所述步骤D)具体包括:Described step D) specifically comprises:D1).电能表协议库的实现架构包含抄表基础类,以及基于抄表基础类派生的各不同协议类型电表的抄表协议类,包括公共的协议初始化接口,公共的抄表物理通道初始化接口,公共的数据项抄读接口;D1). The implementation architecture of the energy meter protocol library includes the basic meter reading class and the meter reading protocol classes of different protocol types derived from the meter reading basic class, including the public protocol initialization interface and the public physical channel initialization interface for meter reading , public data item reading interface;D2).电能表协议库各抄表协议类对应唯一的电表协议号;D2). Each meter reading protocol class of the electric energy meter protocol library corresponds to a unique electric meter protocol number;D3).电能表协议库各抄表协议类提供统一形式的初始化接口,但实体的是自身协议的初始化;D3). Each meter reading protocol class of the energy meter protocol library provides a unified initialization interface, but the entity is the initialization of its own protocol;D4).电能表协议库各抄表协议类提供统一形式的数据项抄读接口,但实体的是自身协议的抄读模式;D4). Each meter reading protocol class of the energy meter protocol library provides a unified form of data item reading interface, but the entity is the reading mode of its own protocol;D5).电能表协议库各抄表协议类各自按照自身协议的规范,实现抄读该协议电能表的功能流程调度;D5). Each meter reading protocol class in the energy meter protocol library implements the functional process scheduling of reading the protocol energy meter according to the specification of its own agreement;D6).电能表协议库的初始化接口,根据电表协议号,通过抄表基础类的相应接口指向各具体不同的抄表协议类自身的初始化接口;D6). The initialization interface of the electric energy meter protocol library, according to the electric meter protocol number, points to the initialization interface of each specific different meter reading protocol class itself through the corresponding interface of the meter reading basic class;D7).电能表协议库的抄读数据项接口,根据电表协议号,通过抄表基础类的相应接口指向各具体不同的抄表协议类自身的抄读功能调度;D7). The reading data item interface of the electric energy meter protocol library, according to the electric meter protocol number, points to the reading function scheduling of each specific and different meter reading protocol class itself through the corresponding interface of the basic meter reading class;所述步骤E)具体包括:Described step E) specifically comprises:E1)抄读电表数据时,公共数据项抄读API接口的抄读数据项标识使用自定义的统一公共数据标识;E1) When reading the data of the electric meter, the identification of the reading data item of the public data item reading API interface uses a custom unified public data identification;E2)抄读电表时,各抄表协议类将公共数据标识对应到该电表协议自身的抄表标识;E2) When reading the electric meter, each meter reading protocol class corresponds the public data identification to the meter reading identification of the electric meter protocol itself;E3)抄表协议类抄读功能返回该电表协议自身的数据格式;E3) The meter reading protocol class reading function returns the data format of the meter protocol itself;E4)抄表基础类将抄读返回的各电表协议格式的数据,转换为统一的公共格式数据。E4) The meter reading basic class converts the data in the protocol format of each meter returned by reading into a unified public format data.2.根据权利要求1所述的一种实现通用抄读多种电能表的方法,其特征在于:所述公共数据标识为自定义的数据标识,内容包括DL/T645协议定义的所有数据,以及自行扩充的分相电能、事件记录、负荷曲线标识,满足电力行业的普遍需求,并可在有需要时再进行扩展;公共格式数据为自定义的数据格式,在长度、精度上尽量满足目前电力行业的普遍需求。2. a kind of method that realizes universal reading according to claim 1 multiple energy meters, is characterized in that: described public data mark is the data mark of self-definition, and content comprises all data of DL/T645 agreement definition, and The self-expanded phase-separated electric energy, event records, and load curve identification meet the general needs of the power industry, and can be expanded when necessary; the public format data is a self-defined data format, which meets the current power requirements in terms of length and accuracy. general needs of the industry.3.根据权利要求1所述的一种实现通用抄读多种电能表的方法,其特征在于:当电能表协议库平台需要新增电表抄读协议时,步骤如下:3. A kind of method for realizing universal reading and reading of multiple electric energy meters according to claim 1, characterized in that: when the electric energy meter protocol library platform needs to add an electric meter reading agreement, the steps are as follows:F).需新增唯一的协议号;F). A unique agreement number needs to be added;G).该抄表协议类需提供与现有协议类相同的规定形式的初始化接口和数据项抄读接口;G). The meter reading protocol class needs to provide the same prescribed form of initialization interface and data item reading interface as the existing protocol class;H).将该抄表协议类加入电能表协议库,重新编译库文件以供使用。H). Add the meter reading protocol class to the energy meter protocol library, and recompile the library file for use.
CN 2010102538842010-08-132010-08-13Method for reading multiple electric energy meters generallyActiveCN102014118B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN 201010253884CN102014118B (en)2010-08-132010-08-13Method for reading multiple electric energy meters generally

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN 201010253884CN102014118B (en)2010-08-132010-08-13Method for reading multiple electric energy meters generally

Publications (2)

Publication NumberPublication Date
CN102014118A CN102014118A (en)2011-04-13
CN102014118Btrue CN102014118B (en)2013-03-20

Family

ID=43844133

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN 201010253884ActiveCN102014118B (en)2010-08-132010-08-13Method for reading multiple electric energy meters generally

Country Status (1)

CountryLink
CN (1)CN102014118B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103310621A (en)*2012-03-132013-09-18周治江Address processing method for intelligent meter reading system equipment
CN102881143B (en)*2012-10-222013-06-12杭州海兴电力科技股份有限公司Method for reading electric energy meter event records in AMI (Advanced Metering Infrastructure) system
CN103914540A (en)*2014-04-032014-07-09云南电力试验研究院(集团)有限公司电力研究院Processing method for flexibly configuring ammeter specifications for ammeter reading
CN104035882B (en)*2014-06-212017-01-04宁波三星医疗电气股份有限公司A kind of power concentrator copy reading using little internal memory and the method for storage import electric energy meter data
CN104792391A (en)*2015-04-132015-07-22安徽理工大学MODBUS protocol converter and ultrasonic water meter detection system and method
CN104881982B (en)*2015-05-062018-03-06上海应时为能源数据技术有限公司A kind of the intelligent gauge data collecting system and its acquisition method of adaptive meter reading strategy
CN105279933A (en)*2015-11-092016-01-27深圳市科陆电子科技股份有限公司Remote reading method based on electric low-voltage meter reading system
CN106850639B (en)*2017-02-152020-05-22国网江苏省电力公司电力科学研究院Protocol conversion system and protocol conversion method for standard electric energy meter verification
CN107656138A (en)*2017-09-192018-02-02广州星屋智能科技有限公司The automatic method and system for adapting to no-load voltage ratio collection multifunction electric meter data
CN109379367A (en)*2018-07-272019-02-22宁波三星智能电气有限公司A kind of means of communication of electric energy meter and communication module
CN109741592B (en)*2019-01-102020-12-08国网陕西省电力公司 The Realization Method of Automatic Data Collection of Power Energy Collection Terminals in Power Plants
CN110660004B (en)*2019-09-292022-03-18威胜集团有限公司Curve data reading method, electric energy meter and storage medium
CN112055027B (en)*2020-09-112023-01-24国网山西省电力公司营销服务中心User power consumption information acquisition system based on protocol interface adaptation
CN112185093B (en)*2020-09-292024-03-22广东艾科技术股份有限公司Meter reading method, equipment and device for automatic framing
CN115714933A (en)*2022-10-252023-02-24杭州明特科技有限公司Method, system, medium and equipment for adapting collector to ammeter

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101488280A (en)*2008-01-182009-07-22绍兴电力局Embedded PI data collecting apparatus based on OPC
CN101571990A (en)*2009-06-152009-11-04安徽省电力公司合肥供电公司Mobile intelligent meter reading system
CN101661276A (en)*2009-09-182010-03-03东北大学Universal data acquisition unit and data acquisition method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7738612B2 (en)*2006-11-132010-06-15Main.Net Communications Ltd.Systems and methods for implementing advanced power line services

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101488280A (en)*2008-01-182009-07-22绍兴电力局Embedded PI data collecting apparatus based on OPC
CN101571990A (en)*2009-06-152009-11-04安徽省电力公司合肥供电公司Mobile intelligent meter reading system
CN101661276A (en)*2009-09-182010-03-03东北大学Universal data acquisition unit and data acquisition method thereof

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
《基于ARM的嵌入式网络电能计量系统》;闫银发;《CNKI中国优秀硕士学位论文数据库》;20051231;全文*
《基于AT91RM9200的远程自动抄表系统设计》;赖中安;《CNKI中国优秀硕士学位论文数据库》;20071231;全文*
管建和,谭志强,傅军.《基于数字化电能表的通信实现技术》.《华北电力技术》.2000,全文.*
赖中安.《基于AT91RM9200的远程自动抄表系统设计》.《CNKI中国优秀硕士学位论文数据库》.2007,全文.
闫银发.《基于ARM的嵌入式网络电能计量系统》.《CNKI中国优秀硕士学位论文数据库》.2005,全文.

Also Published As

Publication numberPublication date
CN102014118A (en)2011-04-13

Similar Documents

PublicationPublication DateTitle
CN102014118B (en)Method for reading multiple electric energy meters generally
CN101901539B (en)Electric energy meter reading method for customizing meter reading contents based on configuration file
CN102333031A (en)Device intelligent access system based on device adaptation technology, and method of the same
CN104954096A (en)One-master multi-slave high-speed synchronous serial communication data transmission method
CN105472044B (en) An XML-based mapping method between DL/T645 and GOOSE
CN105025056A (en)Internet of Things information collection and monitoring system design method
CN102621921A (en)Programmer for electric energy meters
EP3651474A1 (en)System on a module for smart grid nodes
CN103905410A (en)Multi-channel communication protocol converter capable of converting user-defined protocol to Modbus protocol
US20060129347A1 (en)Generic transducer interface
CN102384025A (en)Programmable logic control (PLC) control system
CN103354025A (en)RTDS data transmission device and method based on serial communication
CN105404257A (en)Modularized data acquisition apparatus
CN110401586A (en)A kind of bus communication, device, equipment and readable storage medium storing program for executing
CN104735172B (en)A kind of stipulations conversion method of intelligent electricity consumption information acquisition terminal
CN103929457A (en)Internet of things application data interaction system and method based on mobile internet
CN116471302A (en)Remote dynamic configuration method of electric power acquisition system
CN211349041U (en) A flexibly configurable industrial computer
CN202210278U (en)Device converting serial port data of electronic scale to computer USB data
CN102035690B (en)Data transmission method and device based on system-level joint test action group interface
CN202077051U (en)Remote communication system
CN102075387B (en)Method and device for communication of monitoring system
CN104023026A (en)Protocol converter for transformation substation automatic system
CN208238262U (en)A kind of expansible communication system of gas instantaneous water heater compatibility
CN105243807A (en)Data transmission system and data transmission method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp