Chapter3 Programmingwith NI-IMAQ for 1394
NI-IMAQfor IEEE-1394 Cameras User Manual 3-10 ni.com
Performing an Asynchronous Snap Using Low-Level FunctionsTheLow-Level Snap1394 Async example demonstrates how to perform an
asynchronous acquisition using low-level calls. The example sets up a
single-frame acquisition to a buffer.
Inan asynchronous snap, the program installs a callback function using the
imaq1394InstallCallbackfunction and starts the acquisition with the
imaq1394StartAcquisitionfunction. When the buffer is ready, the
drivercalls the callback function, allowing you to retrievethe image using
the imaq1394GetBufferfunctio n.
Oneadvantage of an asynchronous snap is that you can start the acquisition
andthen perform other tasks while waiting for the signal that the image is
ready.
Note Sincethe callback function is called in a different thread than the main program, you
should makesure that all o f your processing is thread-safe.
Performing an Asynchronous Grab using Low-Level FunctionsTheLow-LevelGrab1394 Async exampledemonstrates how to perform
an asynchronousgrab acquisition using low-level calls. The example sets
up a continuous acquisition to a buffer.
Theprogram installs a callback function which is called each time an image
is acquired until the acquisition is stopped or until the callback function
returns FALSE.
Note Becausethe callback function is called in a different thread than the main program,
you should makesure that all of your processing is thread-safe.