Virtual Instrument Technology and Its Application in Data Acquisition

Publisher:和谐的24号Latest update time:2012-11-05 Source: 21IC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Virtual Instrument is an instrument designed and developed with a brand-new concept. It is a new technology developed in the 1990s and is mainly used in the fields of automatic testing, process control, instrument design and data analysis. Its basic idea is to replace hardware with software as much as possible in instrument design or test system, that is, "software is instrument". It is based on a general computer platform and defines and designs the test functions of instruments according to user needs. Its essence is to make full use of the latest computer technology to realize and expand the functions of traditional instruments. 1. Characteristics and composition of virtual instruments 1.1 Characteristics of virtual instruments Compared with traditional instruments, virtual instruments have obvious advantages such as high efficiency, openness, ease of use and flexibility, powerful functions, high cost performance and good operability. Specifically, they are: high degree of intelligence and strong processing power. The processing power and intelligence of virtual instruments mainly depend on the level of instrument software. Users can fully apply advanced signal processing algorithms, artificial intelligence technology and expert systems to instrument design and integration according to actual application needs, thereby raising the level of intelligent instruments to a new level. Strong reusability and low system cost. By applying the concept of virtual instruments, the same basic hardware can be used to construct a variety of test and analysis instruments with different functions. For example, a high-speed digital sampler can be used to design a variety of instruments such as digital oscilloscopes , logic analyzers, counters, etc. The test instrument system formed in this way is more flexible, more efficient, more open, and has a lower system cost. By connecting to a computer network, the distributed sharing of virtual instruments can also be realized to better play the use value of the instrument. Strong operability, ease of use and flexibility. The virtual instrument panel can be defined by the user, and different operation display interfaces can be designed for different applications. The use of the computer's multimedia processing capabilities can make the instrument operation more intuitive, simple, and easy to understand. The measurement results can be directly entered into the database system or sent through the network. After the measurement, the required reports or curves can be printed and displayed. These greatly improve the operability of the instrument and make it easy to use and flexible. 1.2 The composition of virtual instruments. The construction of virtual instruments is mainly considered from two aspects: hardware circuit design and software development and design. The design of the hardware circuit is mainly determined by the tasks faced by the user. The interface bus standards that can be selected for interface design include GPIB bus, VXI bus, etc. It is recommended to use VXI bus. Because it has the advantages of strong versatility, good expandability, high transmission rate, strong anti-interference ability and good open performance, it has been quickly recognized by major instrument manufacturers since it was first launched in 1987. At present, VXI modular instruments are considered to be the most ideal platform for virtual instruments and the development direction of instrument hardware. Since the basic components of the hardware platform of VXI virtual instruments are some general modules and special interfaces. Therefore, the design of hardware circuits can generally choose to use various existing functional modules to build. General modules include: signal conditioning and high-speed data acquisition; signal output and control; real-time data processing. These three parts summarize the basic components of digital instruments. By assembling general modules with one or more functions, any virtual instrument can be constructed. For example, using high-speed data acquisition modules and high-speed real-time data processing modules can form an oscilloscope, a digitizer or a spectrum analyzer; using signal output and control modules and real-time data processing modules can form a function generator, a signal source or a controller. Special interfaces are designed for the needs of instruments for specific purposes, and also include some fieldbus interfaces and various sensor interfaces. The main hardware of the system includes controllers, host boxes and instrument modules. Commonly used control schemes include hardware schemes for GPIB bus control, hardware schemes for MXI bus control, and hardware schemes for embedded computer control. VXI instrument modules are also called devices. VXI has four types of devices: register-based devices, message-based devices, memory devices, and expansion devices. Memory devices are just special register-based devices used to store and transmit large amounts of data. Expanders are currently spare parts, providing a development channel for new devices in the future. Whether to make VXI instruments into register-based devices or message-based devices is the first decision to be made. The communication of register-based devices is very similar to that of VME bus devices, which are programmed with binary information at a low level. Its obvious advantage is speed. Register-based devices communicate entirely at the level of direct hardware control. This high-speed communication can greatly improve the throughput of the test system. Therefore, register-based devices are suitable for modules in the signal/output part of virtual instruments (such as switches, multiplexers, digital/analog conversion output cards, analog/digital conversion input cards, signal conditioning, etc.). Message-based devices are different from register-based devices. They use ASCII characters to communicate at a high level, which is very similar to stand-alone HPIB instruments. Message-based devices communicate with each other using a set of well-defined "word serial protocols". This asynchronous protocol defines the hook requirements for transmitting commands and data between devices. Message-based devices must be managed and controlled by a CPU (or DSP). Therefore, message-based devices are suitable for modules in the digital signal processing part of virtual instruments. The development and design of software includes three parts: VXI bus interface software, instrument driver software and application software (soft panel). The software structure is shown in Figure 1.




















