Вы находитесь на странице: 1из 7

33

Virtual Instrumentation Systems


33.1 Introduction to Instrumentation ................................ 33.2 Approaches to Instrumentation: Virtual and Traditional .................................................................... 33.3 Modular Hardware for System Scalability .................. 33.4 Software for Flexible, Custom Measurements ........... 33.5 Extensions beyond Test and Measurement ................ 33.6 Benefits of Virtual Instrumentation Systems ............. 33-1 33-1 33-4 33-4 33-6 33-6

Darcy Dement
National Instruments, Inc.

Adaptability and Longevity and Size

Greater Speed

Lower Cost

Further Reading ...................................................................... 33-7

33.1 Introduction to Instrumentation


Like instrumentation systems of the past, todays instrumentation systems build on widely accepted contemporary technologies. In the early days of instrumentation, the jeweled movement of clocks in the nineteenth century was first adapted to build analog meters. In the 1930s, when engineers began to accept the variable capacitor, variable resistor, and vacuum tubes as pieces of the radio, the first electronic instruments were introduced using the same components. As display technologies improved for use on the first televisions, oscilloscopes and analyzers began using the same technology to display the users measurements. These first steps of integrating relevant technologies into instrumentation set the stage for todays virtual instrumentation.

33.2 Approaches to Instrumentation: Virtual and Traditional


Fundamentally, there are two types of instrumentation today: virtual and traditional. Figure 33.1 illustrates the architectures of these approaches. The diagrams show the similarities in these two approaches. Both have measurement hardware, a chassis, a power supply, a bus, a processor, an OS, and a user interface. Because the approaches use the same basic components, the most obvious difference from a purely hardware standpoint is how the components are packaged. A traditional, or stand-alone, instrument puts all the components in the same

33-1
2008 by Taylor & Francis Group, LLC

33-2

Mechatronic System Control, Logic, and Data Acquisition

Traditional Instruction Proprietary Processor, OS Firmware Bus Chassis Chassis Fixed User Interface

Virtual Instrument PC Processor, OS User Software Bus UserDefined interface

Timing and Control

Measurement Subsystem

Timing and Control

Modular Hardware

Power Supply

Shared Power Supply

GPIB, LAN, USB Connectivity

GPIB, LAN, USB Connectivity

FIGURE 33.1 Traditional versus virtual instrumentation architectures. Both share similar hardware components; the primary difference between the architectures is where the software resides and whether it is user accessible.

modulator sinewave oscillator

AGC amplifier

power amplifier

transducer

AGC RF-voltage pickoff and peak detector integrator frequency counter feedback amplifier and sample/hold desired power (reference) +

FIGURE 33.2 Example of a virtual instrumentation system using PXI hardware and National Instruments LabVIEW graphical development software.

box for every discrete instrument. When automated, a traditional instrument is often controlled with GPIB, USB, or LAN/Ethernet. While there are a large number of traditional instruments, the software and user interface are fixed and can only be updated when and how the vendor chooses (e.g., through a firmware update). This makes it impossible for the user to perform measurements not included in the traditional instruments function list, and it makes it challenging to perform measurements for new standards or to modify the system if needs change. By contrast, a virtual instrument makes the raw data from the hardware available to the user to define their own measurements and user interface. This software-defined approach lets users make custom measurements, perform measurements for emerging standards, or modify the system if requirements change (e.g., to add instruments, channels, or measurements). A virtual instrument can take several forms. Referring again to the architecture of a virtual instrumentation system in Figure 33.1, many of the components are shared across instrument modulessuch as the chassis and power supplyinstead of duplicating these components for every instrument function. These instrument modules can also include different types of hardware, including oscilloscopes, function generators, digital, and RF. In some cases, such as PXI (PCI eXtensions for Instrumentation)a rugged platform for test, measurement, and control supported by over 70 member companiesthe measurement hardware is housed in an industrial chassis (see Figure 33.2).
2008 by Taylor & Francis Group, LLC

Virtual Instrumentation Systems

