CN102323543A - Virtual instrument-based temperature controlled switch testing system and method - Google Patents

Virtual instrument-based temperature controlled switch testing system and method Download PDF

Info

Publication number
CN102323543A
CN102323543A CN201110157879A CN201110157879A CN102323543A CN 102323543 A CN102323543 A CN 102323543A CN 201110157879 A CN201110157879 A CN 201110157879A CN 201110157879 A CN201110157879 A CN 201110157879A CN 102323543 A CN102323543 A CN 102323543A
Authority
CN
China
Prior art keywords
temperature
industrial computer
data acquisition
acquisition card
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.)
Granted
Application number
CN201110157879A
Other languages
Chinese (zh)
Other versions
CN102323543B (en
Inventor
苏惠强
陈维亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHONGQING SKYLI TECHNOLOGY Co Ltd
Original Assignee
CHONGQING SKYLI TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by CHONGQING SKYLI TECHNOLOGY Co Ltd filed Critical CHONGQING SKYLI TECHNOLOGY Co Ltd
Priority to CN 201110157879 priority Critical patent/CN102323543B/en
Publication of CN102323543A publication Critical patent/CN102323543A/en
Application granted granted Critical
Publication of CN102323543B publication Critical patent/CN102323543B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention discloses a virtual instrument-based temperature controlled switch testing system which comprises a temperature regulating bin, a temperature sensor, a matrix detection circuit, a multifunctional data acquisition card and an industrial control computer. The virtual instrument-based temperature controlled switch testing system is characterized in that the temperature sensor is used for detecting the temperature of the temperature regulating bin and inputting the temperature data of the temperature regulating bin into the industrial control computer through the multifunctional data acquisition card; the industrial control computer outputs a control signal to the matrix detection circuit through the multifunctional data acquisition card; meanwhile, the industrial control computer analyzes and processes the received data and displays a result; and the matrix detection circuit receives the control signal output by the industrial control computer through the multifunctional data acquisition card, detects a working state of a product to be tested, and outputs a working state signal of the product to be tested to the industrial control computer through the multifunctional data acquisition card. The invention can be widely applied to an automatic testing system.

Description

Temperature detect switch (TDS) test macro and method based on virtual instrument
Technical field
The present invention relates to the temperature detect switch (TDS) test, be specifically related to a kind of temperature detect switch (TDS) test macro and method based on virtual instrument.
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 link inspection entirely.General measuring method is that each test product is inserted in the circuit of a power supply and pilot lamp; And product placed the controllable temperature environment; By the variation of survey crew supervision pilot lamp, monitor temperature is indicated simultaneously, changes like certain Product Status and will write down its relevant temperature simultaneously.Form hundred product in close temperature spot transition state simultaneously almost, judge, write down to be the unusual thing of difficulty by manual work, certainty go wrong easily, influences product quality or causes unnecessary scrapping, and causes the prestige or the economic loss of production unit.
Summary of the invention
Technical matters to be solved by this invention is to provide the temperature detect switch (TDS) test macro based on virtual instrument.
In order to address the above problem; According to first technical scheme of the present invention; Temperature detect switch (TDS) test macro based on virtual instrument; Be made up of 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 imported industrial computer through multifunctional data acquisition card;
Industrial computer outputs a control signal to the matrix testing circuit through multifunctional data acquisition card, and simultaneously, industrial computer receives the data of temperature sensor and the output of matrix testing circuit through multifunctional data acquisition card; And industrial computer is analyzed, is handled and display result the data of receiving;
The matrix testing circuit receives the control signal of industrial computer output through multifunctional data acquisition card, the duty of test product is detected, and the working state signal of test product is outputed to industrial computer through 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 said temperature detect switch (TDS) test macro 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 that industrial computer is exported through multifunctional data acquisition card, outputs 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 through multifunctional data acquisition card.
According to the preferred version of said temperature detect switch (TDS) test macro based on virtual instrument of the present invention, said 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 said temperature detect switch (TDS) test macro based on virtual instrument of the present invention, said interface control circuit comprises m control circuit, and wherein, m is 1~128 natural number.
According to the preferred version of said temperature detect switch (TDS) test macro based on virtual instrument of the present invention, said matrix circuit comprises that m root control line, n root A/D gather line and m group testing circuit; Said interface control circuit comprises m control circuit; Wherein, m, n are 1~128 natural number.
According to the preferred version of said temperature detect switch (TDS) test macro 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 said temperature detect switch (TDS) test macro based on virtual instrument of the present invention, said 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. through 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. detection starting, the initialization data record is provided with and detects regularly, makes industrial computer read A/D through 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; Through the measured value of multifunctional data acquisition card collecting temperature sensor, and adopt voting average filter method to calculate, obtain the temperature in temperature adjustment storehouse sampled data;
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 through 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 the 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 temperature detect switch (TDS) test macro based on virtual instrument of the present invention is: the present invention adopts industrial control computer and data collecting card to realize that operating point and the recovery point temperature of temperature switch and thermal protector and on off state detect automatically, write down, pass judgment on; Automatically accomplish testing process; Can judge not only whether test product is qualified; The actual temp value that can also detect, record the product action and recover provides detection record in detail accurately, has improved the accuracy and the production efficiency that detect; The present invention can be applied in the automatization test system widely, has favorable economic benefit and social benefit.
Description of drawings
Fig. 1 is the schematic block circuit diagram of the temperature detect switch (TDS) test macro 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 detect switch (TDS) test macro based on virtual instrument of the present invention.
Fig. 3 is the circuit theory diagrams of the temperature detect switch (TDS) test macro 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 is provided with in the industrial computer 5.
Fig. 6 is the testing software main program flow block diagram that is provided with in the industrial computer 5.
Fig. 7 is the testing software startup command handling procedure process flow diagram that is provided with in the industrial computer 5.
Fig. 8 is the testing software that is provided with 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 is provided with in the industrial computer 5.
Figure 10 is the testing software timed events handling procedure rear section process flow diagram that is provided with in the industrial computer 5.
Embodiment
Referring to Fig. 1; Temperature detect switch (TDS) test macro based on virtual instrument; Constitute 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 imported industrial computers 5 through multifunctional data acquisition card 4;
Industrial computer 5 outputs a control signal to matrix testing circuit 3 through multifunctional data acquisition card 4, and simultaneously, industrial computer 5 receives the data of temperature sensor 2 and 3 outputs of matrix testing circuit through multifunctional data acquisition card 4; And 5 pairs of data of receiving of industrial computer are analyzed, are handled and display result;
Matrix testing circuit 3 receives the control signal of industrial computers 5 outputs through multifunctional data acquisition card 4, the duty of test product is detected, and the working state signal of test product is outputed to industrial computer 5 through 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 temperature sensor 2 and the data of matrix testing circuit 3 outputs 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 that industrial computer 5 is exported through multifunctional data acquisition card 4, outputs 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 through multifunctional data acquisition card 4.
Referring to Fig. 2, interface control circuit 7 comprises m control circuit C01, C02 ... C0m; Said 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; And the like, control line Em connects the output terminal of control circuit C0m; Control circuit C01, C02 ... The input end D01 of C0m, D02 ... 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 ... AIn is last; 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 ... AIn is last; The control end of second group of testing circuit A2 is connected to control line E2; And the like, n the output terminal of m group testing circuit Am is connected respectively to A/D and gathers line AI1, AI2 ... AIn is last, and 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; And 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; And 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;
And 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; And 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, said 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 an 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 the rising and the decline of temperature adjustment storehouse temperature; Action and recovery promptly take place in the change that produces state the temperature range planted agent who stipulates; Just 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; Open 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 through temperature sensor 2.Industrial computer 5 sends sweep signal through multifunctional data acquisition card 4 timesharing, circulation; And through 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, and A/D gathers the line signal and 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 through 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 have only a control line to connect, the test product that is connected on this control line is in seized state, and remaining product is in blocking state.That is to say, can each test product of unique location through row combination.The benefit of doing like this is to utilize limited DO port and AI port to detect more product.
The advantage of matrix circuit is the incoming line number that can significantly 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 has made full use of the port of multifunctional data acquisition card, realized detecting more products with less data acquisition channel, bigger 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; Carve at a time when making control line E1 be low level when system, 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 state of K1n has determined A/D to 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 breaks off, and A/D collection this moment line AI1 is a 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 is connected to temperature detect switch (TDS) K21, the K22 on the control line E2 this moment ... The state of K2n has determined A/D to 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. through 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. detection starting, the initialization data record is provided with and detects regularly, makes industrial computer 5 read A/D through multifunctional data acquisition card 4 timesharing, circulation and gathers the line signal; Thermometric is set regularly, makes the measured value of industrial computer 5, open monitor window through multifunctional data acquisition card 4 acquisition time temperature sensors 2; 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; Through the measured value of multifunctional data acquisition card 4 collecting temperature sensors 2, and adopt voting average filter method to calculate, obtain the temperature in temperature adjustment storehouse 1 sampled data;
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 through 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 the 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 an industrial computer 5.
For example, adopt the multifunctional data acquisition card of 16 DO mouths and 16 AI ports, the state acquisition program module: adopt the P1202_Do function; Send 16 control datas to the DO mouth, when the position was " 1 ", corresponding A/D gathered line and is grounded; At this moment utilize P1202_SetChannelConfig function and P1202_AdPolling function; Each bar A/D is gathered line scan,, think that then corresponding temperature detect switch (TDS) is closed if a certain A/D gathers the line output voltage less than setting value; If a certain A/D gathers the line output voltage greater than setting value, think that then corresponding temperature detect switch (TDS) breaks off.Its temperature detect switch (TDS) state is stored in the variable array.
Temperature data acquisition program module: realize signals collecting through the AD passage, adopt P1202_SetChannelConfig function and P1202_AdPolling function to carry out the test environment temperature acquisition to temperature sensor 2;
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, parameter need be set 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 article state changes, record temperature value is at that time arrived corresponding structural array, array define is following:
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] array in the CWorkData class, be used to preserve 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 a 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 removes the operation information of display standard, and toolbar will comprise the tool button of menu function.
Application program is created based on the MFC class libraries, uses MFC application program guide to create the MFC application program.
In specific embodiment; Monitoring interface will be opened a monitoring window after detection starting, this window adopts modeless dialog box to realize; Its main body is to show 10 row, 20 row temperature switch states with 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 arrive 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 to preserve test parameter, parameter is set is stored among the configuration file SWTEMCheck.cfg.Wherein, In the CSWTEMCheckDoc document class, defined the detection data structure and the CCheckData class data link table of CWorkData class instance, and write the serialization function; Rewrite newly-built, open, preserve framework function, and write and deposit parameter and data function in addition.
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 is provided with parameter class CSetParameter, and 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 detection starting, program will be opened monitoring interface, initialization PCI-1202; The detection timer is set; Through regularly triggering status scan and temperature acquisition, refresh demonstration simultaneously, through tested article state variation trigger data record; When temperature surpasses 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 following power 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 channel arrangement is+5V
#define cf_THERM 0x2//temperature acquisition AD channel arrangement is+/-1.25V
Fig. 6 is the testing software main program flow block diagram that is provided with in the industrial computer 5.Main program flow comprises: program begins; Create new application program module, specifically comprise and create document class, type of looking, 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 is used for the processing and detecting initial setting up, and idiographic flow is seen Fig. 7; The handling procedure of ceasing and desisting order is used to stop to detect, and idiographic flow is seen Fig. 8; As do not have message, just get into message circulation.
Wherein, the startup command handling procedure comprises: the initialization data record, fill in the due original state of switch; Be provided with 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 got into for 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, got into for the 9th step, when the line scanning timing arrives, got into 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, writes down current on off state and temperature, gets into for the 5th step, N on off state do not change in M is capable, gets into for the 7th step; Wherein, N≤n;
The 5th step: qualified judge: soon the operating point of test product and recovery point temperature and set detection reference parameter 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 judge that then test product is qualified in the temperature range of regulation, 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 goes on foot, judges whether all row scan completion, when the scanning completion of all row, returns for the 4th step, when all column scans completion, gets into for the 8th step;
The 8th step: judge whether all line scannings are accomplished; Do not accomplish when all line scannings, got into for the 9th step; Accomplish 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, stop the stop timing device when detecting stop timing;
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, return master routine then; When amount detection less than setting value, return master routine.

