Example Code

Write Value and Time Stamp to 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.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates formatting timestamps and saving them to a file that can be imported into Excel.

 

Description

This VI outputs an array of Value and Time Stamp data to a .csv file for importing into Excel.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Download and run the VI.
  2. Click on STOP button to stop the VI.
  3. Specify a .csv file extension in the File Dialog Box.( For example, specify the file to save as MyFile.csv.)

 

Additional Information or References

 

Front Panel

Timestamp FP.jpg

 

VI Snippet
1.png

 

Notes: The VI saves the file location at run time. Make sure that you specify a .csv file extension so the VI can be easily imported into Microsoft Excel.  For example, specify the file to save as MyFile.csv in the File Dialog Box.

 

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

Sincerely,

Chris G in AE

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

Comments
Todd S.
NI Employee (retired)
on

Thanks for posting! Could you please rename your attachment to include the LabVIEW version? "_lvXX.vi" would be fine.

Todd S.
LabVIEW Community Manager
National Instruments