Table Of Contents

Reading Measurement Data from TDMS Files

Last Modified: June 22, 2021

Query TDMS files to read measurement data.

What to Use

You can find the SystemLink TDM Reader and Configuration APIs on the Data Communications palette in LabVIEW NXG 4.0 or later.

What to Do

  1. On the client, create the following diagram in a VI to query TDMS file.

    Customize the gray sections for your unique programming goals.

    Open Configuration initializes a connection with a SystemLink server or SystemLink Cloud based on the credentials you supply.
    Create Filter creates or adds a query to an existing filter based on the criteria you specify. For example, in the VI above, Create Filter (Name) queries the TDMS files with "demo" in the name.
    Query TDMS Files searches a SystemLink server or SystemLink Cloud for files matching the criteria configured by Create Filter.
    Cluster Properties reads the TDMS files reference returned and provides the file IDs, which the Listbox Properties displays.
    Index Array indexes the file ids with the file currently selected in the Matching File IDs listbox.
    In the Case Structure, Open File opens references to matching TDMS files on your server or SystemLink Cloud.

    The VI stores the clusters returned by Query TDMS Files instead of calling Open File again when the listbox selection changes.

    Read Data returns the specified measurement data from the TDMS files, which you can visualize on a graph.


If you encounter errors, try the following troubleshooting strategies:
  • If you receive timeout errors, connection refused errors, or 404 errors, verify the following things:
    • The VI is connected to the correct server machine.
    • The NI Web Server is configured, running on the server machine, and accepts remote connections.
    • The web service you want to use is installed on the server machine.
  • If Open Configuration (Auto) returns an error, verify the application is on the server machine or a system managed by the server.
  • If you receive a 401 unauthorized errors, verify the credentials you specify are correct and have sufficient permission specified in the NI Web Server.

    Verify the permissions for each SystemLink API.

  • If your application is a WebVI and you receive network errors, verify you enabled CORS for web servers running on the same machine as clients in NI Web Server.
  • If you application is a WebVI and you want to deploy it, use Open Configuration (Auto) and log into the web server before accessing the WebVI.

Recently Viewed Topics