Programming instructions

Chapter 17 Shaking Hands with a Digital Partner
LabVIEW Data Acquisition Basics Manual 17-6
©
National Instruments Corporation
equal to 1 (default), all the ports listed in
port list
are treated as inputs.
The number of elements in the
data read
input will be the same as the
product of the number of ports in the group and the
number to read
input.
Figure 17-4 shows how you can use non-buffered handshaking to
write data. The programming flow resembles the read operation above.
The
updates to write
array must contain as many elements as the number
of ports multiplied by the number of values to write.
Figure 17-4.
Non-Buffered Handshaking Using the DIO Single Read/Write VI
Buffered Handshaking
Buffered handshaking allows you to store multiple points in computer
memory. Use this technique if multiple pulses are expected on the
handshaking lines. Buffered handshaking comes in two forms: simple and
circular. You can use simple-buffered handshaking on all DAQ devices
that support handshaking; but you can perform circular-buffered
handshaking only on the AT-DIO-32F and DIO-32HS devices. 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.
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 gets to the end of the
buffer LabVIEW returns to the beginning of the buffer and fills up the
same buffer again. You should 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.