Example Code

Sequence of Images File Writer

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.

    Software

  • Teststand

Code and Documents

Attachment

Overview

This VI writes a sequence of images to a hard disk cased on collected image data. 

 

 

Description

The VI allows a user to specify a file set name, the number of significant figures that are appended to the file set name as well as the number of images to writer.  Users can also specify a file path where they fish the files to be saved.

 

 

Requirements

Software

TestStand 2012 (or compatible)

 

 

Steps to Implement or Execute Code

The VI first scans the target directory for existing files of the set file type (this can be edited with minimal effort) and begins naming the image with the next available number.

A sample image acquisition is in place that merely obtains image data from an existing image.  This can be replaced with any image acquisition system.  When testing this VI, please make note of the default paths.  I have included the test image that I used, marbles.tiff, for your convenience.

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

Sincerely,

Greg S.

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