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

Chapter 6

Analog Input

The Easy Analog Input VIs have several benefits. You need only one icon in your block diagram to perform the task. Easy VIs require only a few basic inputs, and they have built-in error checking. However, these VIs have limited programming flexibility. Because Easy VIs have only a few inputs, you cannot implement some of the more detailed features of DAQ devices, such as triggering or interval scanning. In addition, these VIs always reconfigure at start-up, which can slow down processing time.

When you need more speed and efficiency, use the Intermediate VIs, which configure an acquisition only once and then continually acquire data without re-configuring. The Intermediate VIs also offer more error handling control, more hardware functionality, and more efficiency in developing your application than the Easy VIs. You typically use the Intermediate VIs to perform buffered acquisitions.

The AI Single Scan VI returns one scan of data. You also can use this VI to read only one point if you specify one channel. Use this VI only in conjunction with the AI Config VI.

Figure 6-12 shows a simplified block diagram for non-buffered applications. LabVIEW calls the AI Config VI, which configures the channels, selects the input limits (the high limit and low limit inputs in the Easy VIs), and generates a taskID. The program passes the taskID and the error cluster to the AI Single Scan VI, which returns the data in an array (one point for each channel specified).

Figure 6-12. Using the Intermediate VIs for a Basic Non-Buffered Application

Refer to the Cont Acq&Chart (immediate) VI in the examples\daq\ anlogin\anlogin.llb for an example of how to program the AI Config and AI Single Scan VIs to perform a series of single scans by using software timing (a While Loop) and processing each scan. Open this VI and examine its block diagram.

The advantage of using the intermediate-level VIs is that you do not have to configure the channels every time you want to acquire data as you do

LabVIEW Measurements Manual

6-16

www.ni.com

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