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

Chapter 6

Analog Input

Basic Circular-Buffered Analog Input

Figure 6-19 shows an example VI that brings data from a channel at a rate of 1,000 samples/s into a buffer that can hold 4,000 samples. This type of example might be handy if you want to watch the data from a channel over a long period of time, but you cannot store all the data in memory at once. The AI Config VI sets up the channel specification and buffer size, then the AI Start VI initiates the background data acquisition and specifies the rate. Inside the While Loop, the AI Read VI repeatedly reads blocks of data from the buffer of a size equal to either 1,000 scans or the size of the scan backlog—whichever one is larger. The VI does this by using the

Max & Min function to determine the larger of the two values. You do not have to use the Max & Min function in this way for the application to work, but this function helps control the size of the scan backlog, which is how many samples are left over in the buffer. This VI continuously reads and displays the data from channel 0 until an error occurs or until you click the Stop button.

Figure 6-19. Basic Circular-Buffered Analog Input Using the Intermediate VIs

Other Circular-Buffered Analog Input Examples

Refer to the VIs in the examples\daq\anlogin\anlogin.llb and the rest of the example VIs in examples\daq\anlogin\strmdisk.llb for many other circular-buffered analog input VIs that are included with your LabVIEW application. The following list describes some of these VIs:

Cont Acq & Chart (buffered) VI—Demonstrates circular-buffered analog input similarly to the previous example, but this VI includes other front panel inputs.

© National Instruments Corporation

6-29

LabVIEW Measurements Manual

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