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

18

Using LabVIEW to Control Instruments

This chapter explains how to communicate with instruments and introduces instrument drivers and VISA.

How Do You Use LabVIEW to Control Instruments?

In the simplest sense, instrument control is accomplished by sending commands and data between the instrument and the PC. With LabVIEW, you can use an instrument driver for your instrument, or you can write your own VIs using VISA.

An instrument driver is a set of software routines that control a programmable instrument. Each routine corresponds to a programmatic operation such as configuring, reading from, writing to, and triggering the instrument. Instrument drivers simplify instrument control and reduce test program development time by eliminating the need to learn the programming protocol for each instrument. The LabVIEW Instrument Library contains instrument drivers for a variety of programmable instrumentation, including GPIB, VXI, and RS-232/422 instruments. Because instrument driver VIs contain high-level functions with intuitive front panels, end users can quickly test and verify the remote capabilities of their instrument without the knowledge of device-specific syntax. The end user can easily create instrument control applications and systems by programmatically linking instrument driver VIs in the block diagram.

LabVIEW instrument drivers usually communicate with instruments using Virtual Instrument Software Architecture (VISA) functions. VISA is the underlying protocol used when talking to instruments. You can use VISA for many different instrument types, such as GPIB, Serial, VXI, and PXI. Once you learn how to communicate using VISA for one type of instrument, you do not have to learn a different way to communicate when you need to use another type of instrument. You do have to learn about the specific command set for the two instruments, but the method by which you send and receive the commands does not change.

© National Instruments Corporation

18-1

LabVIEW Measurements Manual

Chapter 18 Using LabVIEW to Control Instruments

When you begin to develop an instrument control application with LabVIEW, you have the option to use an instrument driver or to communicate directly using VISA.

Where Should You Go Next for Instrument Control?

LabVIEW has more than 700 instrument drivers from more than

50 vendors. A list is available on the National Instruments Developer Zone, zone.ni.com/idnet You should always check to see if there is an instrument driver available for your instrument. If you have an instrument not on the list, you can find a similar instrument on the list and easily modify its driver. Refer to Chapter 19, Instrument Drivers in LabVIEW, for more information about using instrument drivers.

If you cannot find an instrument driver for your instrument, refer to

Chapter 20, VISA in LabVIEW, for more information about VISA.

LabVIEW Measurements Manual

18-2

www.ni.com

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