Background technology
The quality of power supply is not only related to the safety and economic operation of electrical network, also has influence on the normal work of big and small electric load.Along with the development of modern industrial technology, it is day by day complicated that electric network composition also becomes; Meanwhile, many power sensitive equipment is applied to producing, and these equipment require high, new power quality problem following to power quality.Detect ammeter at the scene under various rugged surroundings whether normally work be very important, traditional detection is manually to go test by artificial, but huge some test of workload is impossible realization like this.
Python is a kind of object-oriented, explanation type computer programming language, the advantage of Python has: simple, easy to learn, speed is fast, portability, object-oriented, expansibility, can embeddability and have the abundant advantages such as storehouse, if can utilize the powerful function foundation table meter automatically testing platform of Python script to complete white-box testing, the test of grey box, Black-box Testing lamp, all standing platform tools function that can each class testing of innovation realization software and hardware, creates the ammeter that performance is more excellent.
Summary of the invention
For deficiency of the prior art, the invention provides a kind of Python script his-and-hers watches meter automatically testing platform and method of testing.
The present invention is achieved through the following technical solutions: the table meter automatically testing platform based on Python script, comprises automatically testing platform experimental provision, PC, communication interface, communication network, single-phase meter, three-phase meter, collector and concentrator, described automatically testing platform experimental provision comprises that ammeter operating voltage falls, high-voltage pulse group device, surge module, EMC device, radio-frequency generator, high-low temperature chamber, controllable load case and voltage switching controls module, current switching control module, described voltage handover module can be single-phase meter, three-phase meter, collector and concentrator provide fluctuation and the impact of operating voltage simulated field low voltage electric network, and described current switching module can be single-phase meter, three-phase meter, collector and concentrator provide away word current, and the automatic testing software of exploitation operates in described PC, design automatic testing scheme by described communication interface, control the experiment parameter of described automatically testing platform experimental provision with Python script, occurrence time and all operations experiment, described PC and described interconnection of telecommunication network, the automatic testing scheme of described PC operation Python script design arranges concentrator by communication network, all kinds of ammeter operational factors of collector and copy reading single-phase meter, three-phase meter, the Various types of data of collector and concentrator.Test macro high flexible is extendible.
Method of testing is divided into load record functional test and error-logic is inferred method Reliability Synthesis experimental program and two parts of testing procedure: described load record functional test and error-logic infer that method Reliability Synthesis experimental program is as follows: functional test: load record pattern-word is set and is set to entirely start each data item, load record initial time is set to current time, the time interval is set to 1 minute, allow ammeter everywhere in maximal work situation, revise ammeter clock, the record that makes ammeter produce user's technical conditions defined within the shortest time is counted, then copy reading load record data, detect the integrality of ammeter keeping records data.
Error-logic supposition method test: load record pattern-word is set and is set to illegal parameter, see ammeter reaction and the function realizing; Load record initial time is set to the illegal time, and the time interval deliberately arranges very close, makes it to be less than minimum interval etc.; 1st ~ 6 type load logging interval set of time illegal value; In above-mentioned load record pattern-word, load record initial time, 1 ~ 2 data arranges normally, and other arranges illogical, and 1st ~ 6 type load logging interval times and load record initial time normally arrange.
Described testing procedure is as follows: the first step: by scheme, describe design test scheme, utilize the described testing scheme of python language compilation; Second step: detect ammeter error; The 3rd step, is arranged on surveyed electric energy meter to have good luck on testing table; The 4th step: start single three-phase drop test platform; The 5th step, imports to software library the testing scheme writing, and opens Python intelligent meter automatization test system; The 5th step: select ammeter to be detected after entering automatic testing software; The 6th step: start test, assured plan normally moves several cycles; The 7th step: after test finishes, preserve test data and do initial analysis, tested rear repairing experiment equipment, by testing tool power-off, ammeter is removed, instrument playback, put neatly, in order to using next time, arrange experimental data and the record of derivation, and fill in test report, use-case scheme and experimental data are tested in filing.
The beneficial effect that the present invention has is: test macro high flexible is extendible, reduce artificial erroneous judgement and reperformance test work, never tired, make full use of the quitting time, improve inspection table efficiency, can carry out a large amount of test that manually cannot complete, protocol command can independent assortment, testing apparatus can be controlled at random flexibly, can carry out polytype table instrumentation examination, and output can realize robotization by Python script.The scene that can construction table meter acquisition terminal may break down under special service condition, simulate again field failure phenomenon and retain ammeter at that time duty carry out principle analysis.The present invention has very significant advantage, can simulate the situation of the illegal work that may occur in the work of multiple table meter, the record of data and analysis can draw best solution by experiment, have boundless development space, have very significantly beneficial effect.
Embodiment
Below in conjunction with accompanying drawing, specific works principle of the present invention is described: with reference to accompanying drawing 1, the table meter automatically testing platform based on Python script, comprises automatically testing platform experimental provision, PC, communication interface, communication network, single-phase meter, three-phase meter, collector and concentrator, described automatically testing platform experimental provision comprises ammeter operating voltage falling device, high-voltage pulse group device, surge module, EMC device, radio-frequency generator, high-low temperature chamber, controllable load case and voltage switching controls module, current switching control module, described voltage handover module can be single-phase meter, three-phase meter, collector and concentrator provide fluctuation and the impact of operating voltage simulated field low voltage electric network, and described current switching module can be single-phase meter, three-phase meter, collector and concentrator provide away word current, and the automatic testing software of exploitation operates in described PC, design automatic testing scheme by described communication interface, control the experiment parameter of described automatically testing platform experimental provision with Python script, occurrence time and all operations experiment, described PC and described interconnection of telecommunication network, the automatic testing scheme of described PC operation Python script design arranges concentrator by communication network, all kinds of ammeter operational factors of collector and copy reading single-phase meter, three-phase meter, the Various types of data of collector and concentrator.Test macro high flexible is extendible.