GPIB-based car audio automatic test system

The GPIB-based automatic test system is a combination of computer technology and automatic test technology, and is widely used in many fields. Based on the introduction of GPIB-based automatic test system components and GPIB technology principles and features, this paper focuses on the car audio test system that has been used in practical engineering applications. This system greatly improves the automation of the test and enables testers to Freed from the heavy test tasks, the focus is on the design of the test scenario and the preparation of the test sequence, highlighting the superiority of automated test systems.

This article refers to the address: http://


1 Automatic test system One test project is that the computer sends a message to several test instruments. The computer and test instrument are connected by GPIB cable. This requires the test instrument used to support the message sent by CPIB is actually SCPI (Standard Command). For Program—ming Instrument) language. In recent years, the new test instrument has a GPIB interface that allows it to be connected to a computer to form an automated test system. The system not only improves the measurement accuracy of the instrument, but also has the data processing capability, and can replace the hardware with software or even complete the functions that the hardware cannot. In general, a complete test system consists of a controller, test instrumentation, test software, and an interface bus, as shown in Figure 1.

2 GPIB technical characteristics and working principle
2.1 Features of GPIB (1) The GPIB interface board is placed inside the device, and the designer does not have to consider the problem of designing the interface. This interface is suitable for any system that the device can participate in. Its versatility is self-evident.
(2) GPIB has advanced features, only need to move the device and plug the cable plug when operating, does not involve the specific hardware design of the connector, because GPIB introduces some advanced interface concepts, and functional, electrical and mechanical The regulations are well established and ensure full compatibility. This feature of GPIB is expressed in programming, which reduces the burden of software design and can be programmed in high-level languages.
(3) The GPIB system is flexible and easy to use. The system built with GPIB interface equipment is a real “distributed” system. They “accumulate” into an automatic test system, and “scatter” can be used separately. Unparalleled flexibility.
(4) The GPIB interface is about 10% more expensive than the general interface, but considering that the test system is connected to multiple peripherals, the GPIB interface is cheaper than the general interface. Therefore, from the aspects of versatility, compatibility, flexibility and economy, the GPIB interface is unmatched by other interfaces.
2.2 GPIB Busbars In order to transmit effective information, the GPIB system generally requires three different elements: the speaker, the listener and the controller. Its data transmission is performed in bit parallel, byte serial, bidirectional hook and bidirectional asynchronous. There are 24 buses, which can be divided into 3 categories: 16 signal lines, 1 shielded line, and 7 ground lines. The signal lines are further divided into three groups: the first group is an 8-bit data bus for transmitting data, commands or status words. The second group is the interface management bus, which consists of five signal lines: ATN, IFC, REN, SRQ, and EOI are used to control the bus process and function as a bus command. The last group is three hook lines (DAV, NRFD, NDAC) for data communication to ensure smooth asynchronous transfer.
2.3 Three-line hooking process Data transfer is performed by a three-line hook between the speaker and the listener. The basic process is:
(1) The sender sends data to the data bus, but does not declare the data valid, that is, DAV=0;
(2) The receivers are ready to receive data, and jointly use NRFD=0 to indicate to the sender that they are ready to receive data;
(3) When the sender confirms that all the receivers are ready to receive data, the DAV=1 message is sent, indicating that the data placed on the data bus by the receiver can be received;
(4) When the receiver confirms that the data can be received, the signal NRFD=O has no longer been retained, thus restoring the state of NRFD=1, preparing for the next cycle;
(5) The receiver starts receiving data;
(6) Because the receiving data speed is different, the receiver successively receives the data. When the receiving device with the slowest receiving speed is received, the bus NDVC=0, indicating that all the receivers have received;
(7) When the sender confirms that each receiver has received the data, the original "data valid" information DAV=1 has not been reserved, so DAV=0 is issued, and the data on the data bus is removed at the same time;
(8) Each receiver recovers NDVC=l according to the received DAV=1 information. By this time, the DAV, NRFD, and NDAC lines have been restored to the original state, indicating the end of an interlocking contact cycle and completing the next cycle. Ready.