Claims (9)

1. based on the temperature detect switch (TDS) test macro of virtual instrument, constitute, it is characterized in that by temperature adjustment storehouse (1), temperature sensor (2), matrix testing circuit (3), multifunctional data acquisition card (4) and industrial computer (5):
Temperature sensor (2) detects the temperature in temperature adjustment storehouse (1), and the temperature data of temperature adjustment storehouse (1) is imported industrial computer (5) through multifunctional data acquisition card (4);
Industrial computer (5) outputs a control signal to matrix testing circuit (3) through multifunctional data acquisition card (4); Simultaneously, industrial computer (5) receives the data of temperature sensor (2) and matrix testing circuit (3) output through multifunctional data acquisition card (4); And industrial computer (5) is analyzed, is handled and display result the data of receiving;
Matrix testing circuit (3) receives the control signal of industrial computer (5) output through multifunctional data acquisition card (4); Duty to test product detects, and the working state signal of test product is outputed to industrial computer (5) through multifunctional data acquisition card (4);
Multifunctional data acquisition card (4) outputs to matrix testing circuit (3) with the control signal of industrial computer (5) output; Simultaneously, multifunctional data acquisition card (4) carries out the data of temperature sensor (2) and matrix testing circuit (3) output to output to industrial computer (5) after the A/D conversion.
2. the temperature detect switch (TDS) test macro based on virtual instrument according to claim 1 is characterized in that: matrix testing circuit (3) comprises matrix circuit (6) and interface control circuit (7); Wherein, interface control circuit (7) receives the control signal that industrial computer (5) is exported through multifunctional data acquisition card (4), outputs a control signal to matrix circuit (6) after changing; The control signal of matrix circuit (6) receiving interface control circuit (7) output detects the duty of test product, and the working state signal of test product is outputed to industrial computer (5) through multifunctional data acquisition card (4).
3. the temperature detect switch (TDS) test macro based on virtual instrument according to claim 2; It is characterized in that: said matrix circuit (6) comprises m root control line (E1, E2 ... Em), n root A/D gathers line (AI1, AI2 ... AIn) and m group testing circuit (A1, A2 ... Am); Wherein, m, n are 1~128 natural number.
4. the temperature detect switch (TDS) test macro based on virtual instrument according to claim 2 is characterized in that: said interface control circuit (7) comprises m control circuit (CO1, CO2 ... COm), m is 1~128 natural number.
5. the temperature detect switch (TDS) test macro based on virtual instrument according to claim 2 is characterized in that: said matrix circuit (6) comprises m root control line (E1, E2 ... Em), n root A/D gathers line (AI1, AI2 ... AIn) and m group testing circuit (A1, A2 ... Am); Said interface control circuit (7) comprises m control circuit (CO1, CO2 ... COm); Wherein, m, n are 1~128 natural number.
6. according to claim 3 or 5 described temperature detect switch (TDS) test macros based on virtual instrument, it is characterized in that: every group of testing circuit comprises n detecting unit.
7. wherein, n is 1~128 natural number.
8. the temperature detect switch (TDS) test macro based on virtual instrument according to claim 6, it is characterized in that: said detecting unit comprises diode.
9. the method based on virtual instrument test temperature detect switch (TDS) comprises the steps:
A. through 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. detection starting, the initialization data record is provided with and detects regularly, makes industrial computer (5) read A/D collection line signal through multifunctional data acquisition card (4) timesharing, circulation; Thermometric is set regularly, makes the measured value of industrial computer (5), open monitor window through multifunctional data acquisition card (4) acquisition time temperature sensor (2); 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; Through the measured value of multifunctional data acquisition card (4) collecting temperature sensor (2), and adopt voting average filter method to calculate, obtain the temperature of temperature adjustment storehouse (1) sampled data;
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 through multifunctional data acquisition card (4) circulation and gathers line (AI1, AI2 ... AIn) signal; And record A/D collection line signal changes constantly Temperature adjustment storehouse (1)Temperature obtains the 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.
CN 201110157879 2011-06-13 2011-06-13 Virtual instrument-based temperature controlled switch testing method Expired - Fee Related CN102323543B (en)

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 true CN102323543A (en) 2012-01-18
CN102323543B 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)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103364717A (en) * 2012-03-30 2013-10-23 海洋王(东莞)照明科技有限公司 Temperature controlled switch testing circuit
CN103513179A (en) * 2013-10-16 2014-01-15 深圳市策维科技有限公司 Temperature control switch detection automatic device and detection method thereof
CN104614669A (en) * 2014-12-18 2015-05-13 广东华田电器有限公司 Automatic tester of magnetic steel temperature limiter and test method thereof
CN104750151A (en) * 2015-01-29 2015-07-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
CN109541447A (en) * 2018-09-07 2019-03-29 国营芜湖机械厂 A kind of temperature relay detection device and method
CN117434439A (en) * 2023-12-20 2024-01-23 天津航空机电有限公司 Circuit and method for collecting state of large-scale device with auxiliary contact

