Smart test
Design of Virtual Instrument Signal Automatic Test System Based on GPIB Bus
With the development of measurement and control technology, more and more test items and test parameters are required, and higher requirements are put forward for the speed and accuracy of automated testing. Virtual instrument is a modular system based on computer and standard bus technology, usually composed of control module, instrument module and software. The software integrates the computer hardware resources and the instrument hardware into one organically, thus combining the powerful computing and processing capabilities of the computer with the measurement and control capabilities of the instrument hardware, greatly reducing the cost and volume of the instrument hardware, and the data is checked through the software. Perform display, storage, analysis and processing, and are widely used in civil and military measurement fields III. As a kind of virtual instrument technology, GPIB bus instrument with its good reliability and high precision makes the virtual instrument based on this bus widely researched and applied in the field of automated testing.
The GPIB bus is a digital 24-wire parallel bus. It consists of 16 signal lines and 8 ground return lines. The 16 signal lines of GPIB are divided into three groups: 8 data lines, 5 interface management lines, and 3 handshake lines. It can implement tasks such as bus initialization, device addressing or address release, and setting device modes for remote or local programming. GPIB uses an 8-bit parallel asynchronous data transmission scheme.
Because a certain weak signal processing module needs to test a variety of performance indicators, the traditional manual measurement method is inefficient, and the influence of human factors is greater. It is easy to damage the module in the case of operating errors, which is not suitable for mass production product testing. The development of automatic test equipment for this module can effectively save manpower and time in batch product testing, reduce errors caused by human factors, and improve test accuracy. It has a great promotion effect on the mass production of products. Conducive to the quality control of the product.
1 Main functions of the system
The automatic test system is mainly used in the automatic detection of a certain type of weak signal processing module, to realize the automatic detection of 7 major items and more than 100 small items, instead of using separate instruments to manually test item by item. The test system needs to have the following main functions. 1) Provide the module with +12V, -12V DC power supply and variable frequency and amplitude sine and pulse signal input; 2) Test the AC noise and DC bias of the module; 3) Test the output waveform distortion of the AC channel; 4) Perform the module Automatic testing of multiple performance parameters such as transimpedance, high and low end cutoff frequencies, AGC, isolation, etc.; 5) Test DC channel transimpedance and other performance indicators; 6) Provide high and low temperature test fixtures and achieve normal temperature and high and low temperature conditions Test; 7) Record, display and print out the results in the form of waveform and data table; 8) Self-check function and over-current protection function. The test system should have a good graphical user interface and a friendly human-machine dialogue environment. The software interface should include power supply self-check, signal source check and self-calibration functions. The frequency and amplitude of the excitation signal of the input module can be adjusted. The test system should have two working methods, which can be tested in sequence according to the test items, or program-controlled tests can be performed on selected single or multiple test items. During the test, the interface displays the working status, test items and measured data of the test system in real time. It has the functions of real-time recording, storage and printing of product test data, and can automatically generate standardized tests and test curves. The test process can be terminated at any time, and the automatically generated test form can be viewed to automatically identify unqualified items. The block diagram of the test system is shown in Figure 1. The design of the test system includes two parts: hardware design and software design.
Design of Virtual Instrument Signal Automatic Test System Based on GPIB Bus
2 Test system hardware design
The hardware part of the test system is composed of special fixture, acquisition control board, GPIB interface card, digital I/O card, function signal generator, digital multimeter, digital storage oscilloscope and industrial computer. The industrial computer selects each pin channel of the module and sends a signal through the acquisition control board, and the signal of the channel to be measured is input to the corresponding instrument for measurement. The industrial computer is connected to each instrument through the GPIB bus, and control commands are sent to each instrument, and the measured data is sent to the industrial computer for analysis and processing. Using the GPIB bus star connection mode can prevent the communication between the industrial computer and other instruments from being affected by the shutdown or abnormal operation of a certain instrument.
Design of Virtual Instrument Signal Automatic Test System Based on GPIB Bus
Figure 2 is a block diagram of the hardware composition of the system. Among them, the DC stabilized voltage source provides the working voltage of the module, which is provided to the special fixture for the module through the acquisition control board. Function signal generators, digital multimeters and digital storage oscilloscopes have GPIB interfaces. Insert a GPIB card into the expansion slot of the industrial computer to obtain the GPIB interface of the industrial computer, which can be connected by GPIB cables to transmit data and signals. The industrial computer realizes real-time control of the acquisition control board and other equipment through the GPIB card and digital I/O card, sends commands to the controlled objects, coordinates the actions between them, reads data from the measurement equipment, and analyzes and analyzes the data. Processing, save the complete measurement results or print them out as a report.
The function signal generator adopts Agilent 33220A to provide sine signal and pulse wave signal to the module. The frequency range of the sine wave that Agilent 33220A can provide is 1μHz~20MHz, the amplitude range is 10mVpp~10Vpp, and the accuracy is 1mVp-p. The Agilent 33220A function signal generator has an IEEE488.2 standard GPIB port, which can communicate with an industrial computer, and the industrial computer can set its output waveform parameters. The digital oscilloscope adopts TDS1002 produced by Tektronix, with a bandwidth of 60MHz and a sampling rate of 1.0GS/s, which can meet the test requirements; the TDS1002 oscilloscope has a GPIB port that meets the IEEE488.2 standard, which can communicate with an industrial computer and transmit the test results To the industrial computer. The digital multimeter adopts Agilent 34401A, with 6 and a half digital resolution, accuracy of 1μV, AC voltage measurement range of 15mV~750V, frequency measurement range of 5Hz~1MHz, accuracy of 0.01Hz, with GPIB meeting IEEE488.2 standards The port can communicate with the industrial computer to complete the measurement of the frequency and AC/DC amplitude of the output waveform of each channel of the module, and to detect the output of the DC stabilized voltage source and the function signal generator.
2.1 DC stabilized power supply unit
The DC power supply provides +12V and -12V voltage for the module, and +5V working voltage for the GPLD and relay on the control board and the module fixture board. Using DH1718G-4 type DC stabilized voltage source, this power supply has two adjustable DC voltage outputs of 0~+36V and 0~-36V and one ten 5V fixed voltage output. The output currents are 0~+3.5A and 0~ respectively. -3.5A, the effective value of the ripple voltage is 0.5mV.
2.2 Main control computer system
The main control computer system is composed of an industrial computer host, a GPIB bus interface card and a digital I/O card. The computer host adopts an industrial computer produced by Advantech Technology Co., Ltd. The memory requires a relatively large capacity in software calculation and display, and the memory capacity is configured as 1Gbytes. The GPIB bus interface card uses the PCI-GPIB interface card produced by National Instruments. The interface card supports the "Plug and Play" standard. The connector adopts the standard 24-pin connector of IEEE488.1, and the data transmission supports two modes of standard IEEE488 and HS488. . The digital I/O card adopts PCI-6503 produced by National Instruments. It is a digital I/O card with PCI bus interface. It has strong compatibility and supports the "Plug and Play" standard. It adopts 5V TTL/CMOS control level and has 3 channels. A total of 24 bits of input/output.
2.3 Acquisition control board
The acquisition control circuit board is divided into 4 parts: power processing, signal input, signal output and CPLD control. The power processing part is responsible for the working power of the 8 modules under test and the gating of the gain control pins; the signal input part provides the signal output by the signal generator to the module to be tested; the signal output part sends the output signal of the module to be tested Take measurements with a digital multimeter or oscilloscope. The CPLD also sets up 5 output pins A to E to control the on and off of the relay on the module fixture board. In order to meet the needs of products and fixtures, an ultra-small, high-sensitivity current-operated signal relay is selected, which has small on-resistance, large insulation resistance, long life (up to tens of millions of switching times), small size and light weight.
The industrial computer first writes the control word to the digital I/O card. The digital I/O card transmits 8-bit command data to the CPLD on the acquisition control board. The CPLD decodes the received control commands to generate control signals for each relay. At each output pin of the CPLD, a drive circuit is used to improve the current drive capability to realize the control of the relay, so as to realize the gating of the corresponding channel of a certain module under test. In addition to the relay array on the acquisition control board, there are also 5 relays on the fixture board to realize the nearby grounding of the module's input channel. The CPLD module uses Xilinx's XC9572-15PC84. XC9572 is a kind of Xilinx's XC9500 series of CPLDs. It uses advanced Fast FLASH ISP technology, which can provide more than 10,000 programming and erasing cycles, and provides advanced system internal programming And test function.
3 Test system software design
The whole software system design is divided into 4 modules: man-machine interface, data processing, instrument control and data transmission, as shown in Figure 3. Among them, instrument control and data transmission are combined in the testing process. They are developed as the underlying program, and are integrated into subroutines according to their functions. They are divided into multiple sub-modules to be designed separately for the main test program to call, which improves the software's performance. Reliability, maintainability and scalability. The front desk is the man-machine interface, which detects and judges the test-related information input by the user, forms the test process and calls the corresponding subroutine. The background data processing part analyzes and judges the measurement data returned by the instrument and forms a report for archiving. The testing software works in two ways: automatic testing and program-controlled testing. The automatic test mode can test all items in sequence; the program-controlled test mode can test the selected single item or multiple test items individually. It can be compatible with weak signal processing modules of different designs through software function changes. The software development platform of the test system adopts LabVIEW 8.2 of American NI Company.
Design of Virtual Instrument Signal Automatic Test System Based on GPIB Bus
Five main interfaces are set up according to functional requirements, namely login, user management, parameter setting, testing and report management. The login interface judges the corresponding authority by verifying the user name and password entered on the screen. The software system controls the actual instrument to perform 7 major tests on the tested module. The control signal and measured data are transmitted through the GPIB bus. In the testing process, data processing and analysis are performed at the bottom layer to determine whether it meets the index requirements, and organize and summarize. The test system software organizes the drivers of all hardware resources in the form of a driver library, so that the test application can operate on various hardware resources by accessing the driver library functions, which improves the computing power of the system.
3.1 The realization of the login interface
The corresponding authority can be obtained by judging the user name and password. If you are a system administrator, enter the "True" condition of the Case box, and display all functions such as data management, parameter modification, and testing by setting the visual attributes of the functions on the login interface. If it is a normal user login, enter the "False" condition of the Case box. In the inner Case box, the program sets the Visible properties of the four function buttons, and sets the Boolean global variable at the bottom right "is the system administrator" "Assignment. The assignment of the global variable is to communicate with the data management interface, and differentiate the functions of different user rights on the data management interface.
After the user logs in, the program continuously checks the status of each function button on the screen, and once a button is pressed, it enters its corresponding sub-interface. The sub-interfaces are all made into VIs and stored in the same root directory of the login interface. In the program, use the Call By Reference Node function to dynamically call the sub-interface, which is essentially to dynamically control the VI. In the sub-interface dynamic calling program, first use the Refnum function and the Open VI Reference function to generate and open the reference (reference number) of the called sub-interface VI, and then use the Open FP action in the Invoke Node function to open the front panel window of the sub-interface. And set the properties of the called VI through the Property Node function. Set the state of the called sub-interface to Activate, and then you can operate the controls on the called sub-interface. Use the Call By Refer-ence Node function to call. After the call is completed, use Invoke Node to close the front panel window of the sub-interface. Release the Reference. In the entire software system, the related functions are integrated in a sub-interface, and the sub-interface is dynamically called to make the program run rationally and easy to use.
3.2 The realization of the main interface of the test
The main interface of the test is the complex and function-intensive part of the entire test software. It discriminates the test information input by the operator and forms a test process. Through the test process, the subVI of the corresponding test function is called to complete the test task. It is necessary to control the digital I/O card and GPIB interface card on the industrial computer through the program, so that it can input and output according to the setting of the program; the test progress and test data are displayed in real time during the test, and some test items are displayed on the interface as required The measured signal waveform; it is necessary to judge the data measured during the test. In the design of the Feng interface, each test item is independently written to form a subVI for calling. After the test project is completed, a series of operations such as report sorting and database insertion are carried out to update the measured data in time.
Because the module has different qualification indicators for different temperatures, three options of normal temperature, low temperature and high temperature are designed on the main interface. Use While loop box and Event Structure (event structure) to achieve the above functions. The While box in the outer layer makes the program loop to wait for the operator's selection action to occur, and the Event Structure box is the program that responds to the action.
The operator presses the "initialization" button, and the system runs the initialization subroutine to check whether the multimeter, signal generator, oscilloscope, stabilized power supply, etc. are working normally, and check whether there is a module in the selected test position of the fixture. The initialization program also measures the power supply current of the module under test, and performs adaptive correction of the excitation signal required for the test. After all the above items are passed, the initialization procedure ends. The program waits for the operator to press the "start test" button. Obtain the information of the tested module and the tested items to form
Test program flow, enter each test item subprogram according to the flow.
3.3 AC noise test
The AC noise of a weak signal processing module mainly consists of thermal noise, shot noise and 1/f noise. The AC noise test measures the AC noise voltage value Vn of each AC channel. The noise waveform needs to be observed during the measurement process, which should be a bandwidth-type non-periodic waveform. The program outputs the control word through the I/O card, drives the relay, gates the chip under test, and connects the circuit between its input and output pins and the actual instrument. The AC input channels of the tested chip are all connected to GND. After the output of the tested chip is amplified by a low-noise amplifier circuit by 30 times, it is measured by a multimeter and transmitted to the program through the GPIB bus. The subroutine "Display Waveform 30s" calls the oscilloscope, collects the noise waveform data amplified by 30 times, and transmits it to the program via the GPIB bus and displays it on the interface in real time for 30s.
3.4 Modification of parameter index
The parameter index can be modified by the system administrator and stored in time as a qualification criterion. The indicator parameters are stored in the designated path of the computer in the form of a binary file. Each time the parameter modification interface is run, the binary file is first read out, and these parameters are initialized to the corresponding controls of the interface, and the recent modification results are displayed to the operator. After the operator completes the modification, the modification status is updated and stored in the binary file of the specified path, overwriting the original file, and keeping the indicator parameters.
3.5 Calculation of waveform distortion
Distortion Measurements. vi is a program that calculates the degree of waveform distortion. Harmonic distortion refers to the extra harmonic components of the output signal than the input signal when the signal source is used for input. Harmonic distortion is caused by the system is not completely linear, it is usually expressed as a percentage. The calculation formula of total harmonic distortion THD is as follows:
Design of Virtual Instrument Signal Automatic Test System Based on GPIB Bus
In the formula, V2 to Vx are the harmonics of the fundamental wave V1. X is limited to the Nyquist frequency range.
3.6 Function design of test record
The program forms the corresponding program flow through the report management information input by the operator on the interface. The program can print and save the test reports of 6 modules. The program mainly uses the Write File function in the File I/O function combined with the format control program to generate reports. The program first sets the head and tail display information of the report, and uses the Initialize Report function to initialize it into a standard report. Use the Append Report Text function to add the content of the printed report. The first Append Report Text function adds information about the corresponding module of the report, such as test time, module serial number, and batch number. The second Append Report Text function adds the tester's signature, date of signing and QC signature and other remarks. After the report is generated, use the Print Report function to send the formatted report to an online printer for printing out. Use Append Text Table with diff column width to Report to generate report functions for tables with different column widths. In the For loop structure, the report format is sorted through the cascading sequence box, and the data is extracted from the test result array through the loop counter of the For structure, and operations such as rearranging and inserting the corresponding position in the report are performed.
Design of Virtual Instrument Signal Automatic Test System Based on GPIB Bus
4 Achieve results
Table 1 shows the test results obtained by using the test system to measure the main parameters of the standard module. It can be seen from Table 1 that the test results of each parameter are accurate, and the retest consistency is good. After the development of this test system, it has been tested and inspected in batches of module products, and it satisfies the test requirements of a certain weak signal processing module. The indicators of various test parameters have reached the design requirements, and it is convenient to use, user-friendly, and software functions. It is convenient and flexible to change. It has been used in the mass production of an infrared tracking product.