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

Chapter 7

Analog Output

process requires the use of circular-buffered analog output in LabVIEW. Refer to the Waveform Generation (Buffered Analog Output) section, later in this chapter, for more information about single or circular buffering.

Single-Point Generation

When the signal level at the output is more important than the rate at which the output value changes, you need to generate a steady DC value. You can use the single-point analog output VIs to produce this type of output. With single-point analog output, any time you want to change the value on an analog output channel, you must call one of the VIs that produces a single update (a single value change). Therefore, you can change the output value only as fast as LabVIEW calls the VIs. This technique is called software timing. You should use software timing if you do not need high-speed generation or the most accurate timing.

Single-Immediate Updates

The simplest way to program single-point updates in LabVIEW is by using the Easy Analog Output VI, AO Update Channels. This VI writes values to one or more output channels on the output DAQ device.

An array of values is passed as an input to the VI. The first element in the array corresponds to the first entry in the channel string, and the second array element corresponds to the second channel entry. If you use channel names configured in the DAQ Channel Wizard in your channel string, values is relative to the physical units you specify in the DAQ Channel Wizard. Otherwise, values is relative to volts. Remember that Easy VIs already have built-in error handling.

Refer to the Generate 1 Point on 1 Channel VI in the examples\daq\ anlogout\anlogout.llb for an example of writing values for multiple channels. This VI generates one value for one channel.

If you want more control over the limit settings for each channel, you also can program a single-point update using the Intermediate Analog Output VI, AO Write One Update.

In this VI, your program passes the error information to the Simple Error Handler VI. The iteration input optimizes the execution of this VI if you place it in a loop. With Intermediate VIs, you gain more control over when you can check for errors.

LabVIEW Measurements Manual

7-2

www.ni.com

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