Справочник Пользователя для National Instruments NI-IMAQ

Скачать
Страница из 52
Chapter 4
Programming with NI-IMAQ for 1394 VIs
© National Instruments Corporation
4-5
NI-IMAQ for 1394 Acquisition Types
Three NI-IMAQ image acquisition types are available in LabVIEW—snap,
grab, and sequence. The following sections describe each acquisition type
and give examples.
Snap
A
snap
acquires a single image into a memory buffer. Use this acquisition
mode to acquire a single frame or field to a buffer. When you invoke a snap,
it initializes the device and acquires the next incoming video frame to a
buffer. Use a snap for low-speed or single-capture applications.
Use the IMAQ1394 Snap VI for snap applications. Figure 4-4 shows a
simplified block diagram for using IMAQ1394 Snap.
Figure 4-4. Acquiring an Image Using Snap
Grab
A
grab
is a continuous, high-speed acquisition of data to a single buffer in
host memory. This function performs an acquisition that loops continually
on one buffer. You can get a copy of the acquisition buffer by grabbing a
copy to a LabVIEW image buffer.
You must use two VIs—IMAQ1394 Grab Setup and IMAQ1394 Grab
Acquire
—for a grab acquisition in LabVIEW. IMAQ1394 Grab Setup,
which you call only once, initializes the acquisition and starts capturing the
image to an internal software buffer. IMAQ1394 Grab Acquire, which
you can call multiple times, copies the image currently stored in the internal
buffer to a LabVIEW image buffer. After the program finishes copying
images, call IMAQ1394 Close once to shut down the acquisition.