33-3

FIGURE 33.3 Examples of other measurement hardware choices for virtual instrumentation. On the left is a USB peripheral module and on the right, a PCI Express plug-in module.

FIGURE 33.4

Virtual instrumentation implementation using a traditional instrument as the measurement hardware.

In those cases, the host computer can be embedded in the chassis (as shown in Figure 33.2) or it can be a separate desktop PC or server-class machine that controls the measurement hardware through a cable. In other cases, as shown in Figure 33.3, the measurement hardware is simply a peripheral that is installed in one of the host computers peripheral ports or peripheral slots. A virtual instrument can even use a traditional instrument as the measurement hardware (see Figure 33.4). While modular hardware provides other benefits described in the next section, fundamentally, a virtual instrument system can use any type of instrument as the measurement hardware, provided the user has access to the raw data to define custom measurements. A virtual instrumentation system can also use different measurement hardwarewhether PXI, USB, plug-in peripheral, or traditional instrumentin the same system. (This is termed a hybrid system.) Strictly speaking, a virtual instrumentation system is defined as follows:

Virtual instrument system (n.): Software-defined system, where software based on user requirements defines the functionality of generic measurement hardware Virtual instrument (n.): Diminutive form of a virtual instrument system
By any definition, the measurement software that resides on the host computer is fundamental to a virtual instrument. This user-defined software is what converts the raw data into the measurement of interest. It could be a common task such as a simple voltage measurement or a fast Fourier transform, or it could be a custom application such as a flyback measurement, octave analysis, or brain activity mapping. Note that while the term computer based is often applied to virtual instruments, ultimately many modern traditional instruments are also computer based. Modern traditional instruments have all the same components of a PC, including a processor, memory, and a bus to move data internally, as shown in Figure 33.1. Thus, the distinction between virtual and traditional instruments is determined by whether the software is exposed to the user for custom measurements and tasks.
2008 by Taylor & Francis Group, LLC

33-4

Mechatronic System Control, Logic, and Data Acquisition

Analog Front End

ADC

Memory

CPU

Display

Trigger

FIGURE 33.5 Typical digitizer architecture. In a virtual instrument implementation, most of the memory, the CPU, and the display are provided by the host PC.

33.3 Modular Hardware for System Scalability


Modular hardware uses commercial semiconductor, processor, and bus technologies to create virtual instruments with high performance at a low cost. The explosion of widely used commercial technologies such as analog-to-digital converters (ADCs), digital-to-analog converters (DACs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs) has resulted in rapid growth of functionality and performance in modular I/O. The most common instruments in use today digitize an analog signal into bits that can be interpreted by a processor, for example, digitizing a high-frequency signal (as in the case of an oscilloscope) or digitizing a slower signal with higher resolution (as with a digital multimeter). A greatly simplified digitizer architecture is shown in Figure 33.5. The analog input path attenuates, amplifies, filters, and/or couples the signal to optimize the digitization by the ADC. (For some applicationse.g., with many physical measurements via transducersadditional signal conditioning is housed externally and connected to the digitizer via cable or direct mount.) The ADC samples the conditioned waveform and converts the analog input signal to digital values that represent the conditioned input signal. The data is then stored in onboard memory, where it is transferred across a bus (e.g., PCI Express) to the processor. (In some applications, there can be very little onboard memory if the bus throughput is high enough to stream the data continuously from the measurement hardware to the host PC.) Then, the software (in the CPU for a virtual instrument) makes the proper measurement and presents the data to the user interface, sends it to a database across the network, publishes it to the Internet, or whatever the instrument user chooses. Analog input is presented here as an example, but many other measurement types can be inferred from this case. For example, engineers can build signal generation (analog output), digital I/O, counter/timers, RF, switching, and other instrument functions using the same virtual approach with different front-end architectures. Because the system is software defined, engineers can combine any of these elements into an integrated system with very little additional worka unique property of virtual instrumentation. This property also means that the system developer can add new instruments, measurements, or channels over time as requirements changea concept referred to as scalability. Although not discussed in detail here, these modular I/O components also typically include timing and synchronization resources for sharing clocks, triggers, and events between hardware I/O modules. Engineers can use these shared resources to create a 1000-channel digitizer, a mixed-signal system with 10 ps skew between modules, or a fast, hardware-handshaked digital multimeter/switch system.