Citations (5)

* Cited by examiner, † Cited by third party
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
CN1849518A (en) * 2003-09-12 2006-10-18 爱德万测试株式会社 Test apparatus and test 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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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
CN1849518A (en) * 2003-09-12 2006-10-18 爱德万测试株式会社 Test apparatus and test 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

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈儿同等: "冰箱化霜温控开关温度特性全自动测试台", 《上海机械学院学报》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103364717A (en) * 2012-03-30 2013-10-23 海洋王(东莞)照明科技有限公司 Temperature controlled switch testing circuit
CN103513179A (en) * 2013-10-16 2014-01-15 深圳市策维科技有限公司 Temperature control switch detection automatic device and detection method thereof
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
CN104750151A (en) * 2015-01-29 2015-07-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
CN109541447A (en) * 2018-09-07 2019-03-29 国营芜湖机械厂 A kind of temperature relay detection device and method
CN109541447B (en) * 2018-09-07 2020-11-13 国营芜湖机械厂 Temperature relay detection equipment and method
CN117434439A (en) * 2023-12-20 2024-01-23 天津航空机电有限公司 Circuit and method for collecting state of large-scale device with auxiliary contact
CN117434439B (en) * 2023-12-20 2024-04-09 天津航空机电有限公司 Circuit and method for collecting state of large-scale device with auxiliary contact

