NI TDMS File Format – What is a TDMS File?
The NI TDMS file format is an NI platform-supported file format. All NI software development environments interface with TDMS files as part of their native function palettes or libraries. These interfaces abstract the complexity of storing structured data while making it easy to add descriptive information along with captured measurement or simulation data.
Mục lục bài viết
LabVIEW
There are multiple interfaces to NI TDMS files from NI LabVIEW software. The easiest way to get started writing TDMS files in LabVIEW is with the Write to Measurement File Express VI. This Express VI offers the ease of dialog-based configuration but sacrifices performance and is not suitable for high-speed streaming or real-time applications.
For more flexibility and to achieve the best performance, use the TDMS primitive VIs from the File I/O palette. With these VIs, you can read and write TDMS files and their properties in the most efficient manner possible. This method of accessing TDMS files is real-time-capable using the LabVIEW Real-Time Module. The TDM Streaming palette was introduced in LabVIEW 8.2.
Installation of LabVIEW or drivers released in August 2010 or later includes access to a brand new TDMS Advanced palette for extremely low-level control of TDMS files, so you can perform advanced techniques such as asynchronous writes and reads.
Figure 2. You can choose from several interfaces in LabVIEW to read and write TDMS files.
Figure 3. The TDM Streaming palette offers the most flexible and efficient approach to reading and writing TDMS files using LabVIEW.
For a detailed overview of reading and writing TDMS files with LabVIEW, see Introduction to LabVIEW TDM Streaming VIs.
LabWindows™/CVI
You can access TDMS files in NI LabWindows™/CVI software using one of two libraries. The first – the LabWindows/CVI TDM Streaming Library – is by far the faster and more universal approach. With this API, you can interface with TDMS files in real-time applications using the LabWindows/CVI Real-Time Module. The TDM Streaming Library was introduced in LabWindows/CVI 8.1.
The alternative interface to TDMS files from LabWindows/CVI is the DIAdem Connectivity Library, which uses NI DIAdem software as an intermediate mechanism for writing or reading TDMS files.
Note: Support for the DIAdem Connectivity Library was removed in LabWindows/CVI 2017. NI recommends that you use the TDM Streaming Library for existing projects and the TDM C DLL (attached) for new projects.
Figure 5. LabWindows/CVI offers two interfaces to TDMS files, but the TDM Streaming Library is by far the more efficient and flexible of the two.
.NET Languages Using Measurement Studio
The NI Measurement Studio TDM Streaming .NET Class Library – introduced in Measurement Studio 8.6 – provides a fast and flexible way to interface directly with TDMS files using .NET languages. Note: Access to the TDM Streaming .NET Class Library is restricted to the Professional and Enterprise editions of Measurement Studio.
Figure 6. Measurement Studio includes a built-in TDM Streaming .NET Class Library.
NI DIAdem
NI DIAdem software is a flexible data post-processing, visualization, and reporting environment that is easily expandable to work with any custom file format through the use of DataPlugins. DIAdem is specifically designed to read and write TDMS files out of the box; however, any data loaded into the Data Portal – a visual representation of internal DIAdem memory – is inherently mapped onto the TDMS model. Using DIAdem – a client to the NI DataFinder and the third facet of the NI TDM solution – you can search the NI DataFinder index to locate the data you are looking for as easily as you locate information on the Internet using search engines like Google.
Figure 7. You can configure DIAdem to map any custom file format onto the TDMS model to capitalize on the strengths that it offers.
To learn more about DIAdem for interactive visualization, analysis, and reporting, see ni.com/diadem.
NI VeriStand
NI VeriStand is a configuration based software environment for real-time testing that enables you to log measurements to TDMS files in multiple ways. You can use the built–in stimulus profile editor tool to create automated test scripts for generating real-time stimulus to a device under test while logging system parameters to file. You can also configure measurements and log data directly from the user interface using the workspace data-logging object introduced in NI VeriStand 2013. NI VeriStand 2013 also adds direct DIAdem integration so that you can automate both post processing and report generation. This ensures that your data files are processing and presented the same every time you run a test, which allows you to make decisions faster and improve product quality.
Watch this video overview to learn how to create and manage real-time test data with VeriStand and DIAdem.