Example Code

Graph Extract Tool

Code and Documents

Attachment

Overview

This tool allows the user to select a part of a waveform from a .tdms file and then save and extract as a new waveform in a .tdms file.

Description

The program uses the low level file I/O functions to open and save the .tdms files. The manipulation of the graph on the front panel is read using a property node that give the minimum and maximum values to the X scale. With the graphs dt value, the specific sample number in the array of the start point and length in samples can be calculated. The array subset function can then be used to extract the desired section with these parameters. The extracted section is then saved using the low level .tdms file I/O VIs.

Steps to Implement or Execute Code

  1. Run the VI
  2. A prompt will appear asking the user to select a file to load
  3. Zoom in on the section of the data that you is to be extracted
  4. Click the "Graph Extract Found" button
  5. A user prompt will appear asking for the location and file name for the new extract to be saved
  6. The program stops running and the new file is created

Requirements

Software

LabVIEW 2010 or later

Additional Images or Video

Block Diagram 2.pngGraphExtractFP.jpg

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

Matt Surridge

National Instruments

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

Contributors