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

Chapter 8

Digital I/O

8255 Family

The example Dig Buf Hand Iterative(8255) VI shows how to read data as it is being handshaked into a buffer. Another example, Dig Buf Hand Occur(8255) VI, also uses iterative reads. This example, which works only on the Windows platform, also shows how to use DAQ Occurrences to search for specific bit patterns in a port. Refer to the VIs in the examples\daq\digio.llb for examples of reading data as it is being handshaked into a buffer.

Circular-Buffered Handshaking

A circular buffer differs from a simple buffer only in the way your program places the data into it and retrieves data from it. A circular buffer fills with data the same as a simple buffer, but when it reaches the end of the buffer LabVIEW returns to the beginning of the buffer and fills up the same buffer again. Use simple-buffered handshaking when you have a predetermined number of values to acquire or generate. Use circular-buffered handshaking when you want to acquire or generate data continuously.

Circular-buffered handshaking is similar to simple-buffered handshaking in that both types of handshaking place data in a buffer. However, a circular-buffer application returns to the beginning of the buffer when it reaches the end and fills the same buffer again.

Note Circular-buffered handshaking works only on 653X devices.

The examples Cont Handshake Input VI and Cont Handshake Output VI show how to read or write data respectively, using a circular buffer to implement continuous-buffered handshaking. Refer to the VIs in the examples\daq\digio.llb for examples of reading and writing data using a circular buffer.

Pattern I/O

This section describes pattern I/O, which is also known as pattern generation. Pattern I/O implies reading or writing digital data (or patterns) at a fixed rate. This mode is especially useful when you want to synchronize digital I/O with other events. For example, you might want to synchronize or time stamp digital data with analog data being acquired by another device.

© National Instruments Corporation

8-13

LabVIEW Measurements Manual

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