Example Code

Handy Graph Extract Tool

Code and Documents

Attachment

Download All

Graph Extract Tool

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

Fount Pannel.PNG

To Use

  1. 1) Run the VI
  2. 2) A prompt will appear asking the user to select the file to load.
  3. 3) Zoom in on the part of the data wanted
  4. 4) Hit the “Graph Extract Found” button
  5. 5) A user prompt will appear asking for the location and file name for the new extract to be saved at.
  6. 6) The program stops running and the new file will be created.

Its that simple.

Architecture

State Machine

Block Diagram 2.png

Functionality 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 X scale min and max values.  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 extract is then saved using the low level tdms file I/O vi’s.

The LabVIEW 2010 and 2011 versions are avaliable below.

No tool kits are required to run this VI.

Matt Surridge

National Instruments

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

Contributors