CN102323543B - Virtual instrument-based temperature controlled switch testing method - Google Patents
Virtual instrument-based temperature controlled switch testing method Download PDFInfo
- Publication number
- CN102323543B CN102323543B CN 201110157879 CN201110157879A CN102323543B CN 102323543 B CN102323543 B CN 102323543B CN 201110157879 CN201110157879 CN 201110157879 CN 201110157879 A CN201110157879 A CN 201110157879A CN 102323543 B CN102323543 B CN 102323543B
- Authority
- CN
- China
- Prior art keywords
- temperature
- industrial computer
- data acquisition
- program module
- test
- 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.)
- Expired - Fee Related
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 145
- 238000001514 detection method Methods 0.000 claims abstract description 36
- 239000011159 matrix material Substances 0.000 claims abstract description 33
- 230000033228 biological regulation Effects 0.000 claims abstract description 11
- 238000011084 recovery Methods 0.000 claims description 31
- 238000000034 method Methods 0.000 claims description 29
- 230000004087 circulation Effects 0.000 claims description 15
- 238000012797 qualification Methods 0.000 claims description 7
- 230000002950 deficient Effects 0.000 claims description 6
- 230000008859 change Effects 0.000 claims description 5
- 238000009434 installation Methods 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 abstract description 4
- 230000001105 regulatory effect Effects 0.000 abstract 2
- 238000005259 measurement Methods 0.000 abstract 1
- 238000005070 sampling Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 6
- 230000001012 protector Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 5
- 238000004519 manufacturing process Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000000903 blocking effect Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 239000011800 void material Substances 0.000 description 3
- 238000007405 data analysis Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Testing Or Calibration Of Command Recording Devices (AREA)
Abstract
The invention discloses a virtual instrument-based temperature controlled switch testing method which comprises the following steps: A. installing a test software in a program storage medium of an industrial personal computer through an installation program; B. accessing a tested product into a matrix detection circuit and putting in a temperature regulating bin; C. starting a testing system to work, initializing a test parameter setting program module, reading set detection reference parameters; and initializing a multifunction data acquisition card; D. starting detection, initializing data record, setting detection timing, enabling the industrial personal computer to time share through the multifunction data acquisition card, repeating to read A/D collection line signals; setting temperature detection timing, enabling the industrial personal computer to time-share and collect measurement values of a temperature sensor, opening a monitoring window; setting line scan timing, enabling the industrial personal computer to time share, repeating to send scanning signals; E. sampling the temperature of the temperature regulating bin by using the temperature sensor, and obtaining the temperature of the temperature regulation bin. The invention can be widely applied to an automatic testing system.
Description
Technical field
The present invention relates to the temperature detect switch (TDS) test, be specifically related to the method based on virtual instrument test temperature detect switch (TDS).
Background technology
In the manufacturing link of temperature switch and thermal protector; the temperature of operating point is an important indicator of temperature switch and thermal protector; also be to manufacture a link index more rambunctious, in order to guarantee product quality, this index is being manufactured full inspection of link.General measuring method is that each test product is accessed in the circuit of a power supply and pilot lamp, and product placed the controllable temperature environment, monitored the variation of pilot lamp by survey crew, monitor simultaneously the temperature indication, change such as certain Product Status and will record simultaneously its relevant temperature.Forming hundred product in close temperature spot transition state simultaneously almost, is very difficult thing by manually judging, record, and certainty easily go wrong, and affects product quality or causes unnecessary scrapping, and causes prestige or the economic loss of production unit.
Summary of the invention
Technical matters to be solved by this invention is to provide the method based on virtual instrument test temperature detect switch (TDS).
In order to address the above problem, according to first technical scheme of the present invention, temperature controlled switch testing system based on virtual instrument, consisted of by temperature adjustment storehouse, temperature sensor, matrix testing circuit, multifunctional data acquisition card and industrial computer, be characterized in: temperature sensor detects the temperature in temperature adjustment storehouse, and the temperature data in temperature adjustment storehouse is inputted industrial computer by multifunctional data acquisition card;
Industrial computer outputs a control signal to the matrix testing circuit by multifunctional data acquisition card, and simultaneously, industrial computer receives the data of temperature sensor and the output of matrix testing circuit by multifunctional data acquisition card; And, data analysis, processing and the demonstration result of industrial computer to receiving;
The matrix testing circuit receives the control signal of industrial computer output by multifunctional data acquisition card, the duty of test product is detected, and the working state signal of test product is outputed to industrial computer by multifunctional data acquisition card;
Multifunctional data acquisition card outputs to the matrix testing circuit with the control signal of industrial computer output; Simultaneously, multifunctional data acquisition card carries out the data of temperature sensor and the output of matrix testing circuit to output to industrial computer after the A/D conversion.
According to the preferred version of described temperature controlled switch testing system based on virtual instrument of the present invention, the matrix testing circuit comprises matrix circuit and interface control circuit; Wherein, interface control circuit receives the control signal of industrial computer output by multifunctional data acquisition card, output a control signal to matrix circuit after changing; The control signal of matrix circuit receiving interface control circuit output detects the duty of test product, and the working state signal of test product is outputed to industrial computer by multifunctional data acquisition card.
According to the preferred version of described temperature controlled switch testing system based on virtual instrument of the present invention, described matrix circuit comprises that m root control line, n root A/D gather line and m group testing circuit; Wherein, m, n are 1~128 natural number.
According to the preferred version of described temperature controlled switch testing system based on virtual instrument of the present invention, described interface control circuit comprises m control circuit, and wherein, m is 1~128 natural number.
According to the preferred version of described temperature controlled switch testing system based on virtual instrument of the present invention, described matrix circuit comprises that m root control line, n root A/D gather line and m group testing circuit; Described interface control circuit comprises m control circuit; Wherein, m, n are 1~128 natural number.
According to the preferred version of described temperature controlled switch testing system based on virtual instrument of the present invention, every group of testing circuit comprises n detecting unit, and wherein, n is 1~128 natural number.
According to the preferred version of described temperature controlled switch testing system based on virtual instrument of the present invention, described detecting unit comprises diode.
According to second technical scheme of the present invention, a kind of method based on virtual instrument test temperature detect switch (TDS) comprises the steps:
A. by installation procedure testing software is packed in the program storage medium of industrial computer; This testing software comprises: man-machine interface program module, test parameter setting program module, qualification determination program module, data save routine module, state acquisition program module and temperature data acquisition program module;
B. with test product access matrix testing circuit and insert the temperature adjustment storehouse;
C. start test macro work, initialization test parameter setting program module is read in the detection reference parameter of setting; And initialization multifunctional data acquisition card;
D. start detection, the initialization data record arranges and detects regularly, makes industrial computer read A/D by multifunctional data acquisition card timesharing, circulation and gathers the line signal; Thermometric is set regularly, makes industrial computer pass through the measured value of multifunctional data acquisition card acquisition time temperature sensor, open monitor window; Line scanning is set regularly, makes industrial computer timesharing, circulation send sweep signal;
E. temperature sensor is sampled to the temperature in temperature adjustment storehouse, industrial computer running temperature data acquisition program module, when thermometric regularly arrives, measured value by multifunctional data acquisition card collecting temperature sensor, and adopt voting average filter method to calculate to sampled data, obtain the temperature in temperature adjustment storehouse;
F. industrial computer running status capture program module makes industrial computer timesharing, circulation send sweep signal, and when detection regularly arrived, industrial computer 5 read A/D by the multifunctional data acquisition card circulation and gathers the line signal; And record A/D collection line signal changes constantly
The temperature adjustment storehouseTemperature obtains operating point or the recovery point temperature of test product;
G. industrial computer operation qualification determination program module is carried out qualified judge to test product; That is: the operating point of test product or recovery point temperature and set detection reference parameter are compared, if operating point temperature or recovery point temperature are outside the temperature range of regulation, judge that then test product is defective, if operating point temperature or recovery point temperature judge that then test product is qualified in the temperature range of regulation;
H. service data save routine module is preserved test parameter, and the result of determination of test product is shown at monitor window.
The beneficial effect of the method based on virtual instrument test temperature detect switch (TDS) of the present invention is: the present invention adopts industrial control computer and data collecting card to realize that the operating point of temperature switch and thermal protector and recovery point temperature and on off state detect automatically; record; pass judgment on; automatically finish testing process; can judge not only whether test product is qualified; can also detect; the actual temp value that is recorded to the product action and recovers; in detail accurately detection record is provided; the accuracy and the production efficiency that detect have been improved; the present invention can be applied in the automatization test system widely, has preferably economic benefit and social benefit.
Description of drawings
Fig. 1 is the schematic block circuit diagram of the temperature controlled switch testing system based on virtual instrument of the present invention.
Fig. 2 is the schematic block circuit diagram of the matrix testing circuit 3 of the temperature controlled switch testing system based on virtual instrument of the present invention.
Fig. 3 is the circuit theory diagrams of the temperature controlled switch testing system matrix testing circuit 3 based on virtual instrument of the present invention.
Fig. 4 is the relation curve of temperature detect switch (TDS) operating point and recovery point and temperature.
Fig. 5 is the testing software structured flowchart that arranges in the industrial computer 5.
Fig. 6 is the testing software main program flow block diagram that arranges in the industrial computer 5.
Fig. 7 is the testing software startup command handling procedure process flow diagram that arranges in the industrial computer 5.
Fig. 8 is the testing software that arranges in the industrial computer 5 handling procedure process flow diagram of ceasing and desisting order.
Fig. 9 is the testing software timed events handling procedure forward part process flow diagram that arranges in the industrial computer 5.
Figure 10 is the testing software timed events handling procedure rear section process flow diagram that arranges in the industrial computer 5.
Embodiment
Referring to Fig. 1, temperature controlled switch testing system based on virtual instrument, consisted of by temperature adjustment storehouse 1, temperature sensor 2, matrix testing circuit 3, multifunctional data acquisition card 4 and industrial computer 5, wherein, temperature sensor 2 detects the temperature in temperature adjustment storehouse 1, and the temperature data in temperature adjustment storehouse 1 is inputted industrial computers 5 by multifunctional data acquisition card 4;
Multifunctional data acquisition card 4 outputs to matrix testing circuit 3 with the control signal of industrial computer 5 outputs; Simultaneously, the data of temperature sensor 2 and 3 outputs of matrix testing circuit are carried out outputing to industrial computer 5 after the A/D conversion.
Wherein, matrix testing circuit 3 comprises matrix circuit 6 and interface control circuit 7; Wherein, interface control circuit 7 receives the control signal of industrial computer 5 outputs by multifunctional data acquisition card 4, output a control signal to matrix circuit 6 after changing; The control signal of matrix circuit 6 receiving interface control circuits 7 output detects the duty of test product, and the working state signal of test product is outputed to industrial computer 5 by multifunctional data acquisition card 4.
Referring to Fig. 2, interface control circuit 7 comprises m control circuit C01, C02 ... C0m; Described matrix circuit 6 comprises m root control line E1, E2 ... Em, n root A/D gather line AI1, AI2 ... AIn and m group testing circuit A1, A2 ... Am; Wherein, m, n are 1~128 natural number; Wherein, control line E1, E2 ... Em is connected respectively to control circuit C01, C02 ... the output terminal of C0m, A/D gathers line AI1, AI2 ... AIn is connected to multifunctional data acquisition card 4 simultaneously, every group of testing circuit comprises 1 control end and n output terminal, in specific embodiment, control line E1 connects the output terminal of control circuit C01, and control line E2 connects the output terminal of control circuit C02, the like, control line Em connects the output terminal of control circuit C0m; Control circuit C01, C02 ... input end D01, the D02 of C0m ... D0m connects multifunctional data acquisition card 4; The n of first a group of testing circuit A1 output terminal is connected respectively to A/D and gathers line AI1, AI2 ... on the AIn, the control end of first group of testing circuit A1 is connected to control line E1, the n of second a group of testing circuit A2 output terminal is connected respectively to A/D and gathers line AI1, AI2 ... on the AIn, the control end of second group of testing circuit A2 is connected to control line E2, the like, n the output terminal of m group testing circuit Am is connected respectively to A/D and gathers line AI1, AI2 ... on the AIn, the control end of m group testing circuit Am is connected to control line Em.
Wherein, every group of testing circuit comprises n detecting unit, and wherein, n is 1~128 natural number, and each detecting unit comprises a control end and an output terminal, in specific embodiment:
The control end of first detecting unit B11 among first group of testing circuit A1 connects control line E1, and the output terminal of first detecting unit B11 among first group of testing circuit A1 connects A/D and gathers line AI1; The control end of second detecting unit B12 among first group of testing circuit A1 connects control line E1, the output terminal of second detecting unit B12 among first group of testing circuit A1 connects A/D and gathers line AI2, the like, the control end of n detecting unit B1n among first group of testing circuit A1 connects control line E1, and the output terminal of n detecting unit B1n among first group of testing circuit A1 connects A/D collection line AIn;
The control end of first detecting unit B21 among second group of testing circuit A2 connects control line E2, and the output terminal of first detecting unit B11 among second group of testing circuit A2 connects A/D and gathers line AI1; The control end of second detecting unit B22 among second group of testing circuit A2 connects control line E2, and the output terminal of second detecting unit B22 among second group of testing circuit A2 connects A/D and gathers line AI2; The like, the control end of n detecting unit B2n among second group of testing circuit A2 connects control line E2, and the output terminal of n detecting unit B2n among second group of testing circuit A2 connects A/D collection line AIn;
The like, the control end of first detecting unit Bm1 among the m group testing circuit Am connects control line Em, and the output terminal of first detecting unit Bm1 among the m group testing circuit Am connects A/D and gathers line AI1; The control end of second detecting unit Bm2 among the m group testing circuit Am connects control line Em, and the output terminal of second detecting unit Bm2 among the m group testing circuit Am connects A/D and gathers line AI2; The like, the control end of n detecting unit Bmn among the m group testing circuit Am connects control line Em, and the output terminal of n detecting unit Bmn among the m group testing circuit Am connects A/D and gathers line AIn.
Wherein, described detecting unit comprises diode, and in specific embodiment, referring to Fig. 3, the negative pole of diode connects an end of test product, and the positive pole of diode connects A/D and gathers line, and the other end of test product connects control line.
Referring to Fig. 4, Fig. 4 is the relation curve of temperature detect switch (TDS) operating point and recovery point and temperature, wherein, the A point is environment temperature, and the B point is the operating temperature lower limit, and the C point is the operating temperature upper limit, the D point is intensification stop and cooling initial point, the E point is the recovery temperature upper limit, and the F point is the recovery temperature lower limit, and the G point is for detecting terminating point.
The principle of work of product is: test product such as temperature detect switch (TDS) or thermal protector access matrix testing circuit are also inserted temperature adjustment storehouse 1, test product in temperature adjustment storehouse 1 along with rising and the decline of temperature adjustment storehouse temperature, action and recovery namely occur in the change that produces state the temperature range planted agent who stipulates, namely transfer to normally closedly at the operating point temperature detect switch (TDS) by often opening, thermal protector was opened by normally closed often transferring to; Opened by normally closed often reverting at the recovery point temperature detect switch (TDS), thermal protector by often open revert to normally closed.Test macro reads the temperature in temperature adjustment storehouse 1 at any time by temperature sensor 2.Industrial computer 5 sends sweep signal by multifunctional data acquisition card 4 timesharing, circulation, and by control circuit control control line E1, E2, E3 ... Em timesharing, circulation are connected, when wherein a control line is connected, industrial computer 5 orders read all A/D and gather the line signal, A/D gathers the line signal and has reflected the state that is connected to the test product on this control line, and industrial computer 5 is judged the product quality state according to the temperature in temperature adjustment storehouse 1 again.If operating point or recovery point temperature the regulation temperature range outside, then product is defective, if operating point or recovery point temperature the regulation temperature range in, then product is qualified.
The timesharing scan round signal that is sent by industrial computer 5 outputs to the input end of control circuit by multifunctional data acquisition card 4, control circuit control control line D01, D02 ... the break-make of D0m, A/D gathers line AI1, AI2 ... the signal of AIn deliver to multifunctional data acquisition card 4 after A/D conversion by industrial computer 5 interpretations.Owing at a time only having a control line to connect, the test product that is connected on this control line is in tested state, and remaining product is in blocking state.That is to say, can each test product of unique location by the ranks combination.The benefit of doing like this is to utilize limited DO port and the more product of AI Port detecting.
The advantage of matrix circuit is the input line number that can greatly reduce detection signal, reduces equipment investment.For example, adopt the multifunctional data acquisition card of 16 DO mouths and 16 AI ports, stay 1 AI port to make temperature detection, remaining port then can be realized the detection of 16 * 15=240 spare product.The design of matrix testing circuit takes full advantage of the port of multifunctional data acquisition card, realized detecting more product with less data acquisition channel, larger raising every group of product quantity that detects, both reduced hardware investment, and energy-saving effect is remarkable.
Referring to Fig. 3, further specify the principle of work of matrix testing circuit 3, when system carves when making control line E1 be low level at a time, all the other control lines are high-impedance state, because the reverse blocking effect of diode, be connected to temperature detect switch (TDS) K11, the K12 on the control line E1 this moment ... the Determines of K1n A/D gather line AI1, AI2 ... the output state of AIn, the state of other temperature detect switch (TDS)s is irrelevant with this moment; For example, this moment, temperature detect switch (TDS) K11 was closed, and temperature detect switch (TDS) K12 disconnects, and A/D collection this moment line AI1 is low level so; It is high level that A/D gathers line AI2, with temperature detect switch (TDS) K21 this moment ... Km1, K22 ... the state of Km2 is irrelevant; In like manner, when make control line E2 be low level quarter at a time, all the other control lines are high-impedance state, because the reverse blocking effect of diode, be connected to temperature detect switch (TDS) K21, the K22 on the control line E2 this moment ... the Determines of K2n A/D gather line AI1, AI2 ... the output state of AIn, the state of other temperature detect switch (TDS)s is irrelevant with this moment.
Referring to Fig. 5 to Figure 10, a kind of method based on virtual instrument test temperature detect switch (TDS) comprises the steps:
A. by installation procedure testing software is packed in the program storage medium of industrial computer 5; This testing software comprises: man-machine interface program module, test parameter setting program module, qualification determination program module, data save routine module, state acquisition program module and temperature data acquisition program module;
B. with test product access matrix testing circuit 3 and insert temperature adjustment storehouse 1;
C. start test macro work, initialization test parameter setting program module is read in the detection reference parameter of setting; And initialization multifunctional data acquisition card 4;
D. start detection, the initialization data record arranges and detects regularly, makes industrial computer 5 read A/D by multifunctional data acquisition card 4 timesharing, circulation and gathers the line signal; Thermometric is set regularly, makes industrial computer 5 by the measured value of multifunctional data acquisition card 4 acquisition time temperature sensors 2, open monitor window; Line scanning is set regularly, makes industrial computer 5 timesharing, circulation send sweep signal;
E. the temperature in 2 pairs of temperature adjustment storehouses 1 of temperature sensor is sampled, industrial computer 5 running temperature data acquisition program modules, when thermometric regularly arrives, measured value by multifunctional data acquisition card 4 collecting temperature sensors 2, and adopt voting average filter method to calculate to sampled data, obtain the temperature in temperature adjustment storehouse 1;
F. industrial computer 5 running status capture program modules make industrial computer 5 timesharing, circulation send sweep signal, and when detection regularly arrived, industrial computer 5 read A/D by multifunctional data acquisition card 4 circulations and gathers line AI1, AI2 ... the AIn signal; And record A/D collection line signal changes constantly
Temperature adjustment storehouse 1Temperature obtains operating point or the recovery point temperature of test product;
G. industrial computer 5 operation qualification determination program modules are carried out qualified judge to test product; That is: the operating point of test product or recovery point temperature and set detection reference parameter are compared, if operating point temperature or recovery point temperature are outside the temperature range of regulation, judge that then test product is defective, if operating point temperature or recovery point temperature judge that then test product is qualified in the temperature range of regulation;
H. service data save routine module is preserved test parameter, and the result of determination of test product is shown at monitor window.
In specific embodiment, testing software running environment is Windows XP operating system, adopts Microsoft Visual Studio .NET programmed environment, carries out writing of program based on MFC, and operation platform is industrial computer 5.
For example, adopt the multifunctional data acquisition card of 16 DO mouths and 16 AI ports, state acquisition program module: adopt the P1202_Do function, send 16 control data to the DO mouth, when the position is " 1 ", corresponding A/D gathers line and is grounded, at this moment utilize P1202_SetChannelConfig function and P1202_AdPolling function, each bar A/D is gathered line to be scanned, if a certain A/D gathers the line output voltage less than setting value, think that then corresponding temperature detect switch (TDS) is closed, if a certain A/D gathers the line output voltage greater than setting value, think that then corresponding temperature detect switch (TDS) disconnects.Its temperature detect switch (TDS) state is stored in the variable array.
Temperature data acquisition program module: by the signals collecting of AD passage realization to temperature sensor 2, adopt P1202_SetChannelConfig function and P1202_AdPolling function to carry out the test environment temperature acquisition;
Temperature adjustment storehouse 1 usefulness temperature sensor 2 carries out temperature survey, and its measured value is stored in the variable array, is output as under the linear condition at temperature sensor 2, and scale of thermometer definite value is the difference of standard temperature and sampled value.
Test parameter setting program module:
In specific embodiment, need parameters to comprise:
Operating temperature lower limit, the operating temperature upper limit, recovery temperature lower limit, the recovery temperature upper limit, product normal temperature state, scale of thermometer definite value etc.
The qualification determination program module: when tested product state changes, record temperature value is at that time arrived corresponding structural array, array define is as follows:
The definition structure type:
typedef?struct?check_state_t
{
Float act_state_tem; // operating point temperature
Float renew_state_tem; // recovery point temperature
WORD check_tag; // testing result sign
}?check_state;
The definition result judges array: definition check_state resultTEM[200 in the CWorkData class] array, be used for preserving product operating point and recovery point temperature, and the testing result sign.
The man-machine interface program module:
Main visual interface adopts the explorer pattern, and the left side is tree structure, and demonstration detects the log file in the data directory, and the right is looked for tabulation, with the detection data recording in the form demonstration respective file of tabulation.Adopt custom toolbars and status bar to produce unique interface, status bar is except the operation information of display standard, and toolbar will comprise the tool button of menu function.
Application program creates based on the MFC class libraries, uses MFC application program guide to create the MFC application program.
In specific embodiment, monitoring interface is after start detection, will open a monitoring window, this window adopts modeless dialog box to realize, its main body is to show 10 row, 20 row temperature switch states in figure pilot lamp mode, green representative is qualified, and white is unknown, and red representative is neither qualified.Simultaneously on the right of its pilot lamp with label display action temperature and recovery temperature.The temperature-averaging value that also has the real-time displays temperature sensor of thermometer to detect in addition.
And the definition drawing function, as:
Void CDlgDisplay::DrawLamp (PointF lamp_ptf, Bitmap * lamp_bmp, bool allow); // picture beacon lamp
Void CDlgDisplay::DrawThermometer (PointF tm_ptf, Bitmap * tm_bmp, bool allow); // picture thermometer
Data save routine module: the document class template of utilizing Microsoft Visual Studio .NET to provide generates application document class CSWTEMCheckDoc, and create test job data class CWorkData and detect data class CCheckData, be used for the definition record test data structure, create CSetParameter, be used for preserving test parameter, parameters is stored among the configuration file SWTEMCheck.cfg.Wherein, in the CSWTEMCheckDoc document class, defined detection data structure and the CCheckData class data link table of CWorkData class example, and write the serialization function, rewrite newly-built, open, preserve framework function, and write and deposit in addition parameter and data function.
Definition detects data class CCheckData, and its main class members's variable is:
CStringW m_serial; // product ID
CStringW m_number; // temperature switch location number
CStringW m_date_time; // detection time
CStringW m_tmeperature; // detected temperatures
CStringW m_state_tag; // on off state
CStringW m_check_tag; // testing result sign
Definition parameters class CSetParameter, its class members's variable is:
Float m_actT_downLimit; // operating temperature lower limit, default value are ℃
Float m_actT_upLimit; // operating temperature the upper limit, default value are ℃;
Float m_renewT_downLimit; // recovery temperature lower limit, default value are ℃;
Float m_renewT_upLimit; // recovery temperature the upper limit, default value are ℃;
Bool m_normalState; // product normal temperature state variable, Chang Kaiwei " false ", normally closed is " true ", default value is " false "
Float m_adjustTEM1[2], m_adjustTEM2[2]; // temperature deviation modified value
WORD mode_choose; // detection mode is selected
Enum modeNam{mod_Single, mod_Double}; // definition detection mode is enumerated
The product testing process is: after start detection, program will be opened monitoring interface, initialization PCI-1202, the detection timer is set, by clocked flip status scan and temperature acquisition, refresh simultaneously demonstration, by tested product state variation trigger data record, until temperature is when surpassing higher limit, automatically or by operating personnel's detection of end.
Hardware driving: the power function that P1202.DLL provides is concluded, generate the power function that adapts to native system.It mainly contains the following functions function:
LRESULT InitDrv (void); // initialization PCI-1202, and make it be in state of activation
Bool ScanState (WORD wrowNum, WORD wcolumnNum); // detected temperatures on off state
Float temMeasure (WORD wChannel); // temperature acquisition returns the temperature voltage value
#define ch_THERM1 20//define channel constant
#define?ch_THERM2 21
#define cf_STATE 0x9//status scan AD passage is configured to+5V
#define cf_THERM 0x2//temperature acquisition AD passage is configured to+/-1.25V
Fig. 6 is the testing software main program flow block diagram that arranges in the industrial computer 5.Main program flow comprises: program begins; Create new application program module, specifically comprise the establishment document class, look class, main frame class, create menu, toolbar, status bar; Initialization test parameter setting program module is read in the detection reference parameter of setting; And initialization multifunctional data acquisition card 4; To message queue scanning, if any message, will call corresponding processing program, handling procedure comprises: timed events handling procedure, idiographic flow are seen Fig. 9 and Figure 10, are used for realizing detecting; The startup command handling procedure, for the treatment of detecting initial setting up, idiographic flow is seen Fig. 7; The handling procedure of ceasing and desisting order is used for stopping to detect, and idiographic flow is seen Fig. 8; As do not have message, just enter the message circulation.
Wherein, the startup command handling procedure comprises: the initialization data record, fill in the due original state of switch; Arrange and detect regularly, can set interval is 10 seconds; Thermometric is set regularly, can set interval is 1 second; Open monitor window;
The handling procedure of ceasing and desisting order comprises: stop to detect timer; Stop the thermometric timer;
The timed events handling procedure comprises:
The first step: judge that detecting timing arrives? do not arrive when detecting timing, directly enter second step; Arrived when detecting timing, started line scanning regularly, it is 0.5 second that the line scanning time interval regularly can be set;
Second step: judge that the line scanning timing arrives? when the line scanning timing does not arrive, entered for the 9th step, when the line scanning timing arrives, entered for the 3rd step;
The 3rd step: scan the capable switch of M; Wherein, M≤m;
The 4th the step: judge M capable in N on off state whether change, N on off state changes in M is capable, records current on off state and temperature, enters for the 5th step, N on off state do not change in M is capable, enters for the 7th step; Wherein, N≤n;
The 5th step: qualified judge: be about to the operating point of test product and recovery point temperature and set detection reference parameter and compare, if operating point temperature or recovery point temperature are outside the temperature range of regulation, judge that then test product is defective, if operating point temperature or recovery point temperature are in the temperature range of regulation, judge that then test product is qualified, judge whether test product is qualified;
The 6th step: qualified to qualified product labelling; Defective to the substandard product mark;
The 6th step, blip counting increase by one;
The 7th step, judge whether all row scan and finish, when all row not scanning do not finish, returned for the 4th step, finish when all column scans, entered for the 8th step;
The 8th step: judge whether all line scannings are finished; Do not finish when all line scannings, entered for the 9th step; Finish when all line scannings, stop the line scanning timer, the detection stop timing is set simultaneously; Service data save routine module is preserved test parameter, and the result of determination of test product is shown at monitor window;
The 9th step: judge that the thermometric timing arrives? when the thermometric timing arrives, running temperature data acquisition program module, the measured value of collecting temperature sensor, and adopt voting average filter method to calculate to sampled data, obtain temperature adjustment storehouse 1 temperature;
The tenth step: judge that detecting stop timing arrives? do not arrive when detecting stop timing, return master routine, arrived when detecting stop timing, stop the stop timing device;
The 11 step: judge amount detection more than or equal to setting value, when amount detection more than or equal to setting value, stop the line scanning timer, then return master routine; When amount detection less than setting value, return master routine.
Claims (1)
1. the method based on virtual instrument test temperature detect switch (TDS) comprises the steps:
A. by installation procedure testing software is packed in the program storage medium of industrial computer (5); This testing software comprises: man-machine interface program module, test parameter setting program module, qualification determination program module, data save routine module, state acquisition program module and temperature data acquisition program module;
B. with test product access matrix testing circuit (3) and insert temperature adjustment storehouse (1);
C. start test macro work, initialization test parameter setting program module is read in the detection reference parameter of setting; And initialization multifunctional data acquisition card (4);
D. start detection, the initialization data record arranges and detects regularly, makes industrial computer (5) read A/D collection line signal by multifunctional data acquisition card (4) timesharing, circulation; Thermometric is set regularly, makes industrial computer (5) by the measured value of multifunctional data acquisition card (4) acquisition time temperature sensor (2), open monitor window; Line scanning is set regularly, makes industrial computer (5) timesharing, circulation send sweep signal;
E. temperature sensor (2) is sampled to the temperature of temperature adjustment storehouse (1), industrial computer (5) running temperature data acquisition program module, when thermometric regularly arrives, measured value by multifunctional data acquisition card (4) collecting temperature sensor (2), and adopt voting average filter method to calculate to sampled data, obtain the temperature of temperature adjustment storehouse (1);
F. industrial computer (5) running status capture program module, make industrial computer (5) timesharing, circulation send sweep signal, when detection regularly arrived, industrial computer (5) read A/D by multifunctional data acquisition card (4) circulation and gathers line (AI1, AI2 ... AIn) signal; And record A/D gathers the change temperature in temperature adjustment storehouse (1) constantly of line signal, obtains operating point or the recovery point temperature of test product;
G. industrial computer (5) operation qualification determination program module is carried out qualified judge to test product; That is: the operating point of test product or recovery point temperature and set detection reference parameter are compared, if operating point temperature or recovery point temperature are outside the temperature range of regulation, judge that then test product is defective, if operating point temperature or recovery point temperature judge that then test product is qualified in the temperature range of regulation;
H. service data save routine module is preserved test parameter, and the result of determination of test product is shown at monitor window.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110157879 CN102323543B (en) | 2011-06-13 | 2011-06-13 | Virtual instrument-based temperature controlled switch testing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110157879 CN102323543B (en) | 2011-06-13 | 2011-06-13 | Virtual instrument-based temperature controlled switch testing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102323543A CN102323543A (en) | 2012-01-18 |
CN102323543B true CN102323543B (en) | 2013-10-23 |
Family
ID=45451323
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201110157879 Expired - Fee Related CN102323543B (en) | 2011-06-13 | 2011-06-13 | Virtual instrument-based temperature controlled switch testing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102323543B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103364717B (en) * | 2012-03-30 | 2016-09-07 | 海洋王(东莞)照明科技有限公司 | Temperature detect switch (TDS) test circuit |
CN103513179B (en) * | 2013-10-16 | 2016-01-06 | 深圳市策维科技有限公司 | A kind of temperature detect switch (TDS) detects automation equipment and detection method thereof |
CN104614669A (en) * | 2014-12-18 | 2015-05-13 | 广东华田电器有限公司 | Automatic tester of magnetic steel temperature limiter and test method thereof |
CN104750151B (en) * | 2015-01-29 | 2017-02-01 | 重庆川仪自动化股份有限公司 | PCI-bus-based matrix circuit control method in temperature and pressure compensation system |
CN108983082A (en) * | 2018-08-03 | 2018-12-11 | 德丰电创科技股份有限公司 | Matrix switch de-vice and system |
CN109541447B (en) * | 2018-09-07 | 2020-11-13 | 国营芜湖机械厂 | Temperature relay detection equipment and method |
CN117434439B (en) * | 2023-12-20 | 2024-04-09 | 天津航空机电有限公司 | Circuit and method for collecting state of large-scale device with auxiliary contact |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04204068A (en) * | 1990-11-30 | 1992-07-24 | Hitachi Ltd | Apparatus for testing switch |
US6882155B2 (en) * | 2001-04-19 | 2005-04-19 | Vince J Lazzaro | Remotely actuated, circuit testing emergency stop apparatus and method |
JP4354235B2 (en) * | 2003-09-12 | 2009-10-28 | 株式会社アドバンテスト | Test apparatus and adjustment method |
CN200972495Y (en) * | 2006-12-01 | 2007-11-07 | 比亚迪股份有限公司 | Electromagnetic switch testing equipment for vehicle starter |
CN202149932U (en) * | 2011-06-13 | 2012-02-22 | 重庆斯凯力科技有限公司 | Temperature control switch tester based on virtual instrument |
-
2011
- 2011-06-13 CN CN 201110157879 patent/CN102323543B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN102323543A (en) | 2012-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102323543B (en) | Virtual instrument-based temperature controlled switch testing method | |
CN103909325B (en) | A kind of welding quality monitoring system | |
CN103760394A (en) | Automatic processing method and device for measured data of oscilloscope | |
CN103631246A (en) | Test method, test device, test tool and test system of electronic equipment | |
CN201285600Y (en) | Multi-parameter monitoring digital recorder instrument | |
CN103439370B (en) | The temperature/humiditydetection detection system of drying course | |
CN108804298B (en) | Device for testing response time of SCADA system | |
CN203414433U (en) | Temperature and humidity detection system for drying process | |
CN201917836U (en) | Temperature control device based on ultra-low-temperature environment operation | |
CN102411329A (en) | Environment monitoring device based on RS-485 bus | |
CN200986743Y (en) | Temperature field infrared monitor system | |
CN102193890B (en) | Time sequence adjusting method and device of synchronous interface | |
CN202149932U (en) | Temperature control switch tester based on virtual instrument | |
CN203788304U (en) | Device for testing function of hardware interface | |
CN206497153U (en) | A kind of wind power quality analysis recorder | |
CN106325149B (en) | Belt conveyor intelligent control data acquisition treatment method in earth pressure balanced shield, EPBS tunneling process | |
CN204304614U (en) | I type electric energy efficiency office terminal and system | |
CN202916015U (en) | Register mechanism based multipoint temperature-measuring control system | |
CN207367083U (en) | A kind of multi-parameter poultry environment monitor | |
CN204189181U (en) | Mobile terminal formula test apparatus management system | |
CN106885648A (en) | Barograph | |
CN206235406U (en) | A kind of temperature patrol inspection device | |
CN111106492A (en) | Intelligent temperature measurement guide rail terminal | |
CN202284506U (en) | Temperature-controlled parameter itinerant detector for preheating and oil supply system of electromagnetic fuel delivery pump of diesel vehicle | |
CN205679258U (en) | A kind of bio-pharmaceuticals case environmental monitoring system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20131023 |