33.4 Software for Flexible, Custom Measurements


The role of software in virtual instrumentation cannot be overstated. Software converts the raw bitstream from hardware into a useful measurement. A well-architected virtual instrumentation system considers multiple layers of software, including I/O drivers, application development, and test management, as shown in Figure 33.6. The bottom layer, measurement and control services, is one of the most crucial elements of a virtual instrumentation system, though often overlooked. This layer represents the driver I/O software and

2008 by Taylor & Francis Group, LLC

Virtual Instrumentation Systems

33-5

Software for Flexible, Custom Measurements System Management SoftwareExamples: National Instruments TestStand Application Development EnvironmentExamples: National Instruments Lab VIEW National Instruments LabWindows/CVI Microsoft.NET

Measurement and Control ServicesExamples: GPIB/Serial and VXI Data Acquisition and Signal Conditioning Vision Modular Instrumentation Distributed I/0 PXI/Compact PCI

Motion

PLCs

FIGURE 33.6

Software layers in a virtual instrumentation system.

hardware configuration tools. This driver software is critical, because it provides the connectivity between the test development software and the hardware for measurement and control. Instrument drivers provide a set of high-level, human-readable functions for interfacing with instruments. Each instrument driver is specifically tailored to a particular model of instrument to provide an interface to its unique capabilities. Of particular importance in an instrument driver is its integration with the development environment so that the instrument commands are a seamless part of the application development. System developers need instrument driver interfaces optimized for their development environment of choice, for example, NI LabVIEW, C, C++, or Microsoft .NET. Also represented in measurement and control services are configuration tools. These configuration tools include resources for configuring and testing I/O, as well as storing scaling, calibration, and channel aliasing information. These tools are important for quickly building, troubleshooting, and maintaining an instrumentation system. The software in the application development environment layer provides the tools to develop the code or procedure for the application. Although graphical programming is not a requirement of a virtual instrument system, these systems often use graphical tools for their ease of use and rapid development time. Graphical programming uses icons or symbolic functions that pictorially represent the action to be performed, as shown in Figure 33.7. These symbols are connected together through wires that pass data and determine order of execution. NI LabVIEW provides the industrys most used and most complete graphical development environment. Some applications also require an additional layer of software management, either for test execution or visibility into test data. These are represented in the system management software layer. For highly automated test systems, test management software provides a framework for sequencing, branching/ looping, report generation, and database integration. The test management toolmust also provide tight integration into the development environments where the application-specific code is created. National Instruments TestStand, for example, provides this framework for sequencing, branching, report generation, and database integration and includes connectivity to all common development environments. In other applications that need visibility into large quantities of test data, other tools may be useful. These needs include quick access to large volumes of scattered data, consistent reporting, and data visualization. These software tools aid in managing, analyzing, and reporting data collected during data acquisition and/or generated during simulations. Every layer of this software architecture should be considered for a virtual instrumentation system.

2008 by Taylor & Francis Group, LLC

33-6

Mechatronic System Control, Logic, and Data Acquisition

FIGURE 33.7 Code for a typical stimulus/response application using virtual instrumentation. This code is written in National Instruments LabVIEW for (1) generating a signal from an arbitrary waveform generator; (2) acquiring the signal with a digitizer/oscilloscope; (3) performing a fast Fourier transform; and (4) graphing the result of the FFT on the user interface (front panel).

33.5 Extensions beyond Test and Measurement


