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

Chapter 8

Digital I/O

Note On an AT-DIO-32F device with nonbuffered handshaking, you can group 1, 2, or 4 ports together. For buffered handshaking on the AT-DIO-32F, you can group only 2 or 4 ports together.

You can use only Intermediate or Advanced Digital I/O VIs for digital handshaking in LabVIEW. The Intermediate I/O VIs work for most nonbuffered and buffered digital handshaking applications. However, for some DAQ devices, you might need a combination of Intermediate and Advanced I/O VIs.

Nonbuffered Handshaking

Nonbuffered handshaking occurs when your program transfers one digital value after receiving a digital pulse on the handshaking lines. LabVIEW does not store these digital values in computer memory. You should use nonbuffered handshaking when you expect only a few digital handshaking pulses. For multiple-pulsed or high-speed applications, you should use buffered handshaking.

653X Family

The example Dig Word Handshake In(653X) VI shows how to read nonbuffered data using handshaking. The example Dig Word Handshake Out(653X) VI shows how to write nonbuffered data using handshaking. Refer to the VIs in the examples\daq\digio.llb for examples of how to read nonbuffered data using handshaking.

8255 Family

The example Dig Word Handshake In(8255) VI shows how to read nonbuffered data using handshaking. The example Dig Word Handshake Out(8255) VI shows how to write nonbuffered data using handshaking. Refer to the VIs in the examples\daq\digio.llb for examples of how to read nonbuffered data using handshaking.

Buffered Handshaking

With buffered handshaking, you can store multiple points in computer memory. You also can access data as it is being acquired, through the read location and scan backlog terminals of the DIO Read subVI. Use this technique if multiple pulses are expected on the handshaking lines. Buffered handshaking comes in several forms: simple, iterative, and circular. You can use simple and iterative buffered handshaking on all DAQ devices that support handshaking. You can perform circular-buffered handshaking only on 6533 devices.

© National Instruments Corporation

8-11

LabVIEW Measurements Manual

Chapter 8

Digital I/O

Simple-Buffered Handshaking

You can think of a simple buffer as a storage place in computer memory, where buffer size equals the number of updates multiplied by the number of ports. With simple-buffered handshaking, one or more ports can be used to read or write data. All of the data is handshaked into the buffer before it is read into LabVIEW.

653X Family

The examples Buff Handshake Input VI and Buff Handshake Output VI show how to read or write data, respectively, using buffered handshaking. Refer to the VIs in the examples\daq\digio.llb for examples of how to read or write data using buffered handshaking.

The examples Burst Mode Input VI and Burst Mode Output VI demonstrate the use of the burst-mode protocol for maximum device throughput. Refer to the VIs in the examples\daq\digio.llb for examples of how to use the burst-mode protocol.

8255 Family

The example Dig Buf Handshake In(8255) VI shows how to read buffered data using handshaking. The example Dig Buf Handshake Out(8255) VI shows how to write buffered data using handshaking. Refer to the VIs in the examples\daq\digio.llb for examples of how to read buffered data using handshaking.

Iterative-Buffered Handshaking

Iterative-buffered handshaking sets up a buffer the same way as simple-buffered handshaking. With iterative-buffered handshaking, one or more ports can be used to read or write data. What differs between iterative-buffered handshaking and simple-buffered handshaking is that with iterative handshaking, data is read from the buffer before the buffer has been filled. This allows you to see data as it is acquired as opposed to waiting until all the data has been handshaked into the buffer. It also may free up processor time spent waiting for the buffer to fill.

653X Family

The example Dig Buf Hand Iterative(653X) VI shows how to read data as it is being handshaked into a buffer.

LabVIEW Measurements Manual

8-12

www.ni.com

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