Overview
This example demonstrates how to programmatically edit groups and channels on an existing TDMS file within LabVIEW.
See KB 4TE9SRQ2: Can I Delete Channels or Properties from a TDMS File with LabVIEW?
Description
The project contains two VIs (and example data files). The main VI creates a new TDMS file with three groups, each with its own channel and data. The subVI is then called to convert the TDMS file to a TDM file in order to remove the specificied group. Finally, the main VI opens a TDMS File Viewer to observe the TDMS changes.
Requirements
- LabVIEW 2012 (or compatible).
Steps to Implement or Execute Code
- Open the appropriate version of the TDMS Example project.
- Open Create Modify TDMS.vi (main VI).
- Open the Block Diagram and note that three groups are created for a specified TDMS file each with their own channel and data associated with it. One of these channels is then removed from the file.
- Return to the Front Panel and select the file path for the TDMS and TDM files (NOTE: The VI is currently set to overwrite a pre-existing file if one chosen).
- Run the Create Modify TDMS.vi.
- During execution, a separate TDMS File Viewer will open.
- Expand the TDMS file in the left pane of the viewer to observe that there are only two groups present.
- Highlight one of the file sections in the left pane and view the values in the Values (table) tab in the right pane.
- Select "Quit" on the TDMS Viewer when done (this will also stop the VI).
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**