Function Overview
The NI-IMAQ application programming interface (API) is divided into three groups: high-level functions, low-level functions, and generic functions. With the high-level functions, you can write programs quickly without having to learn the details of the low-level API and driver. The low-level functions give you finer granularity and control over the image acquisition process, but you must understand the API and driver in greater detail. Generic functions allow you to set up interfaces and sessions and close both when you are finished.
Note The high-level functions call low-level functions and use certain attributes that are listed in the high-level function description in the NI-IMAQ Function Reference Help. Changing the value of these attributes while using low-level functions affects the operation of the high-level functions. |
Interface Functions
Interface functions can be used in combination with both high- and low-level functions to perform the following tasks:
- Set up the interface and session.
- Close the interface and session when you are finished with the application.
- Obtain an interface name.
- Reset the interface.
High-Level Functions
High-level functions support four basic types of image acquisition:
- Snap acquires a single frame or field to a buffer.
- Grab performs an acquisition that loops continually on one buffer. You obtain a copy of the acquisition buffer by grabbing a copy to a separate buffer that can be used for analysis.
- Sequence performs an acquisition that acquires a specified number of buffers, then stops.
- Ring performs an acquisition that loops continually on a specified number of buffers.
The high-level function set also allows simple triggered acquisitions and the generation of external signals on the trigger lines.
Low-Level Functions
Low-level functions support all types of acquisition. Use low-level functions to perform the following tasks:
- Create a custom acquisition sequence or ring.
- Create and manage buffers.
- Set session and interface attributes to adjust image quality and size.
- Start a synchronous or asynchronous acquisition.
- Extract buffers out of a live acquisition for analysis.