While virtual instrumentation has roots in test and measurement, these concepts can extend to industrial control and design prototyping. In fact, engineers and scientists who adopt a virtual instrumentation approach see large efficiency gains from using this approach across different types of applications. In control and industrial applications, PCs and PLCs both play important roles. PCs bring great software flexibility and capability, while PLCs deliver outstanding ruggedness and reliability. A programmable automation controller (PAC) is an example of how virtual instrument techniques can be applied to industrial control; a PAC combines elements of both PCs and PLCs to accommodate more complex, dynamic, adaptive, and algorithm-based control while retaining its ruggedness and reliability. Other industrial-focused hardware might include logic, motion, machine vision, and other functions. In all these cases, the software environment can be the same one used for a virtual instrumentation system for test and measurement, bringing great efficiency gains to applications combining test, measurement, and industrial control. For design prototyping, virtual instrumentation technology offers an architecture for designing custom measurement hardware circuitry using reconfigurable FPGA chips and NI LabVIEW graphical development tools. This architecture facilitates the customization of data acquisition, communication, and control hardware using the same software tools for test and measurement or industrial control. These users can quickly create custom hardware circuitry with high-performance I/O and unprecedented flexibility in system timing control without actually building custom circuitry.

33.6 Benefits of Virtual Instrumentation Systems


The software-defined nature of virtual instrumentation brings several benefits to engineers and scientists, which are discussed in the following sections.

2008 by Taylor & Francis Group, LLC

Virtual Instrumentation Systems

33-7

33.6.1

Adaptability and Longevity

Only with virtual instrumentation can engineers and scientists create the user-defined instruments that nimbly adapt to a changing design or a multifunctional device under test. As the device under test gains more features and new measurements or tasks are added, only a software-defined architecture can adapt at the speed of the device under test itself. Because virtual instrumentation uses highly productive software, modular I/O, and commercial platforms, it is uniquely positioned to keep pace with the product development rate. Engineers can modify the software to add new functionality or support new devices or tests, and the modular I/O hardware can be rapidly combined in any order or quantity to performany I/O task required. These same properties can accommodate a wide variety of test, measurement, or control tasks required for a single device or process, or disparate tasks across multiple devices.

33.6.2

Greater Speed

Virtual instrumentation applications that use modular I/O are capable of high-speed measurement and high throughput to PCmemory because of the use of bus and processor technologies. The PCI Express bus, for example, is commonly available today with a throughput of 1 GB/s1000 times faster than the GPIB bus used to connect most traditional instruments to a PC, 16 times faster than USB 2.0, 80 times faster than 100-Mbps Ethernet, and even 8 times as fast as emerging Gbps Ethernet. For high-streaming applications, PCI Express slots are available today with 4 GB/s bandwidth, and plans exist for higher throughputs in the future. In virtual instrumentation systems, GHz PC processors analyze the data and make measurements using software. The result is measurements at 10100 times the throughput of a test system built solely on traditional instruments that use built-in vendor-defined firmware and application-specific processors.

33.6.3

Lower Cost and Size

A virtual instrumentation system using modular I/O shares resources across the instruments, such as the processor, the bus, and the memory (see Figure 33.1). By sharing these resources across the instruments in the system, the integrated solution is much smaller and much less expensive than the traditional solution. The benefits of greater throughput, smaller size, and the ability to only change or upgrade specific components of the system when necessary also lead to lower total cost of ownership. It is worth noting that these benefits do not sacrifice measurement performance. Today, the instruments designed with a virtual instrumentation approach include the industrys highest-resolution digitizer, the highest-bandwidth arbitrary waveform generator, and the most accurate 71/2-digit digital multimeter.

Further Reading
Allan Hambley, Electrical Engineering: Principles and Applications, 3rd Edn., Upper Saddle River, NJ: Prentice Hall (copyright 2005). Gary W. Johnson and Richard Jennings, LabVIEW Graphical Programming, 4th Edn., New York:McGrawHill (copyright 2007). David G. Alciatore and Michael B. Histand, Introduction to Mechatronics and Measurement Systems, 3rd Edn., New York: McGraw-Hill (copyright 2007).

2008 by Taylor & Francis Group, LLC

Вам также может понравиться