CN107632256A - A kind of relay stability test method, apparatus and system - Google Patents
A kind of relay stability test method, apparatus and system Download PDFInfo
- Publication number
- CN107632256A CN107632256A CN201710716625.1A CN201710716625A CN107632256A CN 107632256 A CN107632256 A CN 107632256A CN 201710716625 A CN201710716625 A CN 201710716625A CN 107632256 A CN107632256 A CN 107632256A
- Authority
- CN
- China
- Prior art keywords
- test
- relay
- port
- stability
- judges
- 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.)
- Pending
Links
Landscapes
- Testing Electric Properties And Detecting Electric Faults (AREA)
Abstract
The invention discloses a kind of relay stability test method, including:S100 receives and parses through test instruction;S200 is instructed according to the test of parsing, and switch cycles test is carried out to the port of relay;S300 obtains the test termination condition in the test instruction of parsing, judge it is current tests whether to meet test termination condition, if so, into step S400;Otherwise return to step S200 continues to test;S400 terminates to test, and judges the stability of relay, feedback test result.In addition, the invention also discloses a kind of relay stability test device and system.Relay test-device includes:Receiving module, parsing module, detection module and judging treatmenting module.Method of testing of the invention is simple, testing cost is low, practical.
Description
Technical field
The present invention relates to testing field, more particularly to a kind of relay stability test method, apparatus and system.
Background technology
Relay is a kind of electronic control device, it have control system (also known as input circuit) and by control system (again
Claim output loop), it is commonly used in automatic control circuit, it is actually to be gone to control the one of larger current with less electric current
Kind " automatic switch ".Therefore play automatically adjust in circuit, safeguard protection, the effect such as change-over circuit.Therefore the quality of relay
Quality determines the operation stability of whole test system.
Relay is widely used in each electronic product, and electronic product manufacturer is in the selection to relay, stable
Property is an important selective goal of relay.But if if not being special relay production firm, will not typically be equipped with
Special relay contact analog control system instrument, and this tester is complicated, cost is high, complex operation.
The content of the invention
In order to solve the above-mentioned technical problem, the present invention provides a kind of relay stability test method, apparatus and system, greatly
Testing cost is reduced greatly, it is easy to operate, improve testing efficiency.
The invention discloses a kind of relay stability test method, including:
S100 receives and parses through test instruction;
S200 is instructed according to the test of parsing, and switch cycles test is carried out to the port of relay;
S300 obtains the test termination condition in the test instruction of parsing, judges currently to test whether to meet test knot
Beam condition, if so, into step S400;Otherwise return to step S200 continues to test;
S400 terminates to test, and judges the stability of the relay, feedback test result.
Further, the step S200 includes:
S210 carries out switch cycles test using separate port method of testing to the port of relay;Including:
S211 determines that the relay needs to carry out all ports to be measured of separate port test;
S212 judges to whether there is port test order in the test instruction, if so, into step S213, otherwise entered
Step S214;
The circulation that S213 is singly opened port to be measured, singly closed according to the port test order in the test instruction successively
Test;
S214 randomly selects the loop test that test port is singly opened, singly closed from all ports to be measured.
Further, the step S200 includes:
S220 carries out switch cycles test using associated ports method of testing to the port of relay;Including:
S221 instructs according to the test of parsing, the circulation that all port enforcement divisions to be measured of relay are separated, partly closed
Test;
And/or
S222 is instructed according to the test of parsing, and standard-sized sheet, fully closed loop test are performed to all ports to be measured of relay.
Further, the step S300 includes:
S310 is when it is that testing time reaches default testing time to get the test condition, statistical test number;
S320 judges whether the testing time reaches default testing time, if into step S400, otherwise returns
Step S200 continues to test.
Further, the step S300 includes:
S350 judges whether test port does not perform corresponding switching manipulation according to the test instruction, if into step
S360, otherwise into step S440;
S360 statistical test numbers, judge whether the testing time reaches default testing time, if into step
S460, otherwise return to step S200 continue to test;
The step S400 includes:
S440 judges that the relay is unstable, test failure;
S460 judges that the relay is stable, test passes.
Further, the step S400 includes:
The success of S410 statistical tests or the number of test crash, obtain successfully tested rate or test failure rate;
S420 judges whether the successfully tested rate low higher than default successfully tested rate or the test failure rate
In default test failure rate, if so, into step S430, otherwise into step S440;
S430 judges whether the successfully tested rate is whether 100% or described test failure rate is 0%;If enter step
Rapid S450;Otherwise step S460 is entered;
S440 judges that the relay is unstable, test failure;
S450 judges that the relay is stable, test passes;
S460 judges that the relay stability is undetermined.
Present invention also offers a kind of relay stability test device, the device can use the relay of the present invention stable
Property method of testing, the device include:Receiving module, for receiving test instruction;Parsing module, for parsing the receiving module
The test instruction of reception;Detection module, for the test instruction parsed according to the parsing module, relay port is opened
Close loop test;Judging treatmenting module, the test termination condition in test instruction for obtaining the parsing module parsing, sentences
It is disconnected currently to test whether to meet test termination condition, if so, then terminating to test, judge the stability of the relay, feedback is surveyed
Test result, the detection module is otherwise controlled to continue to test.
Further, the detection module includes:
Separate port tests submodule, the loop test singly opened for the test port to the relay, singly closed;
And/or associated ports test submodule, for being separated to all port enforcement divisions to be measured of the relay, part pass, standard-sized sheet,
Fully closed loop test.
Further, the judging treatmenting module includes:Acquisition submodule, for obtaining the survey of the parsing module parsing
Test termination condition in examination instruction;Statistic submodule, for statistical test number;Distribution sub module, for when the acquisition
When the test condition that submodule is got is the first test condition, the processing of the first processing submodule is distributed to;Son is obtained when described
When the test condition that module is got is the second test condition, the processing of second processing submodule is distributed to;The first test knot
Beam condition is that testing time reaches default testing time;The second test termination condition is test port not according to the survey
Examination instruction performs corresponding switching manipulation or testing time reaches default testing time;First processing submodule, for according to institute
The testing time of the detection module of statistic submodule statistics is stated, judges whether the testing time reaches default test time
Number, if so, then terminate to test, obtained and be successfully tested or the number of test crash by the statistic submodule, according to the survey
Try successfully or the number of test crash judges the stability of the relay;Otherwise the detection module is controlled to continue to detect;The
Two processing submodules, for judging whether test port occurs not performing corresponding switching manipulation according to the test instruction, if
It is then to terminate to test, judges that the relay stability is unqualified;Otherwise by the statistic submodule statistical test number,
And judge whether the testing time reaches default testing time, if so, then terminating to test, judge that the relay is stable;
Otherwise the detection module is controlled to continue to detect.
The invention also discloses a kind of relay system for testing stability, including:Relay stability of the present invention
Test device, host computer, relay, power supply and some loads;The relay fills provided with the relay stability test
Put, the host computer is electrically connected with the relay by Serial Port Line;Some loads are electrically connected in the relay
Port, the power supply electrically connects with the relay;Wherein:The host computer starts test script, sends test instruction;Institute
State relay serial ports receive the test instruction after, be transferred to the stability test device, the stability test dress
Put and receive and parse through the test instruction;The relay stability test device instructs according to the test of parsing, to even
The port for connecing the relay of load carries out switch cycles test;The relay stability test device obtains the survey of parsing
Test termination condition in examination instruction, judge currently to test whether to meet test termination condition, if so, then terminating to test, judge
The stability of the relay, to the host computer feedback test result;Otherwise continue to test.
During the present invention is mainly suitable for from relay, the stability of relay is tested.Relay is mainly realized
Be switch function, can accurately detect the stabilization of relay by carrying out switch cycles test to the port of relay
Property.And the setting of termination condition, it can make it that to be not necessarily intended to all that relay can just be judged by having performed all testing experiments
Stability, save the time of test.In addition, method of testing of the present invention is simple, testing cost is low, practical.And this hair
Bright separate port is tested, associated ports test the test that can have been carried out to the port of relay in all directions, and test is more smart
Accurate comprehensive, test result can more reflect the practical stability implementations of the relay.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment
Accompanying drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this
For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these accompanying drawings
His accompanying drawing.
Fig. 1 is a kind of flow chart of relay stability test embodiment of the method for the present invention;
Fig. 2 is a kind of flow chart of another embodiment of relay stability test method of the present invention;
Fig. 3 is a kind of flow chart of another embodiment of relay stability test method of the present invention;
Fig. 4 is a kind of flow chart of another embodiment of relay stability test method of the present invention;
Fig. 5 is a kind of flow chart of another embodiment of relay stability test method of the present invention;
Fig. 6 is a kind of flow chart of another embodiment of relay stability test method of the present invention;
Fig. 7 is a kind of block diagram of relay stability test device embodiment of the present invention;
Fig. 8 is a kind of block diagram of another embodiment of relay stability test device of the present invention;
Fig. 9 is a kind of schematic diagram of relay system for testing stability embodiment of the present invention;
Figure 10 is a kind of test flow chart of relay system for testing stability embodiment of the present invention.
Embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, the present invention is made below in conjunction with accompanying drawing into
One step it is described in detail, it is clear that the described embodiment only a part of embodiment of the present invention, rather than whole implementation
Example.Based on the embodiment in the present invention, what those of ordinary skill in the art were obtained under the premise of creative work is not made
All other embodiment, belongs to the scope of protection of the invention.
The invention discloses a kind of relay stability test method, embodiment as shown in figure 1, including:
S100 receives and parses through test instruction;
S200 is instructed according to the test of parsing, and switch cycles test is carried out to the port of relay;
S300 obtains the test termination condition in the test instruction of parsing, judges currently to test whether to meet test knot
Beam condition, if so, into step S400;Otherwise return to step S200 continues to test;
S400 terminates to test, and judges the stability of the relay, feedback test result.
The stability of relay is tested, mainly judges whether the port of relay can be anti-according to test instruction
The multiple correct operation for performing on or off (adhesive/release).
Another embodiment of the inventive method, add ends of the step S200 using separate port method of testing to relay
Mouth carries out switch cycles test;The step S200 includes step S211--S214;Specifically, as shown in Fig. 2 including:
S100 receives and parses through test instruction;
S211 determines that the relay needs to carry out all ports to be measured of separate port test;
S212 judges to whether there is port test order in the test instruction, if so, into step S213, otherwise entered
Step S214;
The circulation that S213 is singly opened port to be measured, singly closed according to the port test order in the test instruction successively
Test;
S214 randomly selects the loop test that test port is singly opened, singly closed from all ports to be measured.
S300 obtains the test termination condition in the test instruction of parsing, judges currently to test whether to meet test knot
Beam condition, if so, into step S400;Otherwise return to step S200 continues to test;
S400 terminates to test, and judges the stability of the relay, feedback test result.
Separate port method of testing also has many specific forms, for example relay has 4 ports, and port to be measured is also end
Mouth 1-4;According to testing sequence first test port 1, port 1 can so be allowed to perform switching manipulation 500 times repeatedly, then surveyed again
Port 2 is tried, allows port 2 to perform switching manipulation 500 times repeatedly, same re-test port 3 performs switching manipulation 500 times, finally
Test port 4, it is allowed to perform switching manipulation 500 times.It is of course also possible to port 1 is first allowed to perform switching manipulation 1 time;Then end is allowed
Mouth 2 performs switching manipulation 1 time, then allows port 3 to perform switching manipulation 1 time, then allows port 4 to perform switching manipulation 1 time;Complete
One cycle, then again return to the progress switching manipulation of port 1 and continue to circulate, so repeatedly, until completing to follow for 500 times
Terminate test after ring.After test terminates, number of success, the frequency of failure of port test are obtained, such as, it is desirable to higher factory
Business, if the frequency of failure can be set more than or equal to 1, then it is unstable to be judged as the relay, test failure, while also may be used
To obtain test failure rate or successfully tested rate, by the test data of the relay test to sampling, the batch relay is judged
The quality of device.Certainly, if port to be measured is 1,3,4, can also equally measure successively in this way.If the survey set
Examination termination condition is to terminate when there is the test of test crash, then in test process, such as the of test port 1
During 401 switch testings, if be successfully tested, then continue to carry out the 402nd switch testing to port 1, if test crash,
So test terminates, and judges that the relay is unstable, test failure.
Another form of separate port method of testing is that a port is randomly choosed from port to be measured to carry out list
The test open, singly closed.It is of course also possible to some port is specified to be tested (in general, it is possible to specify port 1 is carried out
Test).If randomly choosing test port, due to randomness, then test also can be relatively more accurate and just, meanwhile, lead to
Random test is crossed, and necessarily needs all to be tested all of the port, it might even be possible to only selects one of port to carry out
Test, the stability of relay is judged by the test data of the port.
Another embodiment of the present invention, on the basis of any of the above-described embodiment, using associated ports method of testing to after
The port of electrical equipment carries out switch cycles test, specifically, as shown in figure 3, including:
S100 receives and parses through test instruction;
S221 instructs according to the test of parsing, the circulation that all port enforcement divisions to be measured of relay are separated, partly closed
Test;
S222 is instructed according to the test of parsing, and standard-sized sheet, fully closed loop test are performed to all ports to be measured of relay.
S300 obtains the test termination condition in the test instruction of parsing, judges currently to test whether to meet test knot
Beam condition, if so, into step S400;Otherwise return to step S200 continues to test;
S400 terminates to test, and judges the stability of the relay, feedback test result.
In above-described embodiment, the port enforcement division to be measured of relay is separated, part is closed loop test, for example, after
Electrical equipment has port 1-8;For example the test instruction parsed is 10010010, it is assumed that 1 is opens, and 0 is closes, then is to open end
Mouth 1, port 4 and port 7, close port 2, port 3, port 5, port 6 and port 8;So instructed according to test, performed repeatedly
The loop test that portion is separated, part is closed.
In above-described embodiment, the port to be measured of relay performs standard-sized sheet, fully closed loop test;For example, relay is treated
It is port 1-8 to survey port, makes the port 1-8 of relay fully open, then allows relay port 1-8 Close Alls, returns again to and allows
The port 1-8 of relay is fully open ..., and so circulation is tested.
In above-described embodiment step S221 and step S222 in no particular order order.In addition, for above-mentioned steps S221 and step
Rapid S222 only selection can perform one of which step, that is to say, that can a carry out portion is separated, part is closed loop test,
The stability of relay is judged further according to test result;Standard-sized sheet, fully closed loop test can also be only carried out, is tied further according to test
Fruit judges the stability of relay.
Another embodiment of the inventive method, on the basis of any of the above-described embodiment, the actual conditions for testing end is
Testing time reaches default testing time, specifically, as shown in figure 4, including:
S100 receives and parses through test instruction;
S200 is instructed according to the test of parsing, and switch cycles test is carried out to the port of relay;
S310 is when it is that testing time reaches default testing time to get the test condition, statistical test number;
S320 judges whether the testing time reaches default testing time, if into step S400, otherwise returns
Step S200 continues to test;
S400 terminates to test, and judges the stability of the relay, feedback test result.
In the present embodiment, the condition for testing end is that testing time reaches default testing time, for example the instruction tested is
Only the port 1 of relay is tested 1000 times, then during execution, switch testing need to be carried out to port 1 repeatedly, and each
Perform after port 1 opens or closes, be superimposed testing time, and record each test result and (be successfully tested or test mistake
Lose), stop test after testing time has reached 1000 times, then judge according to number or test crash number is successfully tested
The stability of relay.
Another embodiment of the present invention, when there is test port not according to test instruction progress respective switch operation, survey
Examination stop, specifically, as shown in figure 5, including:
S100 receives and parses through test instruction;
S200 is instructed according to the test of parsing, and switch cycles test is carried out to the port of relay;
S350 judges whether test port does not perform corresponding switching manipulation according to the test instruction, if into step
S360, otherwise into step S440;
S360 statistical test numbers, judge whether the testing time reaches default testing time, if into step
S460, otherwise return to step S200 continue to test;
S440 judges that the relay is unstable, test failure;
S460 judges that the relay is stable, test passes.
In the present embodiment, if when carrying out switch cycles test to relay port, once there is a test crash
Situation, then test will stop, then judge relay it is unstable, test failure;If each switch testing is all
It is successfully tested, until testing time has reached default testing time, for example default testing time is 500 times, test 500
The secondary situation for test crash all do not occur, then decide that relay is stable, test passes;If test is to the 450th time
When, there is test crash, then just terminate to test, judge that the stability of relay is unqualified.The present embodiment be applied to after
The very high situation of the stability of electrical equipment, because, as long as once the situation of test crash decides that relay is unstable.
Another embodiment of the inventive method, as shown in fig. 6, including:
S100 receives and parses through test instruction;
S200 is instructed according to the test of parsing, and switch cycles test is carried out to the port of relay;
S310 is when it is that testing time reaches default testing time to get the test condition, statistical test number;
S320 judges whether the testing time reaches default testing time, if into step S410, otherwise returns
Step S200 continues to test;
The success of S410 statistical tests or the number of test crash, obtain successfully tested rate or test failure rate;
S420 judges whether the successfully tested rate low higher than default successfully tested rate or the test failure rate
In default test failure rate, if so, into step S430, otherwise into step S440;
S430 judges whether the successfully tested rate is whether 100% or described test failure rate is 0%;If enter step
Rapid S450;Otherwise step S460 is entered;
S440 judges that the relay is unstable, test failure;
S450 judges that the relay is stable, test passes;
S460 judges that the relay stability is undetermined.
In the present embodiment, the stability of relay is judged according to successfully tested rate or test failure rate.Successfully tested rate
It is determined as stabilization for 100% relay, test is also qualified.Stablize relay undetermined for relay, can be with
Pick out, judged subsequently through other methods.
Or if default success rate is very high, default success rate can also be up to but be not reaching to 100%
Relay is determined as stable relay.In view of accidentalia is likely to occur in test process causes test crash, can allow
There is the situation of test crash several times.Default successfully tested rate or default test failure rate can be wanted according to relay
The height asked is set, and the successfully tested rate of setting is higher or the test failure rate of setting is lower, then to relay
Stability requirement is also higher.For example the testing time of setting is 1000 times, default successfully tested rate is 99.8%, then
That is after having carried out the test of 1000 switch cycles, 2 test crash can only at most be present, at 2 times and within
Relay in test crash situation all can be considered stable relay.
Based on identical technical concept, present invention also offers a kind of relay stability test device, the device can be adopted
With the present invention relay stability test embodiment of the method, specifically, as shown in fig. 7, the device includes:Receiving module 10,
For receiving test instruction;Parsing module 20, the test instruction received for parsing the receiving module 10;Detection module 30,
For the test instruction parsed according to the parsing module 20, switch cycles test is carried out to relay port;Judge processing mould
Block 40, the test termination condition in the test instruction parsed for obtaining the parsing module 20, judgement currently tests whether full
Foot test termination condition, if so, then terminating to test, judges the stability of the relay, feedback test result, otherwise controls institute
Detection module 30 is stated to continue to test.
Another embodiment of apparatus of the present invention, as shown in figure 8, on the basis of said apparatus embodiment, the detection mould
Block 30 includes:Separate port tests submodule 31, and the circulation singly opened for the test port to the relay, singly closed is surveyed
Examination;And/or associated ports test submodule 32, separately, partly closed for all port enforcement divisions to be measured to the relay,
Standard-sized sheet, fully closed loop test.
The present embodiment includes three kinds of specific schemes, one kind be detection module only include separate port test submodule,
One kind is that detection module has only included associated ports test submodule;Also a kind of scheme is that detection module includes associated ports
Test submodule and separate port test submodule.In the test device of the present invention, after receiving module receives test instruction, solution
Analysis module parses test instruction;In the first scheme, separate port is tested submodule and instructed according to the test of parsing, to relay
The loop test that the port of device is singly opened, singly closed.For example relay has 4 ports, wherein only port 1 needs to test,
That is the stability of relay is only decided that by test port 1.So submodule just is tested to port 1 using separate port
The loop test of open and close is performed repeatedly, judges whether the port 1 has carried out corresponding open and close operation according to test instruction and (inhaled
Conjunction/release).It is of course also possible to test port is chosen from these relay ports at random to carry out test judgement.If relay
4 ports of device are all ports to be measured, then, it is necessary to one by one when test using separate port test submodule
Port is tested, that is to say, that each time switch testing can only be directed to single a port.Such as each port test
500 times, then it can first survey port 1 and test 500 times, the test of re-test port 2 500 times, by that analogy.It is of course also possible to first
Survey port 1 to test 1 time, then survey port 2 and test 1 time, then survey port 3 and test 1 time, then survey port 4 and test 1 time, be then back to
1 re-test of test port 1 time, in this way, allowing each port to test 500 times.In second scheme, include again:Associated ports are surveyed
Swab module instructs according to the test of parsing, the loop test that the port carry out portion of relay is separated, partly closed, or carries out
Standard-sized sheet, fully closed loop test or carry out portion separate, part pass, standard-sized sheet, fully closed loop test.Portion is separated, part is closed,
Standard-sized sheet, fully closed loop test for details, reference can be made to the explanation of embodiment of the method above, be not repeated herein.The third scheme
In, because detection module includes separate port test submodule and associated ports test submodule, therefore, in test process
In, that is, include the loop test that separate port test submodule is singly opened, singly closed to the port to be measured of relay, include again
Associated ports test submodule is to the carry out portion in port to be measured of relay is separated, part is closed or standard-sized sheet, fully closed circulation are surveyed
Examination.Stability when each port works independently so both had been tested, have detected stability when several ports work together again,
Detection is more fully.
Preferably, as shown in figure 8, the judging treatmenting module includes:Acquisition submodule 41, for obtaining the parsing mould
Test termination condition in the test instruction of block parsing;Statistic submodule 42, for statistical test number;Distribution sub module 43,
When test condition for being got when the acquisition submodule 41 is the first test condition, the first processing submodule 44 is distributed to
Processing;When the test condition that the acquisition submodule 41 is got is the second test condition, second processing submodule is distributed to
45 processing;The first test termination condition is that testing time reaches default testing time;The second test termination condition
Corresponding switching manipulation is not performed for test port according to the test instruction or testing time reaches default testing time;First
Submodule 44 is handled, for the testing time of the detection module 30 counted according to the statistic submodule 42, described in judgement
Whether testing time reaches default testing time, if so, then terminate to test, by the statistic submodule 42 obtain test into
The number of work(or test crash, it is successfully tested or the number of test crash judges the stability of the relay according to described;It is no
The detection module 30 is then controlled to continue to detect;Second processing submodule 45, for judge test port whether occur not according to
The test instruction performs corresponding switching manipulation, if so, then terminating to test, judges that the relay stability is unqualified;It is no
Then by the statistical test number of statistic submodule 42, and judge whether the testing time reaches default testing time,
If so, then terminating to test, judge that the relay is stable;Otherwise the detection module 30 is controlled to continue to detect.
The device embodiment of the present invention is corresponding with the embodiment of the method for the present invention, therefore, embodiment of the method for the invention
Ins and outs are equally applicable to the device embodiment of the present invention, are repeated to reduce, and are not chatted superfluous.
The invention also discloses a kind of relay system for testing stability, including:Relay stability of the present invention
Test device, host computer, relay, power supply and some loads;The relay fills provided with the relay stability test
Put, the host computer is electrically connected with the relay by Serial Port Line;Some loads are electrically connected in the relay
Port, the power supply electrically connects with the relay;Wherein:The host computer starts test script, sends test instruction;Institute
State relay serial ports receive the test instruction after, be transferred to the stability test device, the stability test dress
Put and receive and parse through the test instruction;The relay stability test device instructs according to the test of parsing, to even
The port for connecing the relay of load carries out switch cycles test;The relay stability test device obtains the survey of parsing
Test termination condition in examination instruction, judge currently to test whether to meet test termination condition, if so, then terminating to test, judge
The stability of the relay, to the host computer feedback test result;Otherwise continue to test.
Preferably, in above-mentioned test system, shown Serial Port Line is that RS485 or RS232 turns USB Serial Port Lines;It is described some negative
Carry as some inductive loads.Because relay switch moment surge current can be very big, therefore use inductive load more preferable, and usual family
The electronic products such as electrical appliance belong to inductive load, and therefore, the system is also more nearly using inductive load and really uses ring
Border, it is more accurate to the stability test of relay.
Another embodiment of present system, including:
First, test environment topological structure, specifically, test structure schematic diagram is as shown in Figure 9.
1, test equipment:
Computer (desktop computer, notebook can) with USB interface
RS232 turns USB Serial Port Lines one
2, test software:
Computer operating system win732/64 positions
The versions of Python 2.7
PySerial storehouses (library module of python Script controlling computer serial ports)
JAVA
Two, test philosophy:
By python script recursive call relay module port switch act, record cycle-index and statistics PASS and
FAIL number, to investigate the reliability requirement whether relay module meets aging of product test.It is defeated in relay during test
Exit port loads inductive load, and relay switch moment surge current can be very big when generally loading inductive load, steady to relay
Qualitative requirement is higher (electronic product such as usual household electrical appliance belongs to inductive load).And typically loaded during the test of relay manufacturer
Resistive load, and relay practical service environment have deviation.As long as the relay module controlled by RS232 or RS485 is all
It can be tested by the method.
Three, test flow chart:Testing process is as shown in Figure 10.
Four, test script:
The test system of the present invention uses the method for testing of the present invention, realizes the stability test of relay;Implementation method
Simply, testing cost is low, practical.For example router producer can be used as road by the present invention from stable relay
By the relay used on device.
The system embodiment of the present invention, the device embodiment, embodiment of the method with the present invention are corresponding, therefore the side of the present invention
Method embodiment ins and outs are equally applicable to the system embodiment of the present invention, are repeated to reduce, no longer superfluous to chat.Although have been described for
The preferred embodiments of the present invention, but those skilled in the art once know basic creative concept, then can be to these realities
Apply example and make other change and modification.So appended claims are intended to be construed to include preferred embodiment and fall into this
Invention scope has altered and changed.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention
God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising including these changes and modification.
Claims (10)
- A kind of 1. relay stability test method, it is characterised in that including:S100 receives and parses through test instruction;S200 is instructed according to the test of parsing, and switch cycles test is carried out to the port of relay;S300 obtains the test termination condition in the test instruction of parsing, judges currently to test whether to meet that test terminates bar Part, if so, into step S400;Otherwise return to step S200 continues to test;S400 terminates to test, and judges the stability of the relay, feedback test result.
- A kind of 2. relay stability test method according to claim 1, it is characterised in that the step S200 bags Include:S210 carries out switch cycles test using separate port method of testing to the port of relay;Including:S211 determines that the relay needs to carry out all ports to be measured of separate port test;S212 judges to whether there is port test order in the test instruction, if so, into step S213, otherwise into step S214;The circulation survey that S213 is singly opened port to be measured, singly closed successively according to the port test order in the test instruction Examination;S214 randomly selects the loop test that test port is singly opened, singly closed from all ports to be measured.
- A kind of 3. relay stability test method according to claim 1 or 2, it is characterised in that the step S200 Including:S220 carries out switch cycles test using associated ports method of testing to the port of relay;Including:S221 instructs according to the test of parsing, the loop test that all port enforcement divisions to be measured of relay are separated, partly closed;And/orS222 is instructed according to the test of parsing, and standard-sized sheet, fully closed loop test are performed to all ports to be measured of relay.
- A kind of 4. relay stability test method according to claim 1, it is characterised in that the step S300 bags Include:S310 is when it is that testing time reaches default testing time to get the test condition, statistical test number;S320 judges whether the testing time reaches default testing time, if into step S400, otherwise return to step S200 continues to test.
- A kind of 5. relay stability test method according to claim 1, it is characterised in that the step S300 bags Include:S350 judges whether test port does not perform corresponding switching manipulation according to the test instruction, if into step S360, otherwise into step S440;S360 statistical test numbers, judge whether the testing time reaches default testing time, if into step S460, Otherwise return to step S200 continues to test;The step S400 includes:S440 judges that the relay is unstable, test failure;S460 judges that the relay is stable, test passes.
- A kind of 6. relay stability test method according to claim 4, it is characterised in that the step S400 bags Include:The success of S410 statistical tests or the number of test crash, obtain successfully tested rate or test failure rate;It is pre- that S420 judges whether the successfully tested rate be less than higher than default successfully tested rate or the test failure rate If test failure rate, if so, into step S430, otherwise into step S440;S430 judges whether the successfully tested rate is whether 100% or described test failure rate is 0%;If into step S450;Otherwise step S460 is entered;S440 judges that the relay is unstable, test failure;S450 judges that the relay is stable, test passes;S460 judges that the relay stability is undetermined.
- 7. the relay stability of a kind of relay stability test method in 1-6 with claim described in any one is surveyed Trial assembly is put, it is characterised in that including:Receiving module, for receiving test instruction;Parsing module, the test instruction received for parsing the receiving module;Detection module, for the test instruction parsed according to the parsing module, switch cycles test is carried out to relay port;Judging treatmenting module, the test termination condition in test instruction for obtaining the parsing module parsing, judges current Test whether to meet test termination condition, if so, then terminate to test, judge the stability of the relay, feedback test result, Otherwise the detection module is controlled to continue to test.
- A kind of 8. relay stability test device according to claim 7, it is characterised in that the detection module bag Include:Separate port tests submodule, the loop test singly opened for the test port to the relay, singly closed;And/orAssociated ports test submodule, for being separated to all port enforcement divisions to be measured of the relay, part pass, standard-sized sheet, Fully closed loop test.
- A kind of 9. relay stability test device according to claim 7 or 8, it is characterised in that the judgement processing Module includes:Acquisition submodule, the test termination condition in test instruction for obtaining the parsing module parsing;Statistic submodule, for statistical test number;Distribution sub module, when the test condition for being got when the acquisition submodule is the first test condition, distribute to One processing submodule processing;When the test condition that the acquisition submodule is got is the second test condition, second is distributed to Handle submodule processing;The first test termination condition is that testing time reaches default testing time;Second test Termination condition is that test port does not perform corresponding switching manipulation according to the test instruction or testing time reaches default test Number;The first processing submodule, for the testing time of the detection module counted according to the statistic submodule, sentences Whether the testing time that breaks reaches default testing time, if so, then terminating to test, is obtained and surveyed by the statistic submodule Try successfully or test crash number, be successfully tested or the number of test crash judges the stabilization of the relay according to described Property;Otherwise the detection module is controlled to continue to detect;The second processing submodule, opened accordingly for judging whether test port occurs not performing according to the test instruction Operation is closed, if so, then terminating to test, judges that the relay stability is unqualified;Otherwise counted by the statistic submodule Testing time, and judge whether the testing time reaches default testing time, if so, then terminate to test, judge it is described after Electrical equipment is stable;Otherwise the detection module is controlled to continue to detect.
- 10. a kind of relay system for testing stability, it is characterised in that including the relay any one of claim 7-9 Device stability test device, host computer, relay, power supply and some loads;The relay is stable provided with the relay System safety testing device, the host computer are electrically connected with the relay by Serial Port Line;Some loads are electrically connected in institute The port of relay is stated, the power supply electrically connects with the relay;Wherein:The host computer starts test script, sends test instruction;After the serial ports of the relay receives the test instruction, the stability test device, the stability are transferred to Test device receives and parses through the test instruction;The relay stability test device instructs according to the test of parsing, and the port of the relay of connection load is entered Row switch cycles are tested;The relay stability test device obtains the test termination condition in the test instruction of parsing, judges current survey Whether examination meets test termination condition, if so, then terminating to test, judges the stability of the relay, anti-to the host computer Present test result;Otherwise continue to test.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710716625.1A CN107632256A (en) | 2017-08-21 | 2017-08-21 | A kind of relay stability test method, apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710716625.1A CN107632256A (en) | 2017-08-21 | 2017-08-21 | A kind of relay stability test method, apparatus and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107632256A true CN107632256A (en) | 2018-01-26 |
Family
ID=61101247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710716625.1A Pending CN107632256A (en) | 2017-08-21 | 2017-08-21 | A kind of relay stability test method, apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107632256A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112260886A (en) * | 2020-09-22 | 2021-01-22 | 武汉思普崚技术有限公司 | Firewall equipment stability testing method, storage medium and system |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS56130666A (en) * | 1980-03-19 | 1981-10-13 | Hitachi Ltd | Life testing device for reed relay |
JPS57199963A (en) * | 1981-06-03 | 1982-12-08 | Hitachi Ltd | Testing method for relay |
CN201689160U (en) * | 2010-05-20 | 2010-12-29 | 湖北前沿科技有限公司 | Portable comprehensive parameter tester of relay |
CN102055597A (en) * | 2009-11-03 | 2011-05-11 | 中兴通讯股份有限公司 | Stability test platform and method |
CN102540071A (en) * | 2012-02-15 | 2012-07-04 | 合肥美的荣事达电冰箱有限公司 | Relay device and relay life test device |
CN102565461A (en) * | 2012-02-29 | 2012-07-11 | 哈尔滨工业大学 | Real-time on-off times recording device for relay in matrix switch module and method for realizing on-off times recording by employing same |
CN103064020A (en) * | 2013-01-08 | 2013-04-24 | 河北工业大学 | Electromagnetic relay reliability testing device and operation method thereof |
CN103344913A (en) * | 2013-07-30 | 2013-10-09 | 中国人民解放军第二炮兵装备研究院第三研究所 | Electromagnetic relay testing equipment and method |
CN104866418A (en) * | 2014-02-26 | 2015-08-26 | 研祥智能科技股份有限公司 | Automatic testing method and system |
CN105629165A (en) * | 2016-03-09 | 2016-06-01 | 江苏永发医用设备有限公司 | System and method of testing relay and solenoid valve |
CN105938453A (en) * | 2016-04-14 | 2016-09-14 | 上海斐讯数据通信技术有限公司 | Automatic test method and system |
CN206411199U (en) * | 2016-11-16 | 2017-08-15 | 上海移为通信技术股份有限公司 | Electronic equipment machine ageing tester |
-
2017
- 2017-08-21 CN CN201710716625.1A patent/CN107632256A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS56130666A (en) * | 1980-03-19 | 1981-10-13 | Hitachi Ltd | Life testing device for reed relay |
JPS57199963A (en) * | 1981-06-03 | 1982-12-08 | Hitachi Ltd | Testing method for relay |
CN102055597A (en) * | 2009-11-03 | 2011-05-11 | 中兴通讯股份有限公司 | Stability test platform and method |
CN201689160U (en) * | 2010-05-20 | 2010-12-29 | 湖北前沿科技有限公司 | Portable comprehensive parameter tester of relay |
CN102540071A (en) * | 2012-02-15 | 2012-07-04 | 合肥美的荣事达电冰箱有限公司 | Relay device and relay life test device |
CN102565461A (en) * | 2012-02-29 | 2012-07-11 | 哈尔滨工业大学 | Real-time on-off times recording device for relay in matrix switch module and method for realizing on-off times recording by employing same |
CN103064020A (en) * | 2013-01-08 | 2013-04-24 | 河北工业大学 | Electromagnetic relay reliability testing device and operation method thereof |
CN103344913A (en) * | 2013-07-30 | 2013-10-09 | 中国人民解放军第二炮兵装备研究院第三研究所 | Electromagnetic relay testing equipment and method |
CN104866418A (en) * | 2014-02-26 | 2015-08-26 | 研祥智能科技股份有限公司 | Automatic testing method and system |
CN105629165A (en) * | 2016-03-09 | 2016-06-01 | 江苏永发医用设备有限公司 | System and method of testing relay and solenoid valve |
CN105938453A (en) * | 2016-04-14 | 2016-09-14 | 上海斐讯数据通信技术有限公司 | Automatic test method and system |
CN206411199U (en) * | 2016-11-16 | 2017-08-15 | 上海移为通信技术股份有限公司 | Electronic equipment machine ageing tester |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112260886A (en) * | 2020-09-22 | 2021-01-22 | 武汉思普崚技术有限公司 | Firewall equipment stability testing method, storage medium and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110716126A (en) | Chip aging test system, method and device | |
US20040239359A1 (en) | Device test apparatus and test method | |
CN109885499B (en) | Robot automatic test system and test method | |
CN108184247A (en) | Communication means, device, communication equipment and readable storage medium storing program for executing | |
CN108712300A (en) | A kind of automated testing method and system of smart machine distribution | |
CN101930030A (en) | Test system and method of characteristic impedance of electronic signal wires | |
CN104811524B (en) | A kind of terminal radio frequency performance test methods and its device | |
CN108897647B (en) | Test system, test method and device | |
CN108092913A (en) | A kind of method and the multi-core CPU network equipment of message shunting | |
CN113255271B (en) | Automatic verification system and method for IO pin of chip | |
CN104639264B (en) | A kind of base station method of testing, apparatus and system | |
CN112255562B (en) | System and method for testing performance of direct-current power supply board card | |
CN106888060A (en) | The anti-interference method of testing and system of wireless communication module | |
CN107453934A (en) | A kind of method of testing, apparatus and system | |
CN105873041A (en) | Automatic WiFi connecting method and device as well as mobile terminal | |
CN107632256A (en) | A kind of relay stability test method, apparatus and system | |
CN106105101B (en) | For the system and method by testing RF transceiver via interruption control testing process is caused | |
CN101084444A (en) | Pin electronics with high voltage functionality | |
CN108009059A (en) | The USB function detecting methods and system of a kind of router | |
CN110596500A (en) | Intelligent test management platform and management method for relay protection device and electronic equipment | |
CN201607507U (en) | Intelligent backboard test system | |
CN104125593B (en) | A kind of information processing method and electronic equipment | |
CN113225760A (en) | Network testing method and equipment | |
US7111216B2 (en) | Scan controller and integrated circuit including such a controller | |
CN116449178A (en) | Automobile electronic main control chip test method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20201104 Address after: 318015 no.2-3167, zone a, Nonggang City, no.2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province Applicant after: Taizhou Jiji Intellectual Property Operation Co.,Ltd. Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666 Applicant before: Phicomm (Shanghai) Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180126 |