TDMS Close 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: TDM Streaming VIs and Functions

Requires: Base Development System

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

Closes the .tdms file you opened with the TDMS Open function.

Details  Examples

tdms file specifies a reference number to the .tdms file on which to perform the operation. Use the TDMS Open function to open the refnum.
error in describes error conditions that occur before this node runs. With the following exception, this input provides standard error in functionality.

This node runs normally even if an error occurred before this node runs.
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 Close Details

(VxWorks) LabVIEW loads the shared TDMS component into memory when you open a TDMS file. LabVIEW unloads this component from memory when you close all TDMS files. On the VxWorks operating system, unloading the TDMS component from memory will leak approximately 1.8 kilobytes of memory due to a known issue of VxWorks. You can follow the guidelines below to avoid memory leak in your application.

  • Avoid opening and closing TDMS files unnecessarily on VxWorks.
  • Open an additional TDMS file at the beginning of the application and keep it open until the application completes all TDMS reading and writing. This workaround will keep the TDMS component in memory while you frequently open and close other TDMS files.
  • Set the TDMS component as a startup component on your RT target. To do this, add tdms.out; to the StartupDLLs section of ni-rt.ini, which is located in the root directory of your target (c:\ni-rt.ini), then restart the target. This will prevent the TDMS component from being unloaded from memory when you close TDMS files.

For information on how to access files such as ni-rt.ini on your RT target, refer to the KnowledgeBase on ni.com.

Examples

Refer to the following VIs for examples of using the TDMS Close function:

  • TDMS Read Events Data VI: labview\examples\File IO\TDMS\Standard Read and Write
  • Concurrent Access to TDMS File VI: labview\examples\File IO\TDMS

WAS THIS ARTICLE HELPFUL?

Not Helpful