3 GPIB-based car audio test system
3.1 Hardware System
3.1.1 Introduction to Test System This project is an integrated audio test system for car audio. Taking into account the future expansion of the system, the unified platform structure of the test automation system will be fully adopted, and the function of the audio part will be realized in this structure. The car audio test system is mainly divided into five parts: dual channel audio signal generator and dual channel audio signal analyzer, standard signal generator, audio switch, controller, standard DC power supply and software system. Together assume the full system function. Among them, the audio analyzer, signal generator and DC power supply all adopt German high-performance test instruments, which can complete accurate test requirements.
The audio analyzer includes dual-channel audio signal generation and signal analysis. It has extremely high sensitivity and rich acoustic test-specific functions. Its parallel operation mode is fully compliant with stereo test requirements. Signal Generator The RF signal generator works with UPV to generate FM and stereo signals and can be used as a source of interference for reception testing.
Audio Switching Switch The audio switching switch consists of two parts: the switch box and the switch box main unit. The switch box is used for matrix switching between audio signal paths, such as switching between stereo and other test items; the switch box host controls the switch box through the PCI board to ensure that any test items do not require manual intervention of the audio line connection.
The controller controller adopts an ordinary PC, which mainly controls the control of each instrument and related software.
DC power supply standard DC power supply, mainly used to power the measured audio equipment, it can meet the power supply requirements of car audio.
The software system software is implemented using Microsoft Visual C++ and runs under the Windows XP environment. All test work of the tester is completed under the software, including the selection of the test project, the control of the test sequence, the display of the test results (including the display of the chart, etc.), the preservation of the test results, and the output report. The tester's job is simply to select the corresponding test project to start the test. The control of the instrument, the display and save of the final result are all performed by the software.
3.1.2 Test principle Standard signal generator SML analog station generates RF signal, audio analyzer UPV generates modulation signal through SML Modulation port to modulate the RF signal generated by SML, the modulated signal is output to the RF port of SML The measured sound, the measured sound produces an audio signal through a series of transformations and then outputs to the UPV, and the audio analyzer UPV analyzes the audio signal generated by the measured sound to produce a test demand result.
3.1.3 System Topology The topology of the system is the connection diagram of the whole system, as shown in Figure 2. The controller and the test instrument are connected by a GPIB cable, and the audio analyzer and the switch box are connected by an audio connection line, and the standard signal generator and the switch box are connected by an RF cable, and between the radio and the switch box. The connection is made through an audio cable, and the switch box host and the controller are connected by a network cable, and the switch box and the switch box host are connected by PCI.

3.2 Software System The system uses Windows XP operating system as the operating environment of the system, and uses Microsoft Visual C++ as the system software development platform to develop the application interface. Use Visual C++ according to the SCPI command of the test instrument. To write a hardware driver library.
The software adopts a modular programming method and is divided into different functional modules: hardware driver part, system interface part and data management part.
3.2.1 Software design ideas System software design mainly adopts object-oriented design ideas. The application software structure based on object-oriented technology is easy to understand, modify and reuse, which can significantly improve the efficiency of software development and maintenance.
In the software design, each test instrument is packaged into classes according to various devices and functions, that is, signal source class, signal analysis class, power source class, etc., and the functions and variables of each instrument operation are encapsulated as methods and attributes of the class. In each class. These classes describe a set of identical objects with common methods and general characteristics, such as signal source classes that characterize the common properties of the signal source, such as waveform type selection, waveform parameter settings, and so on. The CObject class is used to derive a measurement data class, and the sampled data is used as the main attribute of the measurement data class. Various measurement sampling methods, data processing methods, and data representation methods are used as interface methods for measuring data types. Using this approach combined with design patterns and polymorphisms facilitates the normalization and free extension of interfaces.
Construct measurement data classes, using direct encapsulation structures and arrays. Since the measured data volume is generally large, global objects and shared memory files are also common methods. You can also use template classes such as CArray classes, CList classes, and more. They all support the dynamic addition of complex classes.
The software uses COM component technology to encapsulate various data processing algorithms, such as fast Fourier transform, filtering, etc., to process the data for use by the user interface. The Component Object Model (COM) defines how different objects communicate with each other using a common agreed protocol, a language- and platform-independent standard. The most important feature of COM components is their object-oriented nature. Through object-oriented technology, the user interface does not need to pay attention to what kind of hardware it is currently operating. It only needs to use the agreed protocol to send and receive data and commands to the component through the public interface, and the specific operation is done by the component, thus achieving device independence. Sex.
In the user interface, the constraint relationship between interface elements can be used to temporarily block other interactions by calling the cursor with the Win32 API function LoadCurroe. You can also use CWnd::EnableWindow, CWnd::ShowWindow to set the corresponding interface controls to block some interactions. This makes it easy to mask other operations while performing an operation.
The software design uses VC++ multi-thread programming technology. Multi-threading is to make multiple threads work in parallel to complete multiple tasks and improve system efficiency. In this test system, because data acquisition and data processing are parallel, it is necessary to design two threads in the software: one thread for testing and reading the test results; and another thread for the interface display of the test results. Parallel tasks can be implemented with CWinThread class threads. Threads communicate through messages and use global variables to pass data. In addition, it is necessary to solve the coordination synchronization between the two threads, so as to achieve the synchronization of test and display, and timely respond to the user's control of the experimental process.
Also, for testing purposes, it is sometimes necessary to send a custom message from a class of a certain category. There are two forms of message delivery: SendMessage and PostMessage. You can also use the system registration message RegisteWin-dowMessage for multiple instruments to collaborate. The event response technology is message driven. The control commands can be formed by responding to interactive events on the user interface, and the measurement control actions are implemented in the message response function. The message system triggers the sampling method of the measurement data object, and the instrument driver is operated to obtain the measurement data; after the measurement data arrives, the data is processed, expressed, and finally presented to the user, which is the workflow of the system software. It is realized by using the user interface and the two central objects of the measurement data as a medium. The software test flow chart is shown in Figure 3.