Also Published As

Publication number Publication date
CN102323543B (en) 2013-10-23

Similar Documents

Publication Publication Date Title
CN102323543B (en) Virtual instrument-based temperature controlled switch testing method
CN101464671B (en) Apparatus and method for monitoring sulfur hexafluoride gas and its derived gas
CN102722131A (en) Touch screen PLC controller based on bus form
CN105931446A (en) Test system for gas data acquisition unit and working method thereof
CN201285600Y (en) Multi-parameter monitoring digital recorder instrument
CN103439370B (en) The temperature/humiditydetection detection system of drying course
CN203433398U (en) Digital grain depot temperature-humidity monitoring system based on AT89C52 and DHT11
CN203414433U (en) Temperature and humidity detection system for drying process
CN203100778U (en) Real-time monitoring and remote alarm device for drug storehouse environment
CN201917836U (en) Temperature control device based on ultra-low-temperature environment operation
CN202159243U (en) Monitoring module of engineering machinery monitoring system
CN102411329A (en) Environment monitoring device based on RS-485 bus
CN102901571A (en) Registration mechanism-based multi-point temperature measurement control system
CN202149932U (en) Temperature control switch tester based on virtual instrument
CN200986743Y (en) Temperature field infrared monitor system
CN102761565A (en) Brewing process monitoring system and method based on wireless sensor network technology
CN205506244U (en) Small -size temperature measurement monitored control system based on FPGA
CN205373756U (en) Temperature and humidity sensor
CN203616669U (en) Corncob drying automatic control system
CN203825457U (en) Cigarette making and tipping machine set control system based on K-BUS bus
CN202916015U (en) Register mechanism based multipoint temperature-measuring control system
CN112578709A (en) Multifunctional data acquisition and exchange system
CN202472333U (en) Environment monitoring device based on RS-485 bus
CN111106492A (en) Intelligent temperature measurement guide rail terminal
CN205015246U (en) Air circumstance monitoring network

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

Granted publication date: 20131023

CF01 Termination of patent right due to non-payment of annual fee