Example Code

IMAQdx: Save IMAQdx Sequence to AVI File

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Machine Vision

    Software

  • LabVIEW

    Driver

  • NI Vision Acquistion Software

Code and Documents

Attachment

Overview

This example acquires a sequence of images using IMAQdx Sequence.vi then creates an AVI file to save the sequence.

Description

This VI first creates a camera session and an AVI session.  Then, a buffer is created for each image in the sequence using IMAQ Create in a for loop.  Next, the images are acquired and stored in the buffers.  The images are then pulled from the buffers and saved as an AVI file.  Last, the sessions are closed.

Requirements

Software

LabVIEW 8.0 "or compatible"

Vision Acquisition Software 8.0 (NI-IMAQdx) "or compatible"

Hardware

Camera compatible with NI-IMAQdx (Firewire, Gigabit Ethernet, USB, etc.)

Steps to Implement or Execute Code

  1. On the front panel select the camera under 'Camera Name'.
  2. Configure number of images in the sequence and the fps.
  3. Under 'Selected Path' type the desired file path for the saved AVI file.
  4. Run the VI

VI Snippet

IMAQ Sequence Save block diagram.png

Additional Information or References

This code was tested using a FireWire camera at 30fps.

NI-IMAQdx Compatibility with Different LabVIEW Versions

Is My Camera Supported by National Instruments?

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

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

Contributors