Programming instructions

Chapter 17 Shaking Hands with a Digital Partner
LabVIEW Data Acquisition Basics Manual 17-2
©
National Instruments Corporation
Another example of when you can use handshaking is if you wanted to
test the durability of a product prototype. Each durability test would be
performed with a different piece of machinery for the same amount of
time. For each test, you can turn the machinery on and off with a specific
variation of handshaked digital I/O, known as
pattern generation
. Internal
counters would serve to generate the handshaking signal that initiates
a digital transfer. Counters output digital pulses at a steady frequency.
Thus, you can generate and retrieve patterns at a constant rate because the
handshaking signal would be produced at a constant rate. However, you
can use this rate only if the instrument or external hardware does not work
with or require communication signals for its data transfers. Only the
DIO-32 Series devices support pattern generation.
If you have an external signal controlling your digital I/O operation,
you should connect the outside signal to the I/O connector or the
RTSI connector. For more information on these connectors, refer to your
hardware manual for your device. The names and functions of handshaking
signals vary. For the DIO-32 Series devices, there are two handshaking
lines—the REQ (request) line and the ACK (acknowledge) line. Use the
REQ line as the handshaking line to trigger digital input. You can use the
ACK line as the handshaking line to trigger digital output.
For all other 8255-based DAQ devices that perform handshaking, there are
four handshaking signals: Strobe Input (STB), Input Buffer Full (IBF),
Output Buffer Full (OBF), and Acknowledge Input (ACK). You use the
STB and IBF signals for digital input operations and the OBF and ACK
signals for digital output operations. When the STB line is low, LabVIEW
loads data into the DAQ device. After the data has been loaded, IBF is high,
which tells the external device that the data has been read. For digital
output, OBF is low while LabVIEW sends the data to an external device.
After the external device receives the data, it sends a low pulse back on the
ACK line. Check your DAQ device hardware manual for information on
which digital port(s) can be configured for handshaking signals.
For all the DAQ devices that support handshaking, there are separate
handshaking lines for each digital port.