Figure 1 System software composition

The VXI bus interface software is provided by the zero-slot controller, including resource manager, resource editor, interactive control program and programming function library. This software establishes a connection between the programming language and the VXI bus, provides control and support for the VXI backplane bus, and is the basis for realizing VXI system integration.

The instrument driver is a software program that completes the control and communication of a specific instrument, that is, the driver software of the module. Its design must comply with the two specifications of VPP, namely VPP3.1 "Instrument Driver Structure and Model" and VPP3.2 "Instrument Driver Design Specification".

"Soft panel" design is to design a panel with variability, multi-layer, self-service and humanization. This panel should not only have functional components such as display, LED, pointer-type meter, knob, slide bar, switch button, alarm device, etc. like the traditional instrument panel, but also should have multiple coherent operation panels, online help functions, etc.

2. Application of virtual instruments in data acquisition The

use of virtual instruments to make data acquisition devices can be completed in two steps: hardware design and software design.

2.1 Hardware Design

Hardware design should complete the following:

(1) A/D conversion and data storage

Setting up a universal data acquisition system should generally meet the requirements of acquiring multiple signals as synchronously as possible. In order to store the acquired data not only on the data acquisition device, but also to timely transmit the data to the host computer during the acquisition process, a first-in-first-out memory with a relatively moderate storage capacity is selected. This can not only meet the needs of storing a small amount of data, but also transmit data at the same time as A/D conversion when real-time data transmission is required, without losing any data.

(2) VXI bus interface

VXI bus data acquisition devices can usually use two VXI bus general interfaces: message-based interface and register-based interface. The function of the message-based interface is to transmit commands through the bus to control the operation of the instrument hardware. The general register-based interface controls the operation of the instrument hardware by simply reading and writing registers. Design using the message-based interface. The block diagram of the specific message-based interface is shown in Figure 2. [page]


Figure 2 Block diagram of the message-based interface

(3) Sampling channel control

In order to meet the requirements of several typical system channel control, the number of channels is sufficient and the channel selection is flexible. The sampling channels can be designed to be up to 64 channels and at least 2 channels, which can be selected at will, by using the cooperation of register circuits, presettable counter circuits and some other logic circuits. Moreover, sampling can be started from any channel and ended at any channel, as long as the end channel number is greater than the start channel number. The entire control is operated on the virtual instrument soft panel. The command is written into the control register of this part through the message base interface to set the initial value of the counter and the total number of channels to be sampled.

(4) Timing sampling control

Since different automatic test systems have different requirements for sampling time intervals, and the sampling time intervals required for the same system in different tests are also different, the sampling time interval can be set to any range between 2 μs and 13.0 ms by program control. The minimum unit that can be increased or decreased is 2 μs. All these selection settings can be made on the virtual instrument soft panel.

(5) Sampling point control

According to the requirements of different test systems, the sampling points are designed to be arbitrarily selected within a relatively large range, and the selection is also made on the soft panel.

(6) Sampling mode control

In summary, the sampling modes of various automatic test systems are nothing more than software-triggered sampling and hardware-triggered sampling. Hardware-triggered sampling includes synchronous full-cycle sampling and asynchronous full-cycle sampling. These two types of sampling can be performed at regular intervals or with equal speed differences. All these sampling modes can be selected on the soft panel for the data logger.

