Address adaptive approach in a kind of electric energy meter information acquisition system
Technical field
The present invention relates to the method for information acquisition system, specifically relate to the address adaptive approach in a kind of electric energy meter information acquisition system.
Background technology
The shortcomings such as current applied electric energy meter information acquisition system exists plant maintenance workload large, and automaticity is not high, wherein most important reason is exactly that address self adaptation can not be realized in electric energy meter information acquisition system inside.In most electric energy meter information acquisition system, the parameter such as electric energy meter address needs artificial input, in system electric energy meter increase and decrease or change after, must be by parameters such as corresponding electric energy table addresses in artificial increase and decrease or change acquisition system, this just makes the automaticity of system and reliability reduce, and in the time having a large amount of electric energy meter in system, this problem is particularly outstanding.
Summary of the invention
The object of the invention is to simplify the workload of the artificial input of electric energy meter address parameter needs in automatic meter reading system, in system electric energy meter increase and decrease or change after, collector in system and electric energy meter can be identified automatically and adapt to the other side, and the automaticity of system and reliability are improved.
For realizing object of the present invention, the present invention is achieved by the following technical solutions:
The invention provides the address adaptive approach in a kind of electric energy meter information acquisition system, its improvements are, the electric energy meter information acquisition system of described method comprises system main website, concentrator, collector and electric energy meter; Described method comprises following state:
A, to the initialization of described electric energy meter information acquisition system;
B, described electric energy meter information acquisition system are normally worked;
C, the inquiry of described collector newly add the instruction of incoming link electric energy meter;
D, described collector are screened and are departed from link electric energy meter;
E, described electric energy meter depart from link.
The preferred technical scheme of one provided by the invention is: in described state A, during to described electric energy meter information acquisition system initialization, the address self adaptation between collector and electric energy meter comprises the steps:
A, described collector are uploaded electric energy meter address instruction to the electric energy meter broadcast on link;
B, described electric energy meter receive after instruction, the electric energy meter address of storage of collected device, and according to after the random delay constant time delay producing, the electric energy meter address of uploading successively described electric energy meter;
Self again produce time delay constant if c has electric energy meter that bus collision occurs in the time uploading, after corresponding delay, continue to upload the electric energy meter address of described electric energy meter;
D, collector are received behind the address of described electric energy meter, and described electric energy meter address is stored in address table, issue unique time delay constant of replying to the above electric energy meter of link simultaneously.
The preferred technical scheme of the second provided by the invention is: in described state B, when described electric energy meter information acquisition system is normally worked, the address self adaptation between collector and electric energy meter comprises the steps:
1) described collector is set up and is communicated by letter with electric energy meter by electric energy meter address, in the time that electric energy meter is received communication instruction, and without time delay, directly response instruction;
2) described collector sends broadcasting instructions to electric energy meter, and in the time that electric energy meter is received broadcasting instructions, what described electric energy meter was received during according to initialization replys time delay constant, after the corresponding time of time delay, and response instruction successively.
The third preferred technical scheme provided by the invention is: in described state C, when described collector inquiry newly adds the instruction of incoming link electric energy meter, the address self adaptation between collector and electric energy meter comprises the steps:
I) described collector timing newly adds electric energy meter instruction to the electric energy meter broadcast query on link;
Ii) described electric energy meter obtains collector address after to the described electric energy meter decoding newly adding;
Iii) if the collector address that store with electric energy meter inside the collector address of receiving is identical, electric energy meter is not replied;
Iv) if the collector address that store the collector address of receiving and electric energy meter inside is not identical, the described electric energy meter newly adding according to self produce the backward collector of random delay constant time delay on by reference;
V) described collector is received behind the address of this electric energy meter, is stored in address table, distributes unique time delay constant of replying to it simultaneously.
The 4th kind of preferred technical scheme provided by the invention is: in described state D, described collector is screened while departing from link electric energy meter, and the address self adaptation between collector and electric energy meter comprises the steps:
1., after sending instructions under described collector, if do not receive the response of described electric energy meter in regulation time delay, described collector is by the record communication frequency of failure;
2. described collector sends to described electric energy meter the instruction of shaking hands;
Successfully continue to send instruction if 3. shake hands, the communication failure of electric energy meter records zero clearing simultaneously;
If 4. shake hands, failure continues to send shake hands instruction the cumulative communications frequency of failure;
5. in the time that communication failure number of times reaches certain numerical value, think that electric energy meter breaks down or is removed, described collector is deleted electric energy meter address automatically from address table.
The 5th kind of preferred technical scheme provided by the invention is: in described state E, when described electric energy meter departs from link, the address self adaptation between collector and electric energy meter comprises the steps:
I), in the time that electric energy meter on link does not receive that the inquiry of collector timed sending newly adds electric energy meter instruction at the appointed time, the electric energy meter on described link unique sends to collector the instruction of shaking hands after replying time delay constant time delay successively according to distributed;
II) successfully continue to wait for the instruction of collector if shake hands;
III) if the failure of shaking hands continues to send shake hands instruction the cumulative communications frequency of failure;
IV) in the time that communication failure number of times reaches certain numerical value, think that collector breaks down or electric energy meter self is removed, electric energy meter is deleted collector address automatically.
Compared with prior art, the beneficial effect that the present invention reaches is:
Address adaptive approach in a kind of electric energy meter information acquisition system provided by the invention, by the address self adaptation between electric energy meter on collector and link, having simplified the parameters such as electric energy meter address in automatic meter reading system needs the workload of artificial input, in system electric energy meter increase and decrease or change after, the other side can be identified and adapt to collector in system and electric energy meter automatically, automaticity and the reliability of system are obviously improved, the advantage of the address adaptive approach in the time having a large amount of electric energy meter in system in a kind of electric energy meter information acquisition system provided by the invention is particularly evident.
Brief description of the drawings
Fig. 1 is the flow chart of the address adaptive approach in electric energy meter information acquisition system;
Fig. 2 is that collector is screened the address self adaptive flow figure that departs from link electric energy meter process;
Fig. 3 is the address self adaptive flow figure that electric energy meter departs from link process.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in further detail.
Fig. 1 is the flow chart of the address adaptive approach in electric energy meter information acquisition system, after communication starts, electric energy meter information acquisition system carries out initialization, after initialization completes, collector issues uploads electric energy meter address instruction, then electric energy meter storage of collected device address, then electric energy meter produces time delay immediately, judges that whether bus is idle, if the bus free time, electric energy meter is uploaded self electric energy meter address, if bus is busy, turns back to electric energy meter and produces random delay state; Collector storage of electrical energy table address issue time delay constant after electric energy meter is uploaded self address, finally arrives done state.
Address adaptive approach in a kind of electric energy meter information acquisition system provided by the invention, electric energy meter information acquisition system comprises system main website, concentrator, collector and electric energy meter; Wherein the piece number of electric energy meter is more than 1, and electric energy meter information acquisition system varies, and even nearly hundreds of piece is not etc. at several to tens for the piece number of electric energy meter.Implant procedure in electric energy meter, writes time delay code, and electric energy meter produces time delay constant immediately according to time delay code, produces corresponding delay time according to corresponding random delay constant, implants different delay procedures for different electric energy meter information acquisition systems.Suppose that it is t1 to the time that discharges bus that each electric energy meter takies bus, the random delay constant of generation is K, and the delay time of electric energy meter is T=t1 × K.
Address adaptive approach in a kind of electric energy meter information acquisition system provided by the invention, realizes method of the present invention by the information interactive process between electric energy meter on collector and link in this system, is implemented as follows:
1, address self adaptation when initialization:
(1) collector is uploaded table address instruction to all electric energy meter broadcast on link;
(2) electric energy meter receives after instruction, and table address separately, after the random delay constant time delay secondly producing according to self, is uploaded successively in the first address of storage of collected device;
(3) if there are indivedual electric energy meters that bus collision occurs in the time uploading, self again produce time delay constant, after corresponding delay, continue to upload the table address of self;
(4) collector is received behind the address of each electric energy meter, is stored in address table, issues unique time delay constant of replying to each electric energy meter on link simultaneously, ensures to there will not be and reply conflict in the time of normal work.
Address self adaptation while so just having completed initialization between collector and electric energy meter.
2, the address self adaptation while normally work:
(1) collector can be set up and communicate by letter separately with any electric energy meter by table address, in the time that electric energy meter is received independent communication instruction, and without time delay, directly response instruction;
(2) collector can send broadcasting instructions to all electric energy meters, and in the time that electric energy meter is received broadcasting instructions, what each electric energy meter was received during according to initialization replys time delay constant, after the corresponding time of time delay, and response instruction successively.
Address self adaptation while so just having completed normal work between collector and electric energy meter, refers to while normally work that electric energy meter information acquisition system there will not be malfunction.
3, inquiry newly adds the address self adaptation of electric energy meter process:
(1) collector timing newly adds electric energy meter instruction to all electric energy meter broadcast queries on link;
(2) electric energy meter obtains collector address after to its decoding;
(3) if the collector address that store with electric energy meter inside the collector address of receiving is identical, this electric energy meter is not replied;
(4) if the collector address that store the collector address of receiving and electric energy meter inside is not identical, the electric energy meter newly adding according to self produce the backward collector of random delay constant time delay on by reference;
(5) collector is received behind the address of this electric energy meter, is stored in address table, distributes unique time delay constant of replying to it simultaneously, guarantees that it can not reply conflict with existing electric energy meter in link.
So just complete the address self adaptation between collector and Xin Jia incoming link electric energy meter.
4, collector is screened the address self adaptation that departs from link electric energy meter process:
(1), after sending instructions under collector, if do not receive the response of certain electric energy meter in regulation time delay, collector is by the record communication frequency of failure;
(2) collector sends to this electric energy meter the instruction of shaking hands;
(3) if shaken hands successfully, continue to send instruction, the communication failure of this table records zero clearing simultaneously;
(4), if shake hands failure, continue to send shake hands instruction the cumulative communications frequency of failure;
(5) in the time that communication failure number of times reaches certain numerical value, think that electric energy meter breaks down or is removed, collector is deleted this electric energy meter address automatically from address table.
Fig. 2 is that collector is screened the address self adaptive flow figure that departs from link electric energy meter process, has so just completed collector and has screened the address self adaptation that departs from link electric energy meter process.
5, electric energy meter departs from the address self adaptation of link process:
(1), in the time that original electric energy meter on link does not receive that the inquiry of collector timed sending newly adds electric energy meter instruction at the appointed time, electric energy meter unique sends to collector the instruction of shaking hands after replying time delay constant time delay successively according to distributed;
(2), if shaken hands successfully, continue to wait for the instruction of collector;
(3), if shake hands failure, continue to send shake hands instruction the cumulative communications frequency of failure;
(4) in the time that communication failure number of times reaches certain numerical value, think that collector breaks down or electric energy meter self is removed, electric energy meter is deleted collector address automatically.
Fig. 3 is the address self adaptive flow figure that electric energy meter departs from link process, has so just completed the address self adaptation of electric energy meter disengaging link process.
Address adaptive approach in a kind of electric energy meter information acquisition system provided by the invention, by the address self adaptation between electric energy meter on collector and link, having simplified the parameters such as electric energy meter address in automatic meter reading system needs the workload of artificial input, in system electric energy meter increase and decrease or change after, the other side can be identified and adapt to collector in system and electric energy meter automatically, automaticity and the reliability of system are obviously improved, and in the time having a large amount of electric energy meter in system, method advantage of the present invention is particularly evident.
Finally should be noted that: only illustrate that in conjunction with above-described embodiment technical scheme of the present invention is not intended to limit.Those of ordinary skill in the field are to be understood that: those skilled in the art can modify or be equal to replacement the specific embodiment of the present invention, but among the claim protection range that these amendments or change are all awaited the reply in application.