Справочник Пользователя для National Instruments Image Acquisition Software

Скачать
Страница из 68
Chapter 3
Programming with NI-IMAQ
©
 National Instruments Corporation
3-11
The 
HLSeq.c
 example demonstrates how to perform a sequence 
acquisition using 
imgSequenceSetup
. The example sets up a sequence 
that uses 10 user-allocated buffers. Unlike the ring example, each buffer in 
the sequence has its own skip count associated with it. The skip count is the 
number of frames to skip prior to acquiring the next image. The acquisition 
is started at setup time and the setup call is synchronous.
High-Level Ring Functions
Ring and sequence functions include 
imgRingSetup
imgSessionStartAcquisition
 and 
imgStopAcquisition
. Use 
these functions to perform a continuous acquisition that loops or stops after 
a certain number of images have been captured.
ring initiates a continuous high-speed acquisition to multiple buffers. 
Calling 
imgRingSetup
 initiates a ring. 
imgRingSetup
 specifies both the 
buffer list that will be used for transfers and the number of buffers. After 
imgRingSetup
 is called, you can monitor the status of the transfer and 
perform processing on any of the buffers in the ring. A ring is appropriate 
for high-speed applications where you need to perform processing on every 
image. You must use multiple buffers because processing times may vary 
depending on other applications and processing results. You can configure 
a ring to acquire every frame or to skip a fixed number of frames between 
each acquisition.
For certain applications, you can temporarily extract a buffer from the ring 
to prevent it from being overwritten during the ring’s next pass. Use the 
imgSessionExamineBuffer
 and 
imgSessionReleaseBuffer
 
functions to do this. Figure 3-5 illustrates a typical ring programming order.
UM.book  Page 11  Monday, July 13, 1998  9:49 AM