2.2 Software design

Software is the key to virtual instruments. In order to make the VI system structure clear and concise, the component design concept can generally be adopted to make the independent software units of each part into standard components, and then form a complete application system according to the overall requirements of the system. A standard componentized virtual instrument software system is shown in Figure 3.


Figure 3 Componentized virtual instrument software system

Application software provides users with the necessary tools to build virtual instruments and expand their functions, as well as to utilize the powerful functions of PCs and workstations. At the same time, the VPP Alliance proposed the establishment of a virtual instrument standard structure library (VISA), which provides standards for the research and development of virtual instruments. This also further makes it possible to form virtual instruments with general VXI data acquisition modules and CPU/DSP modules.

The software of data acquisition devices based on virtual instruments includes system management software, application programs, instrument driver software, and I/O interface software. In the past, these four parts needed to be organized or developed by users themselves, which was often difficult, but now NI provides all four parts of software, making application development much easier than before.

The following briefly introduces the method of developing drivers for VXI virtual instruments using NI's Lab Windows/CVI as the development environment.

Step 1: Generate the user interface resource file (UIR) of the instrument module. The user interface resource and file are a graphical user interface (GUI) designed for the instrument module by the instrument module developer using the user interface editor of Lab Windows/CVI. A Lab Windows/CVI GUI consists of panels, command buttons, icons, drop-down menus, curves, knobs, indicator tables, and many other control items and instructions.

Step 2: Lab Windows/CVI event-driven programming. Designing a user interface in the application development environment Lab Windows/CVI is actually defining a panel on the user's computer screen, which consists of various control items (such as command buttons, menus, curves, etc.). When the user selects these control items, a series of user interface events (events) can be generated. For example, when the user clicks a command button, this button generates a user interface event and passes it to the C language driver written by the developer. This is the application of the event-driven mechanism of Windows programming. Different types of control items are used in Lab Windows/CVI, and different types of information will be displayed in the interface editor, and interface events for different operations will be generated. In the Lab Wind ows/CVI development platform, there are two basic methods for C program programming for event-driven: callback function method and event loop processing method. The

callback function method is that the developer writes an independent user interface control function for each user interface control item. When a control item is selected, the corresponding function is called for event processing. In the loop processing method, only the COMMIT event generated by the GUI control item is processed. Through the Get User Event function filtering, all COMMIT events are distinguished, and the event generated by which control item is identified, and the corresponding processing is performed.

Step 3: Write application functions/VI sets and application software packages. Application functions/VI sets need to be programmed for specific instrument module functions. Application software packages are only required for some powerful modules that require complete data processing capabilities, such as waveform analyzer modules, DSP modules, etc.

Figure 4 is a system test process based on virtual instruments.


Figure 4 Virtual instrument system test flow chart

3. Conclusion

This paper discusses the basic composition of virtual instruments and the general methods of virtual instrument software and hardware design. These methods have been proven to be reliable through practical design work and can be used as a reference for system engineering technicians when building specific VXI bus-based virtual instrument data acquisition and testing.

References
[1] Zhao Yong. Virtual instrument software platform and development trend [J]. Foreign Electronic Measurement Technology, 2002, (1)
[2] Chen Guangyu. VXI bus test platform [M]. Beijing: University of Electronic Science and Technology Press, 1996
[3] Sun Xin, Zhang Zhongting, Xue Changbin. Methods for integrating VXI bus automatic test system [J]. Measurement and Control Technology, 1996, 15 (4) 
[4] Zhang Yigang, Peng Xiyuan, Jiang Ningda, et al. Automatic test system [M]. Harbin: Harbin Institute of Technology Press, 2001
[5] Wang Hong. Component-based virtual instrument software system [J]. Microcomputer Information, 2001, (1): 76-77
Reference address:Virtual Instrument Technology and Its Application in Data Acquisition

Previous article:Application of Virtual Instrument Technology in Automobile Testing
Next article:Virtual Instrument Technology and Its Application in Data Acquisition

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号