National Instruments Image Acquisition Software Network Card User Manual


 
Chapter 3 Programming with NI-IMAQ
NI-IMAQ User Manual 3-12
©
National Instruments Corporation
Figure 3-5. Ring Programming Flowchart
The HLRing.c example demonstrates how to perform a ring acquisition
using
imgRingSetup. The example sets up a ring containing six buffers
and sets the skip count to three, which causes the program to acquire on
every third frame. Unlike the sequence example, the skip count is set to the
same value for every buffer in the ring. A skip count is the number of frames
skipped prior to acquiring an image to a buffer. The program then loops,
waiting for the next buffer to be acquired. The
imgSessionStatus
function queries NI-IMAQ for the buffer number of the last valid buffer that
has been acquired. The last valid buffer is defined as the buffer that contains
imgInterfaceOpen
imgInterfaceOpen opens
and configures the interface
according to the file setup by the
IMAQ Configuration Utility
.
imgSessionStatus
gives the current status of
the ring, including the buffer number of the last buffer
that was successfully transferred. With this information,
you can determine which buffer you want to process
or copy to a private location.
imgSessionOpen opens a session that
will be used for all acquisition and configuration.
User-specific image processing
imgClose closes the interface and session.
imgRingSetup sets up a ring acquisition to a
programmable number of buffers. These buffers
can be created either by the driver (using
imgCreateBuffer or passing a NULL)
or by you.
imgSessionOpen
imgRingSetup
imgSessionStatus
User-Specific Functions
imgSessionStopAcquisition stops
the ring function.
imgSessionStopAcquisition
imgClose
(Loop)
imgSessionStartAcquisition starts
the acquisition into a driver buffer.
imgSessionStartAcquisition
UM.book Page 12 Monday, July 13, 1998 9:49 AM