A kind of electric energy meter programming device
Technical field
The present invention relates to a kind of electric energy meter programming device, belong to the electric-power metering technical field.
Background technology
Along with the application of multifunctional electric energy meter more and more widely, multifunctional electric energy meter programming, the workload of checking meter are also increased day by day.From the needs of host computer, concentrator and electric energy meter communication, country issued DL/T645-1997 electric energy meter communication protocol in 1997.But because these stipulations are formulated the time early, along with the expanded function of multifunctional electric energy meter is increasing, these stipulations can not satisfy each item demand of continuous development.So the numerous and confused communications protocol of formulating separately of each province Utilities Electric Co., electric energy meter supplier, thereby each tame communication protocol has nothing in common with each other, and all there are bigger difference in different manufacturers, the electric energy meter communication protocol of different model, structure.
Multifunctional electric energy meter is being programmed, checking meter, when testing accuracy and function, all need use the special palm programmable device of producer that electric energy meter is carried out communication and control.Though each ammeter manufacturer has all developed programming, the palm machine of checking meter to our factory's model electric energy meter now; But each electric energy meter manufacturer all adopts different programming, check meter electric energy meter programming device and programming software, the self-defining communication modes of use and communications protocol; Even in same ammeter factory, the communication protocol and the software of the electric energy meter of different model and electric energy meter programming device all have nothing in common with each other.In Jiangxi electrical network installation and operation have that Changsha wasion, hundred Fuhuas are grand, nearly 20 merchants of household electrical appliances Watch Factory such as Holley's instrument, Dongfang Electronics, Nanjing, Shanghai, Shenzhen are held bright, Zhuhai state survey, ZhangZhou section ability, section's land electronics, the electric energy meter of kind of model surplus in the of nearly 80.Operating personnel need learn to use the method for tens kinds of programmings, programmable device like this, have strengthened the use difficulty, have also strengthened the probability of makeing mistakes simultaneously, have increased workload, cause programming, meter reading personnel to feel exhausted inefficiency.
In order to change this situation, the present invention proposes a kind of new way: unified electric energy meter programming device is to electric energy meter programming, the software specifications of checking meter, and takes into account the multifunctional electric energy meter of installation and operation, makes this standard adaptation any multifunctional meter in operation.Regroup a cover palm machine programming, the software of checking meter, can check meter various types of electric energy meter programmings.Operating personnel avoid the generation of faulty operation as long as the operation of a program of study is increased work efficiency, and reduce cost, and reduce the use amount of palm machine, reduce production costs.
Summary of the invention
The objective of the invention is: disclose a kind of electric energy meter programming device; Unified each multifunctional meter programming software; Solve the independent separately mutual uncurrent problem of ammeter programmable device of each ammeter factory now, the technical manual of unified multifunctional meter electric energy meter programming device programming software, the needs of adaptive technique management.
Technical scheme of the present invention is, sets up the electric energy meter programming device to electric energy meter programming, the software specifications of checking meter, and takes into account the multifunctional electric energy meter of installation and operation, makes it to adapt to any multifunctional meter in operation.
The present invention's data link layer in communication software is write adopts the half-duplex operation mode of main-slave structure, is main website with the programmable device, and electric energy meter is a slave station; Each electric energy meter all has geocoding separately; The foundation of communication link is controlled by the information frame that main website sends with releasing; Every frame is made up of start-of-frame, tributary address territory, control code, data field length, data field, frame information longitudinal check sign indicating number and 7 territories of frame end symbol.Every part is made up of some bytes; The communication byte format adopts every byte to contain 8 binary codes, adds a start bit (0), even parity bit and a position of rest (1) during transmission, totally 11; D0 is the least significant bit (LSB) of byte, and D7 is the highest significant position of byte.Pass low level earlier, the back passes high-order.
During data transmission, before main website transmit frame information, send 4 byte FEH earlier, to wake the take over party up; Order of transmission adopts all data item all to transmit low byte earlier, and upper byte is transmitted in the back.Each byte adds 33H and redispatches during transmission, and each byte deducts 33H and re-uses during reception.
The Data Identification coding adopts four bytes to distinguish the different pieces of information item, and nybble is used DI respectively
3, DI
2, DI
1And DI
0Representative, every byte adopts hexadecimal code.Data type is divided into seven types: electric flux, maximum demand and time of origin, variable, logout, parameter, the amount of freezing, load record.
The present invention sets up a communications protocol database in programmable device; The communications protocol of various dissimilar electric energy meters is separated by application layer content (like contents such as packet header, address, Data Identification, control word, bag tails); Again that each section content of application layer is different with it expression waies is carried out permutation and combination; And for its write one ID number, every kind of different expression way of promptly same content (like packet header) give one ID number.ID number composition of each section content with various stipulations is saved in the database with order again, carries out communication by the corresponding form of preserving in the database automatically when calling.The programming and the use of the electric energy meter of original installation and operation have been taken into account.
1. the programmable device communication software writes
(1) data link layer
Adopt the half-duplex operation mode of main-slave structure.Programmable device is a main website, and electric energy meter is a slave station.Each electric energy meter all has geocoding separately.The foundation of communication link is controlled by the information frame that main website sends with releasing.Every frame is made up of start-of-frame, tributary address territory, control code, data field length, data field, frame information longitudinal check sign indicating number and 7 territories of frame end symbol.Every part is made up of some bytes.
(2) communication byte format
Every byte contains 8 binary codes, adds a start bit (0), even parity bit and a position of rest (1) during transmission, totally 11.Its transfer sequence is as shown in Figure 2, and D0 is the least significant bit (LSB) of byte, and D7 is the highest significant position of byte.Pass low level earlier, the back passes high-order.
(3) communication frames form
Frame is the elementary cell of transmission information.Programmable device data communication frame format is as shown in Figure 1.
(4) start-of-frame 68H
Identify the beginning of a frame information, its value is 68H=01101000B.
(5) address field A0~A5
Address field is made up of 6 bytes, 2 BCD sign indicating numbers of every byte, and address size can reach 12 decimal numbers.Every table has unique mailing address, and irrelevant with physical layer channel.When address code curtailment 6 bytes used, high-orderly supply with " 0 ".
(6) control code C
The form of control code is seen accompanying drawing 2: the format chart of programmable device data communication control code.
(7) data field length L
LByte number for data field.During read data
L≤200, during write data
L≤50,
L=0 expression no datat territory.
(8) data field DATA
Data field comprises Data Identification, password, operator's code, data, frame number etc., and its structure changes with the function of control code.Transmit leg adds the 33H processing by byte during transmission, and the take over party subtracts 33H by byte and handles.
(9) check code CS
Begin from first start-of-frame all each bytes before the check code mould 256 with, promptly each byte binary arithmetic with, disregard and surpass 256 overflow value.
(10) end mark 16H
Identify the end of a frame information, its value is 16H=00010110B.
2. transmission
(1) lead byte
Before main website transmit frame information, send 4 byte FEH earlier, to wake the take over party up.
(2) order of transmission
All data item all transmit low byte earlier, and upper byte is transmitted in the back.Each byte adds 33H and redispatches during transmission, and each byte deducts 33H and re-uses during reception.
3. Data Identification
The Data Identification coding is distinguished the different pieces of information item with four bytes, and nybble is used DI respectively
3, DI
2, DI
1And DI
0Representative, every byte adopts hexadecimal code.Data type is divided into seven types: electric flux, maximum demand and time of origin, variable, logout, parameter, the amount of freezing, load record.
The beneficial effect of the present invention and prior art comparison is; The present invention is through unified each multifunctional meter programming software; Solved the independent separately mutual uncurrent problem of ammeter programmable device of present each ammeter factory; The technical manual of unified multifunctional meter electric energy meter programming device programming software, the needs of adaptive technique management.
The present invention is applicable to various electric energy meter programmings is used.
Description of drawings
Accompanying drawing 1 is programmable device data communication frame format figure of the present invention;
Accompanying drawing 2 is the format chart of programmable device data communication control code of the present invention.
Embodiment
A kind of electric energy meter programming device that can programme to various electric energy meters of the present invention.Practical implementation is following: the maximum characteristics of the present invention just are that a cover programmable device will be taken into account dissimilar, the different communication modes of each ammeter factory, the electric energy meter of different communication protocols carries out communication.The main embodiment of different communication modes, different communication protocols is following:
(1) Physical layer:
Be divided into infrared interface or RS485 interface dual mode;
(2) data link layer:
Comprise: byte format, frame format, start-of-frame, address field, control code, data field length, data field, check code, end mark etc.;
(3) Data Identification:
Be embodied in Data Identification and structure and data transmittal and routing form (being to adopt the single datum transmission or adopt the data block mode) two aspects;
(4) form of presentation of status word, tagged word, pattern-word, error message word is different.
Though the electric energy meter communication protocol of variant type is different, but exist identical node to occur simultaneously.The target of software administration is not only will clearly separate belonging to each different communication protocol, flow process, affairs; Also hope oneself to customize or deletion flow process type; For each flow process type can add, deletion of node and can its internal node being sorted, for the change that possibly occur on the business ready.Because dissimilar exist node to occur simultaneously, and can create a flow process pond, i.e. the related flow process complete or collected works of each item business.The configuration target of flexible flow process can abstractly be: the difference of complete or collected works' element is arranged, combination.
Communication protocol different to the employed programmable device of each multifunction electric meter manufacturer, that adopt is different, communication modes have different, respectively the mutual uncurrent situation of technology barriers, programmable device of self-protection arranged; At first in programmable device, set up a communications protocol database; The communications protocol of various dissimilar electric energy meters is separated by application layer content (like contents such as packet header, address, Data Identification, control word, bag tails); Again that each section content of application layer is different with it expression waies is carried out permutation and combination; And for its write one ID number, every kind of different expression way of promptly same content (like packet header) give one ID number.ID number composition of each section content with various stipulations is saved in the database with order again, carries out communication by the corresponding form of preserving in the database automatically when calling.The programming and the use of the electric energy meter of original installation and operation have been taken into account.Programmable device has automatic identification and judges the communication protocol function, if meet new table New Deal, also can add the entering database, and programmable device calls corresponding communications protocol automatically from the programmable device protocol database, guarantee to control communication.