3.2.2 Hardware Driver The driver of the interface board is the lowest layer of the system control software. It directly controls the GPIB interface board to implement I/O operation on the signal. The interface library functions are designed according to the function, and the interface library functions are wrapped in the dynamic link library DLL (the dynamic link library is a module containing function sets and data, which provides a modular application method). The hardware driver is written according to the SCPI command provided by the test instrument, and is written in Visual C++. Generated with VC++. The exe file is placed directly into the application. The application software generates an XML file, which contains the written hardware driver library information, from which the user can find relevant driver information.
3.2.3 System Interface The core of the software part, which is directly facing the user, is the top layer of the system control software. The system has a good man-machine interface. On the one hand, it allows the user to flexibly select the test items to be performed, and prompts the user through the timely dialog box prompts, and can display the current test status in real time, such as: test start The test is in progress and the test is complete. On the other hand, the user can perform various functions through the interface, such as selecting the items to be tested, including amplitude modulation (AM), frequency modulation (FM), stereo modulation (STEREO), and CD testing. Each test project will have several sub-test items. For example, AM includes noise-limiting sensitivity test, interference frequency test, and automatic amplifier test. When the user selects the test item, its corresponding sub-test items will be listed for users to make flexible choices. In addition, the results of the test can be displayed in the interface immediately after the test is completed. All results are saved while the results are displayed. The user can view the saved results through the operation buttons on the interface. This method allows the user to monitor whether the test indicators meet the requirements in real time, and also allows the user to analyze the results after the event, which provides great convenience for the user. At the same time, it is also possible to generate an output report according to the user's needs, and the report is given in the form of Word.
3.2.4 Data Management Data management can be real-time or non-real-time. Real-time means that after the test is completed, the results of the test will be displayed on the interface immediately. Non-real-time means that all test results can be saved for later use by the user. There are two ways to manage data: one is the result given numerically, and the other is the result given graphically. The results in digital form are automatically saved in the text document, and the results of the chart mode can be selected by the user to save the path, which is more flexible. All operations can be done through operations on the interface.
3.3 Test method examples
3.3.1 GPIB-based FM noise-reduction sensitivity test (1) First tune the radio under test to 94.1 MHz;
(2) The antenna interface of the signal radio with FM modulation, 94.1 MHz, frequency offset 75 kHz, and high frequency level set to 4 dBμV is provided by computer control. The modulation frequency is 1 kHz generated by the audio analyzer.
(3) The software's selected noise-limited sensitivity test project can start testing.
The test results are judged according to the TL972 standard. The TL972 standard specifies that the noise-limited sensitivity of FM should be 4-8 dBV.
3.3.2 Frequency response test of GPIB-based CD (1) First play the test track (usually the frequency-swept track and play the 20 Hz to 20 kHz sweep track).
(2) The output of the audio analyzer is read by the computer every time the frequency is changed, that is, the output level (in dBμV) at the corresponding frequency. Record each frequency and corresponding output. After all frequencies have been played, the frequency response map will be automatically drawn on the software interface, and the corresponding frequency and output will be given as a list at the same time.
(3) Save the data of the frequency response map and the list mode for later use.
The computer uses GPIB to control the test instrument to complete the test ratio. The manual test greatly improves the workload of the tester, completely automates the test work, reduces manual intervention, and greatly increases the test speed and accuracy.


4 Conclusion Based on the GPIB automatic test system, the advantages of the virtual instrument are fully utilized, the test results are accurate, and the real-time performance is good. At the same time, the software adopts the object-oriented design idea, which is conducive to further expansion or modification. The system has been successfully applied to car audio testing, with high reliability, high accuracy of test results, stable system, convenient software upgrade and good portability.

SMD Transformer

SMD Electric Power tansformer ,POE transformer ,EP7 SMD tansformer ,EP13SMD tansformer,EPD SMD tansformer

IHUA INDUSTRIES CO.,LTD. , https://www.ihuagroup.com

Posted on