Background technology
In the prior art, most PLC test jobs are accomplished manually, and this is the huge work that repeats, labor time not only, but also inaccurate.
The appearance of automatically testing platform provides a kind of time saving and energy saving method.But traditional automatically testing platform can not satisfy test request in scenario:
1. because only have a relay that is used for the common (Com end) of input and output separately,, can't carry out the channel isolation test so traditional testing system only can be used for non-shielding system;
2. because the size restrictions of printed circuit board (PCB) (PCB), so the limited amount system of relay.And the quantity of input and output relay is fixed, and can't carry out the test of a large amount of passages;
3. because conventional test methods only can be tested a PLC who possesses CPU and its a plurality of expansion modules, therefore, if desired many CPU and the expansion sample thereof of a plurality of above-mentioned PLC are tested, then must repeated sample embed TCH test channel and test sample book;
4. although lower to the requirement of digital module testing precision, normally, digital module always has a large amount of passages.So need a lot of manpowers to carry out test and frequency test of similar threshold voltage, electric current or the like, therefore undesirable to the test operation of digital module.
Summary of the invention
To above-mentioned shortcoming and defect, the present invention proposes a kind of automatically testing platform with programmable logic controller (PLC) that is directed against a plurality of CPU of having of relay construction able to programme.
The object of the invention is to use programmable relay construction to set up automatically testing platform, tests a plurality of isolation/non-channel isolations with programmable logic controller (PLC) of CPU, with retrofit testing efficient and reduce test period and cost of development.
Computing machine that platform hardware of the present invention communicates by a plurality of surveying instruments, through COM1 such as GPIB or RS232 or ModBUS and surveying instrument and the TCH test channel that adopts auxiliary relay types PLC to realize select control module to form.
TCH test channel selects the structure of control module that the test platform setting is more widely used more flexibly and in testing at the I/O of PLC.System of the present invention supports the test of analog module, digital module.
Particularly; According to the present invention; A kind of automatically testing platform of testing to programmable logic controller (PLC) (PLC) test sample book of a plurality of CPU of having is provided; Comprise: a plurality of surveying instruments, be used for cooperating test that corresponding test function need be provided, said a plurality of surveying instruments comprise direct supply able to programme, multimeter, controlled incubator; TCH test channel is selected control module; Comprise: basic control module with relay construction able to programme; Basic control module is connected with the I/O passage of a plurality of PLC test sample books; The passage of receiving computer is provided with instruction, according to passage the passage that test sample book was selected and controlled in instruction is set; The computing machine of selecting control module to communicate through COM1 and a plurality of surveying instrument, TCH test channel.Wherein, computing machine change direct supply able to programme through communication output voltage or electric current to select control module to set the test input voltage or the current value of the load module of PLC sample to be tested through TCH test channel; Computing machine reads test output voltage or the internal conversion value of current signal of the load module of PLC sample to be tested through communication; Computing machine is through Control on Communication and the test input voltage of the output module of revising PLC sample to be tested or the internal conversion value of current signal; Computing machine reads via TCH test channel through communication selects control module to be sent to multimeter and by the test output voltage or the current value of the output module of the measured PLC sample to be tested of multimeter.
Wherein, TCH test channel selects control module also to comprise the expansion control module, is attached to basic control module, has relay construction able to programme, is connected with the I/O passage of a plurality of PLC test sample books.The passage of basic control module receiving computer is provided with instruction, controls the passage that test sample book was selected and controlled to the expansion control module.
Wherein, computing machine uses LabVIEW software according to ModBUS sequence of addresses monitoring a plurality of PLC test sample books to be tested.
Wherein, basic control module selects for use TWDLCAE40DRF model PLC and expansion control module to select a plurality of TWDDRA16RT model PLC for use.
Wherein, the numeral or the analog quantity load module of test PLC test sample book are perhaps tested the numeral or the analog output module of PLC test sample book.
Wherein, between each passage of the module of PLC test sample book be isolate or be non-isolation.
Wherein, if the passage of the input isolation module of test PLC test sample book then selects all relays in the control module to switch to input channel and common passage TCH test channel; If the passage of the output isolation module of test PLC test sample book then selects all relays in the control module to switch to output channel and common passage TCH test channel; If test PLC test sample book is the non-isolation module of input, then a relay in the only use test channel selecting control module is controlled the common passage, the input of other other passage of relay control in the control module of use test channel selecting then; If test PLC test sample book is the non-isolation module of output, then a relay in the only use test channel selecting control module is controlled the common passage, the output of other other passage of relay control in the control module of use test channel selecting then.
The present invention can test analog input and the output module or the digital input and output module of programmable logic controller (PLC) (PLC) automatically.This system architecture not only can be used for the PLC test of the non-isolation of single channel, the non-isolation of hyperchannel through programmable instrument, and can be used for the batch testing of the PLC of hyperchannel isolation.Compare with fixed relay system structure of the prior art, system architecture of the present invention more accurately, flexibly and save time.Facts have proved that PLC automatically testing platform of the present invention can save a large amount of human resources, greatly shorten PLC test period.
Embodiment
To introduce example embodiment of the present invention in detail now, its example is shown in the drawings.Embodiment is described with reference to the accompanying drawings with explanation the present invention.
Fig. 1 is the synoptic diagram according to the programmable logic controller (PLC) automatically testing platform of employing of the present invention relay construction able to programme.
As shown in Figure 1; Programmable logic controller (PLC) automatically testing platform according to employing of the present invention relay construction able to programme comprises upper control computer 1, direct supply able to programme 2, multimeter 3, has TCH test channel selection control module 4, the controlled incubator 5 of relay construction able to programme, places a plurality of PLC in the controlled incubator 5 to measure sample module EUT1......EUTn; N >=1, n is an integer.In programmable logic controller (PLC) automatically testing platform according to the present invention, the equipment that upper control computer 1 and direct supply able to programme 2, multimeter 3, TCH test channel select control module 4, controlled incubator 5 etc. to be used to test communicates.
For example, upper control computer 1 communicates the output voltage or the electric current that change direct supply 2 able to programme through the GPIB port and sets the test input voltage or the current value of the load module of PLC to be tested to select control module 4 through TCH test channel; Then, upper control computer 1 communicates the test output voltage of the load module that reads PLC sample module EUT1......EUTn to be tested or the internal conversion value of current signal through ModBUS.
Host computer 1 communicates the test input voltage of the output module of controlling and revise PLC sample module EUT1......EUTn to be tested or the internal conversion value of current signal through ModBUS; Upper control computer 1 communicates to read via TCH test channel through the RS232 port selects control module 4 to be sent to multimeter 3 and by the test output voltage or the current value of the output module of the measured PLC sample module EUT1......EUTn to be tested of multimeter 3.
Wherein, PLC measurement sample module EUT is the PLC system with CPU module.Measure instruction and the parameter of the CPU module responds of sample module EUT from upper control computer 1 reception; Set the transforming numerical of voltage/current signals of the output channel of output module, or return the conversion value of the input gap voltage/current signal measured value of load module to upper control computer 1.
Upper control computer 1 communicates the target temperature that controlled incubator 5 is set through the RS232 port and can read and control the temperature of controlled incubator 5.Direct supply 2 wherein able to programme is used for the voltage or the current supply of input channel of the analog or digital of PLC, and multimeter 3 is used for the output channel voltage or the current measurement of the analog or digital of PLC.Direct supply able to programme 2, multimeter 3 are connected to TCH test channel simultaneously and select on the control module 4.
According to the present invention, upper control computer 1 communicates through ModBUS and TCH test channel selection control module 4 is set to select and to control the passage of test sample book.The employing that TCH test channel is selected control module 4 to comprise to have relay construction able to programme is the basic control module 41 that realizes of TWDLCAE40DRF model PLC for example.Basic control module 41 is connected with the I/O passage of a plurality of PLC test sample books.TWDLCAE40DRF model PLC is the PLC that exchanges 24 inputs, 14 point relaies, 2 transistor outputs, the built-in ethernet mouth.Basic control module 41 is provided with instruction through the passage that ModBUS receives upper control computer 1, the annexation that 14 point relaies among the PLC that instruction is provided with the TWDLCAE40DRF model are set according to the passage that is received with and connection, off action is selected and control the passage of PLC test sample book.
If total number of channels of PLC test sample book exceeds the number of channels that basic control module 41 can be tested; Then TCH test channel selects control module 4 can also comprise the expansion control module 42 with relay construction able to programme that is attached to basic control module 41, and expansion control module 42 is connected with the I/O passage of a plurality of PLC test sample books.Expansion control module 42 can realize that TWDDRA16RT model PLC is the outputs of 16 point relaies through adopting a plurality of PLC with for example TWDDRA16RT model of relay construction able to programme.
Under the situation that has expansion control module 42; Basic control module 41 is provided with instruction through the passage that ModBUS receives upper control computer 1; Control expansion control module 42 and select and control the passage of test sample book; According to the passage that is received instruction is set, expansion control module 42 be provided with 16 point relay annexations among the PLC of TWDDRA16RT model with and connection, off action is selected and control the passage of test sample book.
Can come programming and testing channel selecting control module 4 according to different test sample book situation.For example, if the passage of the input isolation module of test sample book then switches to input channel and common (Com end) passage with all relays in basic control module 41 or the expansion control module 42 (if having expansion control module 42); If the passage of the output isolation module of test sample book then switches to output channel and common (Com end) passage with all relays in basic control module 41 or the expansion control module 42 (if having expansion control module 42); If test sample book is the non-isolation module of input; Then can only use relay control common (Com end) passage in basic control module 41 or the expansion control module 42 (if having expansion control module 42); Use the input of other other passage of relay control in basic control module 41 or the expansion control module 42 (if having expansion control module 42) then, and can measure a plurality of test sample book input channels at the same time; If test sample book is the non-isolation module of output; Then can only use relay control common (Com end) passage in basic control module 41 or the expansion control module 42 (if having expansion control module 42); Use the output of other other passage of relay control in basic control module 41 or the expansion control module 42 (if having expansion control module 42) then, and can measure a plurality of test sample book output channels at the same time.
Accomplish the programming of basic control module 41 or expansion control module 42 (if having expansion control module 42) repeat circuit through the programming software of the PLC that selected for use in basic control module 41 or the expansion control module 42 (if having expansion control module 42); The PLC that for example can use Twido series is as the control of the relay in basic control module 41 or the expansion control module 42 (if having expansion control module 42) PLC, the annexation between then using the Twido software programming and being provided with in test sample book and basic control module 41 or the expansion control module 42 (if having expansion control module 42) according to the measurement demand.
In the programmable logic controller (PLC) automatically testing platform of employing according to the above embodiment of the present invention relay construction able to programme; The PLC that employing has relay construction able to programme realizes basic control module 41 and expansion control module 42 in the TCH test channel selection control module 4; But; The invention is not restricted to PLC, can also adopt other similar structures to realize.
Upper control computer 1 is the core of automatically testing platform of the present invention; Can for example adopt the graphical program compilation platform LabVIEW of being developed by American National instrument company (NI company) (Laboratory Virtual Instrumentation Engineering Workbench, laboratory virtual instrument engineering platform) to carry out programming and testing.All command-control signals all send thus, and all setting numerical value/measurement results that is used to measure are also all at this setting/finally obtain and generate test result form
Be mainly used in the analog quantity I/O module among the PLC of a plurality of CPU of possessing, the automatic test of digital quantity I/O module according to the programmable logic controller (PLC) automatically testing platform of employing of the present invention relay construction able to programme.As automatically testing platform, it comprises hardware aspect and a plurality ofly selects the automatic test equipment (ATE) of control module 4, controlled incubator 5 to be connected with relevant communication with module to be tested (test sample book), such as direct supply able to programme 2, multimeter 3, TCH test channel; The software aspect is included in the software design such as the for example LabVIEW in for example PLC IDE in the programming and testing channel selecting control module 4 (the integrated design environment of programmable logic controller (PLC)) and the upper control computer 1.
Wherein, The analog module of PLC is to be used for the analog voltage/current of input is measured and exported the module of corresponding analog voltage/current according to setting numerical value; Analog module generally comprises a plurality of passages, and passage is divided into two types: the input channel and the output channel that is used to export analog quantity that are used for input analog amount.Analog module mainly converts the aanalogvoltage of outside input or current value into relevant numerical by linear scaling through input channel and the numerical value measuring and the user is set through output channel converts corresponding aanalogvoltage or the current value line output of going forward side by side into by linear scaling.Therefore, analog quantity I/O module testing analog input amount and imitated output quantity mainly comprise accuracy coefficient, nonlinearity and temperature characterisitic etc.
For example, direct supply 2 able to programme provides power supply as the input power supply for the analog quantity load module of measuring sample PLC.Whether upper control computer 1 is selected the output state of basic control module 41 or the relay in the expansion control module 42 (if having expansion control module 42) of control module 4 to control direct supply 2 able to programme through the control TCH test channel to be connected with load module.In this way, select to measure sample PLC with passage to be tested.The PLC program will be downloaded among the CPU of test sample book PLC, thereby the input value of test sample book PLC will be moved to relevant register.And upper control computer 1 can read the value of these registers among the CPU through Modbus.
When the user wanted test simulation amount output module, test platform can switch to output mode.In this case, upper control computer 1 can write the relevant register among the CPU of test sample book PLC through the value that Modbus will be provided with.And the PLC program of being downloaded moves to output channel with these values.Use multimeter 3 to collect the output valve with measured module, existing side by side soon, output data is sent to upper control computer 1.
In the test of execution and temperature correlation, upper control computer 1 and controlled incubator 5 are coupled together through the RS-232 cable.Therefore controlling controlled incubator 5 moves special time period under a temperature, and after upper control computer 1 has obtained all values, under next temperature, moves.Save the data in the EXCEL worksheet in order to handling in the future.
On the other hand, the digital quantity input module of PLC is to convert on-the-spot various switching signals to be used for the PLC inter-process standard signal.The digital quantity output module of PLC is to carry out corresponding control to the switching signal scene of outputing to of PLC set inside or processing.Digital quantity I/O module testing test digital input amount and digital output module comprise input and output value, voltage and current threshold value, frequency test etc.
Digital quantity I/O module testing uses and the identical test configurations of analog quantity I/O module testing, only is that the particular content of the LabVIEW application program in the upper control computer 1 is different.
According to the programmable logic controller (PLC) automatically testing platform of employing of the present invention relay construction able to programme owing to can test to the PLC sample of a plurality of CPU of containing; Upper control computer 1 is provided with different the next ModBUS addresses to each test sample book, and LabVIEW will test test sample book according to the next ModBUS address successively.
Be used to contain the I/O test of the PLC product of CPU according to the programmable logic controller (PLC) automatically testing platform of employing of the present invention relay construction able to programme.In test platform of the present invention; Test sample book connects after the completion; The user only needs in upper control computer 1, according to the test needs corresponding state that TCH test channel is selected the relay in the control module 4 to be set neatly; And the relevant parameter of other test is set, and working procedure then, test can automatically be carried out.Simulation with I/O the module that therefore can dispose PLC is easily measured, digital I/O module is measured, and greatly reduces PLC test duration and cost.
Though illustrated and described the example embodiment of being considered of the present invention; But it will be appreciated by those skilled in the art that; Along with development of technology, can make various changes and revise and can replace its element and not deviate from true scope of the present invention with equivalent.