TDMS Set Next Write Position Function

Owning Palette: Advanced TDMS VIs and Functions

Requires: Base Development System

Configures the offset at which the TDMS Advanced Asynchronous Write or TDMS Advanced Synchronous Write function starts overwriting the existing data in a .tdms file.

Note  Overwriting existing data from the middle of a file might result in a corrupt final file. National Instruments recommends that you truncate the file when you finish writing, or make sure you overwrite the entire remainder of the file. Use the truncate file? input of the TDMS Advanced Close function to truncate a .tdms file.

Examples

 Add to the block diagram  Find on the palette
channel name in specifies the channel on which to perform the operation.
group name in specifies the group on which to perform the operation.
tdms file specifies a reference number to the .tdms file on which to perform the operation. Use the TDMS Advanced Open function to open the refnum.
offset specifies how far in the raw data from the location specified by from to set the file position. The default is 0. If the disable buffering? input of the TDMS Advanced Open function is TRUE, the next write position you set must be a multiple of the sector size of the hard disk.
from specifies where to set the file position in the raw data based on the offset.

0start (default)—Sets the file position offset samples from the beginning of the raw data in the .tdms file. If the value of from is 0, the value of offset must be equal to or greater than 0, which sets the file position at the beginning of the raw data.
1end—Sets the file position offset samples from the end of the raw data in the .tdms file. If the value of from is 1, the value of offset must be equal to or less than 0, which sets the file position at the end of the raw data.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
tdms file out returns a TDMS file reference to the .tdms file on which you performed the operation.
error out contains error information. This output provides standard error out functionality.

Examples

Refer to the following VIs for examples of using the TDMS Set Next Write Position function: