The quality of power supply is not only related to the safety and economic operation of electrical network, also affects the normal of big and small electric load
Work.With the development of modern industrial technology, electric network composition also becomes increasingly complicated；Meanwhile, many power sensitive equipment quilts
It is applied to produce, these equipment have high demands to power quality, and new power quality problem is following.Detection ammeter is at the scene
Under various adverse circumstances, whether normal work is very important, and traditional detection is to go test manually by artificial, but
So workload some tests huge are impossible.
Python is a kind of object-oriented, explanation type computer programming language, and the advantage of python language has: letter
Single, easy to learn, speed is fast, portability, object-oriented, expansibility, Residuated Lattice and the advantages of have abundant storehouse, if energy
Set up meter automatically testing platform using the powerful function of python script and complete white-box testing, grey box testing, Black-box Testing
Lamp, can create the more excellent ammeter of performance with all standing platform tools function of each class testing of innovation realization software and hardware.
Content of the invention
For deficiency of the prior art, the invention provides a kind of python script is to meter automatically testing platform and survey
Method for testing.
The present invention is achieved through the following technical solutions: the meter automatically testing platform based on python script, including automatically
Test platform experimental provision, pc machine, communication interface, communication network, single-phase meter, three-phase meter, harvester and concentrator, described automatic
Test platform experimental provision include ammeter running voltage fall, high-voltage pulse group's device, surge module, emc device, high frequency occur
Device, high-low temperature chamber, controllable load case and voltage switching control module, current switching control module, described voltage switching module
Fluctuation and the impact of running voltage simulated field low voltage electric network can be provided for single-phase meter, three-phase meter, harvester and concentrator, described
Current switching module can provide word current, the automatic testing software fortune of exploitation for single-phase meter, three-phase meter, harvester and concentrator
Row, in described pc machine, controls described automatically testing platform with the automatic testing scheme of python script formulation by described communication interface
The experiment parameter of experimental provision, occurrence time and all operations experiment, described pc machine and described interconnection of telecommunication network, described pc machine
The automatic testing scheme running python script formulation arranges concentrator, harvester all kinds of ammeter operational factor by communication network
Various types of data with copy reading single-phase meter, three-phase meter, harvester and concentrator.Test system high flexible is extendible.
Method of testing is divided into load record functional test and error-logic to speculate method Reliability Synthesis experimental program and test
Step two part: described load record functional test and error-logic speculate that method Reliability Synthesis experimental program is as follows: function
Test: setting load record pattern-word is set to entirely to start each data item, load record initial time is set to current time,
Time interval is set to 1 minute, allows ammeter everywhere in extreme operating condition, changes ammeter clock so that ammeter is in the shortest time
The interior record points producing user's technical conditions defined, then copy reading load record data, detects ammeter keeping records data
Error-logic speculates method test: setting load record pattern-word is set to illegal parameter, sees ammeter reaction and realizes
Function；Load record initial time is set to the illegal time, and deliberately setting is very close for time interval, is less than minimum time
Interval etc.；1st ~ 6 type load intra-record slack byte set of time illegal value；Above-mentioned load record pattern-word, load record initial time
In the setting of 1 ~ 2 data normal, other settings are illogical, when the 1st ~ 6 type load intra-record slack byte time and load record initiate
Between normally arrange.
Described testing procedure is as follows: the first step: describes design testing scheme by scheme, is write using python language and retouched
The testing scheme stated；Second step: detection ammeter error；3rd step, surveyed electric energy meter is arranged on and has good luck on testing stand；4th
Step: start single three-phase drop test platform；5th step, imports to software library the testing scheme writing, and opens python intelligence
Table automatization test system；5th step: select ammeter to be detected after entering automatic testing software；6th step: start test it is ensured that
Scheme normally runs several cycles；7th step: after test terminates, preserve test data and do preliminary analyses, whole after the completion of experiment
Reason testing equipment, by test instrunment power-off, ammeter is removed, and instrument playback is put neat, in case next time uses, arranges derivation
Experimental data and record, and fill in test report, use-case scheme and experimental data are tested in filing.
The device have the advantages that being: test system high flexible is extendible, reducing artificial erroneous judgement and repeatability is surveyed
Trial work is made, never tired, makes full use of the quitting time, improves inspection table efficiency, can carry out the substantial amounts of test that manually cannot complete,
Protocol command can independent assortment, test equipment can flexibly control at random, can carry out polytype meter test, and export
Automatization can be realized by python script.Can build meter acquisition terminal under special service condition it may happen that
The scene of fault, simulation field failure phenomenon retain ammeter working condition carries out principle analysis at that time again.The present invention has
Very significant advantage, can simulate the situation of the illegal work being likely to occur in multiple meter work, by experimental data
Record and analysis can draw best solution, have boundless development space, have obviously beneficial effect
The concrete operating principle of the present invention is described below in conjunction with the accompanying drawings: referring to the drawings 1, the meter based on python script from
Dynamic test platform, including automatically testing platform experimental provision, pc machine, communication interface, communication network, single-phase meter, three-phase meter, collection
Device and concentrator, described automatically testing platform experimental provision includes ammeter running voltage falling device, high-voltage pulse group's device, wave
Gush module, emc device, high frequency generator, high-low temperature chamber, controllable load case and voltage switching control module, current switching control
Molding block, described voltage switching module can provide running voltage simulated field low for single-phase meter, three-phase meter, harvester and concentrator
The fluctuation of voltage electric grid and impact, described current switching module can provide, for single-phase meter, three-phase meter, harvester and concentrator, electricity of having good luck
Stream, the automatic testing software of exploitation operates in described pc machine, with the automatic testing scheme of python script formulation by described communication
The experiment parameter of automatically testing platform experimental provision described in Interface Controller, occurrence time and all operations experiment, described pc machine with
Described interconnection of telecommunication network, the automatic testing scheme that described pc machine runs python script formulation arranges concentration by communication network
Device, harvester all kinds of ammeter operational factor and the Various types of data of copy reading single-phase meter, three-phase meter, harvester and concentrator.Test system
System high flexible is extendible.