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

Chapter 7

Analog Output

Multiple-Immediate Updates

Refer to the Write N Updates example VI in the examples\daq\ anlogout\anlogout.llb for an example of a VI that performs multiple updates. Its block diagram resembles the one shown for the AO Write One Update VI described previously, except that the While Loop runs the subVI repeatedly until either the error status or the stop Boolean is TRUE. You can use the Easy Analog Output VI, AO Write One Update VI, in a loop, but this is inefficient because the Easy I/O VIs configure the device every time they execute. The AO Write One Update VI configures the device only when the value of the iteration input is set to 0.

The Write N Updates example VI illustrates an immediate, software-timed analog output VI application. This means that software timing in a loop controls the update rate. One good reason to use immediate, software-timed output is that your application calculates or processes output values one at a time. However, remember that software timing is not as accurate as hardware-timed analog output.

Waveform Generation (Buffered Analog Output)

This section shows you which VIs to use in LabVIEW to perform buffered analog updates.

Buffered Analog Output

You can program single-buffered analog output in LabVIEW using an Easy Analog Output VI, AO Generate Waveforms VI. This VI writes an array of output values to the analog output channels at a rate specified by update rate. For example, if channels consists of two channels and the waveforms array consists of waveform data for the two channels, LabVIEW writes values from the waveform array to the corresponding channels at every update interval. After LabVIEW writes all the values in the array to the channels, the VI stops. The signal level on the output channels maintains the value of the final value row in the waveform array until another value is generated. If you use channel names configured in the DAQ Channel Wizard in channels, waveforms is relative to the units specified in the DAQ Channel Wizard. Otherwise, waveforms is relative to volts.

Easy VIs contain error handling. If an error occurs in the AO Generate Waveforms VI, a dialog box appears displaying the error number and description, and the VI stops running.

© National Instruments Corporation

7-3

LabVIEW Measurements Manual

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