Example Code

Ring Acquisition With IMAQdx In LabVIEW

Code and Documents

Attachment

Download All

Overview

This example demonstrates how to perform a ring acquisition in LabVIEW using IMAQdx.

Description

This VI creates a ring buffer by creating an array of uniquely named buffers and passing it into the while loop where the acquisition takes place. The VI continuously cycles through the array of buffers using the quotient remainder function and index array. The Start Rewind button on the front panel allows you to display the entire array of buffers. It is mainly for demonstration purposes, but also has a practical application of a rewind function. Some applications use vision to monitor a test, and if an event occurs, the operator may want to save the current image along with a set number of frames leading up to the event. This VI can be easily modified for such an application by adding in a save function.

Steps to Implement or Execute Code

  1. Download the appropriate example for your version of LabVIEW
  2. Select your camera from the drop down menu on the front panel
  3. Specify the number of buffers you would like to have in your ring
  4. Click the run arrow
  5. See the current image displayed in the image display
  6. Click Start Rewind and see the entire ring displayed
  7. Note: Black frames may appear in the image display if the entire ring has not filled up yet. This can occur if Start Rewind is pressed immediately when the VI starts

Requirements

Software/Hardware

LabVIEW 2013 SP1 or earlier

Vision Acquisition Software

Any camera compatible with IMAQdx

 

  VI Snippet

Snippet.png

Front Panel.png

Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors