Example Code

Insert Markers into Data File at Run-Time Using 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 VI allows the user to insert a marker or flag alongside data points in a measurement file while the file is being written. As the data is written to a file, a marker column is added (with a tab separator between columns). 

 

Description
Ordinarily, the program writes an empty string constant to the marker column. When the user presses the "Return" key, a user specified string is written to the column instead. The user can change the string at run-time if different flags need to be written in the same file. This is useful when using an external program (such as Excel) to analyse data, as it provides an easy method to find a specific location in the data after acquisition is complete and the file has been saved

 

Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

 

1.Setup a data source (DAQmx read, VISA read, etc.) within the while loop

2.Run VI

  1. Enter the marker value into the string control on the front panel.

 

 

Additional Information or References
Block Diagram

 1.png

 

 

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

Caleb Harris

National Instruments | http://www.ni.com/support

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