Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
LabVIEW-Measurements.pdf
Скачиваний:
61
Добавлен:
29.05.2015
Размер:
3.37 Mб
Скачать

Chapter 2 Comparing DAQ Devices and Special-Purpose Instruments for Data Acquisition

Conditioned

signals

Signal

Conditioning

Plug-in

DAQ board

Transducers

Software

Option A

Parallel Port Link

Software

Data Acquisition

and Control Module

Option B

Figure 2-1. DAQ System Components

A third option, not shown in Figure 2-1, uses the PCMCIA bus found on some laptops. A PCMCIA DAQ device plugs into the computer, and signals are connected to the board just as they are in Option A. This allows for a portable, compact DAQ system.

Role of Software

The computer receives raw data. Software takes the raw data and presents it in a form the user can understand. Software manipulates the data so it can appear in a graph or chart or in a file for report. The software also controls the DAQ system, telling the DAQ device when to acquire data, as well as from which channels to acquire data.

LabVIEW Measurements Manual

2-4

www.ni.com

Chapter 2 Comparing DAQ Devices and Special-Purpose Instruments for Data Acquisition

Typically, DAQ software includes drivers and application software. Drivers are unique to the device or type of device and include the set of commands the device accepts. Application software (such as LabVIEW) sends the commands to the drivers, such as acquire a thermocouple reading and return the reading, then displays and analyzes the data acquired.

LabVIEW includes a set of VIs that let you configure, acquire data from, and send data to DAQ devices. This saves you the trouble of having to write those programs yourself. LabVIEW DAQ VIs make calls to the NI-DAQ Application Program Interface (API). The NI-DAQ API contains the tools and basic functions that interface to DAQ hardware.

How Do Computers Talk to

Special-Purpose Instruments?

The fundamental task of an instrument is to measure some natural phenomenon. Unlike data acquisition, the signal the computer ultimately receives requires no conditioning. How the computer controls the instrument and acquires data from the instrument depends on how the instrument is built. Common types of instruments include the following:

GPIB

Serial Port

VXI

PXI

Computer-based instruments

These instrument types are discussed in more detail in Appendix A, Types of Instruments.

All external instruments communicate with the computer through some type of bus where a communication protocol has been defined. The instrument has a set of commands that it understands. The user writes an application that sends commands to and receives data from an instrument. As the test system designer, you have to be concerned with the software connection with the instrument. That is, you have to understand how your application and your instrument communicate with each other. Additionally, you have to be concerned with the type of hardware connection to your instrument.

© National Instruments Corporation

2-5

LabVIEW Measurements Manual

Chapter 2 Comparing DAQ Devices and Special-Purpose Instruments for Data Acquisition

How Do Programs Talk to Instruments?

As test developers over the years have discovered, instrument drivers are a key factor in test development. An instrument driver is a collection

of functions that implement the commands necessary to perform the instrument’s operations. LabVIEW instrument drivers simplify instrument programming to high-level commands, so you do not need to learn the low-level instrument-specific syntax needed to control your instruments. Instrument drivers are not necessary to use your instrument. They are merely time savers to help you develop your project so you do not need to study the instrument manual before writing a program.

Instrument drivers create the instrument commands and communicate with the instrument over the serial, GPIB, or VXI bus. In addition, instrument drivers receive, parse, and scale the response strings from instruments into scaled data that can be used in your test programs. With all of this work already done for you in the driver, instrument drivers can significantly reduce development time.

Instrument drivers can help make test programs more maintainable in the long-run because instrument drivers contain all of the I/O for an instrument within one library, separate from your other code. You are protected against hardware changes and upgrades because it is much easier to upgrade your test code when all of the code specific to that particular instrument is self-contained within the instrument driver.

LabVIEW provides more than 700 LabVIEW instrument drivers from more than 50 vendors. A list is available on the National Instruments Developer Zone, zone.ni.com/idnet You can use these instrument drivers to build complete systems quickly. Instrument drivers drastically reduce software development costs because developers do not need to spend time programming their instruments. You can reuse the drivers in a variety of systems and configurations.

Deciding what kind of instrument to use depends on the tests and measurements you are taking. Appendix A, Types of Instruments, describes several traditional forms of instrumentation hardware that you are likely to encounter when developing a measurement system.

LabVIEW Measurements Manual

2-6

www.ni.com

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]