TDMS Delete Data Function

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: Advanced TDMS VIs and Functions

Requires: Base Development System

Copyright: (c) 2018 National Instruments. All rights reserved.

Deletes data from a channel or multiple channels in a group.

Note  This function does not support digital data or DAQmx raw data.

Details  Example

count specifies the number of data samples to delete from the .tdms file for each channel. The default is -1, which means this function deletes all data samples from the position you specify in from. If the value of count is out of range for a channel, this function automatically sets count to the number of data samples in that channel.
from specifies from where to delete data samples from the .tdms file for each channel.

0start (default)—Specifies to delete data samples from the beginning of each channel.
1end—Specifies to delete data samples from the end of each channel.
file path is the absolute path to the file you want to open.
group name in specifies the channel group on which to perform the operation.
channel name(s) in specifies the channel to perform the operation on. If you do not wire data to this input, LabVIEW performs the operation on all channels under the same group.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
keep empty group/channel? specifies whether to keep the group or channels in the .tdms file if the group or channels are empty after this function deletes data samples. The default is TRUE, which means this function keeps the empty group or channels.
file path out returns the path of the .tdms file on which you performed the operation.
error out contains error information. This output provides standard error out functionality.

TDMS Delete Data Details

When the data you wire contains waveform data, LabVIEW sets the following channel properties and waveform attributes:

  • If the waveform attribute NI_ExpXDimension represents time or if this attribute does not exist, LabVIEW sets the following values:
    • wf_start_offset = wf_start_offset + count * wf_increment
    • If the waveform attribute NI_ExpTimeStamp exists, LabVIEW sets NI_ExpTimeStamp = NI_ExpTimeStamp + count * 1/wf_increment
  • If the waveform attribute NI_ExpXDimension represents frequency, LabVIEW sets the following values:
    • wf_start_offset = wf_start_offset + count * 1/wf_increment
    • If the waveform attribute NI_ExpTimeStamp exists, LabVIEW sets NI_ExpTimeStamp = NI_ExpTimeStamp + count * 1/wf_increment
  • After this function deletes data, if the number of data samples in the .tdms file is less than the value of the channel property wf_samples, LabVIEW sets the value of wf_samples to equal the number of data samples in the .tdms file.

Example

Refer to the TDMS Delete Data from Channels VI in the labview\examples\File IO\TDMS directory for an example of using the TDMS Delete Data function.

WAS THIS ARTICLE HELPFUL?

Not Helpful