Example Code

Auto-Generate File Names in LabVIEW

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

  • LabVIEW

Code and Documents

Attachment

Overview
This example VI demonstrates how to programmatically generate files with names numerically increasing based on loop iteration.


Description
In LabVIEW you are able to concatenate strings and give custom names to files based on loop iterations. In this example a while loop is used to give consecutive names to custom-generated files, based on the iteration counf of the while loop and native LabVIEW APIs, which allow the user to easily convert number data types to a string data type. The output is printed in a path indicator and visualized on the front panel.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attached files to your computer
  2. Open the VI "Auto-Generate Filename in Loop LV2012 NI Verified.vi"
  3. Run the program

 

Additional Information or References

VI Block Diagram

Auto-Generate Filename in Loop LV2012 NI Verified.png

 

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

National Instruments
Applications Engineer

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