Performing a Sequence Acquisition Using Low-Level Functions

NI IMAQ

Performing a Sequence Acquisition Using Low-Level Functions

The LLSeq.c example demonstrates how to perform a sequence acquisition using low-level calls. The example sets up a sequence acquisition to multiple buffers allocated by NI-IMAQ. As described in the low-level snap example, the program retrieves the acquisition window width of the selected camera and aligns it on a 32-bit boundary. It creates a buffer list to describe the acquisition buffers. Next, the program sets the ROI to the acquisition window width. The program calculates the correct memory requirements of the frame buffer. However, this memory requirement calculation is not necessary if you choose to use the default acquisition window width, rowPixels, and ROI. In this case, NI-IMAQ allocates the correct size buffer if you pass 0 as the size parameter to imgCreateBuffer. The program creates the buffer and configures the buffer list for each buffer element in the ring. The program locks the memory and starts the image acquisition asynchronously.

The main processing loop of the code shows how to process each buffer acquired in sequential order.