Getting started

This page takes you through a first file: its structure, its values, a chart and a copy to Excel.

Open a file

Open a .tdms, .h5 or .hdf5 file as any other file: from the Explorer, File > Open, or by dragging it into VS Code. It opens in the viewer, read-only.

With another HDF5 viewer installed, such as H5Web, VS Code asks which one opens an HDF5 file; see Other HDF5 viewers.

The header gives the size of the file and the time taken to read its structure, with, for a TDMS file, its number of segments and its TDMS version, and for an HDF5 file, its number of datasets and the version of its superblock. The Local time list at its right shows the timestamps in local time or in UTC.

The File tab: the properties of the file and the table of its groups

The File tab shows:

  • the properties of the file;

  • the table of its groups, each one a link to its tab;

  • the buttons that export the whole file: Export to Excel… and Export All Groups to CSV….

Problems that do not prevent reading the file, such as a channel whose scales cannot be applied, are shown as warnings above the tabs.

Browse a group

Each group has a tab of its own.

A group tab: its properties
  • Group properties and Channels unfold the properties of the group and the table of its channels with their properties.

  • The grid shows the values, one column per channel. The column headers give the name, the unit, the type and the number of values, as in NI DIAdem. Rows are numbered from 1.

The grid reads its rows as it scrolls: scroll as far as you like, even in a group of millions of rows.

Plot channels

  1. In a group tab, click Open chart. The chart opens in a tab of its own, beside the viewer.

  2. Tick channels in the list on the left: the X axis follows their time base.

  3. Zoom with the mouse wheel, pan with a drag, double-click to see everything.

  4. Click Cursors C1/C2 for measurement cursors, with the values of each curve, their differences, and the minimum, maximum and mean between them.

See Time charts. For a channel against another, use Open XY chart: see XY charts.

Copy values to Excel

  1. Drag over cells of the grid, or click a column header for a whole channel.

  2. Press Ctrl+C (Cmd+C on macOS).

  3. Paste in Excel.

The values are copied with the decimal separator of your system, as Excel expects. See Copy and export.

Try it without your own files

The repository of the extension writes demonstration files, used for the screenshots of this documentation:

git clone https://gitlab.com/wovalab/open-source/vs-code-extension-for-tdms-file.git
cd vs-code-extension-for-tdms-file
npm ci
npm run demo:files

test/fixtures/demo/demo-bench.tdms holds a test bench with two acquisition rates, waveforms, a cycle with a Boolean valve, and two actuators of 30 cycles for XY charts. demo-endurance.tdms holds 1,000 cycles of an actuator: a million samples per channel.

HDF5 demonstration files are written by a Python script with h5py, in a virtual environment of its own:

python3 -m venv tools/python/.venv
tools/python/.venv/bin/pip install -r tools/python/requirements.txt
tools/python/.venv/bin/python -I tools/python/make_hdf5_demo_files.py

demo-bench.h5 is a test bench written by h5py: CF times, units, compressed datasets and a two-dimensional dataset. demo-labview.h5 imitates the files of h5labview2: waveforms, timestamps, values with a unit and Booleans. demo-unsupported.h5 shows how the viewer lists what it does not read.