Chapter 3 Programming with NI-IMAQ
NI-IMAQ User Manual 3-14
©
National Instruments Corporation
Figure 3-6. Signal I/O Function Programming Flowchart
Advanced Programming Examples
You can use low-level functions or combine high-and low-level functions
for more advanced programming techniques, including snap, grab,
sequence, ring, and color image acquisitions.

Performing a Snap Using Low-Level Functions

The LLSnap.c example demonstrates how to perform a snap acquisition
using low-level calls. The example sets up a single-frame acquisition to a
buffer allocated by NI-IMAQ. The program retrieves the acquisition
window width of the selected camera and aligns it on a 32-bit boundary.
You must align both the acquisitio n window width and rowPixels on a
32-bit boundary to ensure that your image is acquired properly. The
software does not perform this alignment for you unless you select a scaling
option. Although the IMAQ Configuration Utility performs this alignment
imgSessionTriggerDrive configures the session
so that RTSI trigger line 3 will be driven high when the
acquisition has completed.
imgInterfaceOpen imgInterfaceOpen opens and configures the
interface according to the file set up by the
IMAQ Configuration Utility.
imgSessionOpen opens a session that
will be used for an acquisition.
User-specific image processing.
imgClose closes the session and interface.
imgSessionOpen
imgSessionTriggerConfigure configures the
session so that an acquisition will not occur until a trigger
is received on external trigger line 1.
imgSessionTriggerConfigure
imgSnap starts the acquisition. The actual snap will
not occur until the trigger is received.
imgSnap
imgSessionTriggerDrive
User-Specific Functions
imgClose
UM.book Page 14 Monday, July 13, 1998 9:49 AM