TDMS Viewer for VS Code
View NI TDMS files (.tdms) in Visual Studio Code: properties, groups, channels and their values, the way NI's Excel add-in shows them, and charts of the channels with measurement cursors.
- Opens
.tdms files directly in the editor, read-only: the file is never modified.
- Nothing else to install: no NI software, no Python. It works wherever VS Code runs: Windows, macOS, Linux, Remote SSH, WSL and containers.
- Fast: the values of a 20 MB file (714,285 rows) appear in less than 0.1 s.
- Follows the VS Code theme, light or dark.


What it shows
- The File tab: the file properties and the table of groups.
- One tab per group: its properties, its channels with their properties, and a grid of their values with one column per channel. The column headers give the name, unit, type and number of values, as in NI DIAdem. Rows are numbered from 1.
- Timestamps in local time or in UTC, real numbers with a chosen number of significant digits.
- Problems that do not prevent reading the file, such as an interrupted write, are shown as warnings above the tabs.
Charts

- Each chart is an editor tab: open it with Open chart in a group tab, the chart icon in the editor title bar, or TDMS: Open Chart. Place it beside or below the viewer, or in a floating window; open as many as you need. VS Code reopens them after a restart.
- Tick the channels, the X axis follows. The channel list shows each group by time base: waveform time (
wf_start_time, wf_increment), a time channel and the channels measured with it (several acquisition rates in one group are recognized), or the row index. The menu of a channel changes its time base. Select all and Deselect all act on every channel of the list, or on those that match the filter.
- Channels of several groups on one time axis, shown as dates and times or as seconds since the start, to the nanosecond.
- One plot per unit, or all units in one plot; Boolean channels as steps. Peaks are never lost, whatever the zoom level: for each pixel column, the chart draws the minimum and maximum of the samples it covers.
- Mouse wheel to zoom, Ctrl + wheel to zoom a plot in Y, drag to pan, double click to see everything; the legend shows the value of each curve under the cursor.
- Measurement cursors C1 and C2: values of each curve, differences, 1/ΔX, and minimum, maximum and mean between the cursors, also marked on the curves. They are linked with the grid of values: the grid shows the samples under the mouse and the cursors, and scrolls to them (Follow the charts, above the grid); the mouse over a cell shows its instant in the charts, and a click on a cell moves the active cursor there.
Supported TDMS files
- TDMS 1.0 and 2.0 files (versions 4712 and 4713), written by LabVIEW or any other tool
- Multiple segments, incremental metadata, contiguous and interleaved data, little- and big-endian data
- Channels and properties of type I8 to I64, U8 to U64, SGL, DBL, Boolean, String (UTF-8) and Timestamp
- DAQmx logs (DAQmx raw data): values scaled as NI's own reader scales them, for voltage, current, thermocouple, RTD, strain gage, bridge, IEPE, resistance and counter channels and custom linear, polynomial, table and map ranges scales; digital lines
- Other channels with scaling information (
NI_Scale properties, NI_Scaling_Status "unscaled"): scaled the same way
- When the scales of a channel cannot be applied, its unscaled values are shown, with a warning and "(unscaled)" next to its type
- Files cut by an interrupted write: the complete data is shown, with a warning
Not supported yet
- Values of complex, extended-precision and fixed-point channels
- Files larger than the memory available to VS Code: the whole file is loaded. The grid also shows at most about 1.5 million rows per group
- Refreshing a file that is still being written, copy and export
- In charts: saved chart configurations
Saved charts, files being written, large files and export are planned: see the roadmap.
Settings
| Setting |
Default |
Description |
tdmsViewer.timeZone |
local |
Time zone of the timestamps: local (as NI DIAdem and the Excel add-in) or utc. Also available in the viewer header. |
tdmsViewer.significantDigits |
15 |
Significant digits of real numbers, as DIAdem and Excel; 0 shows the exact value. |
tdmsViewer.cursorStatistics |
true |
Between the measurement cursors of a chart, mark the minimum and maximum of each curve and draw a line at its mean. |
tdmsViewer.followCharts |
true |
The grid of values scrolls to the samples the charts point at: under the mouse, and at the active measurement cursor. Also available above each grid (Follow the charts). |
Installation
- VS Code: search for TDMS Viewer in the Extensions view, or install it from the Visual Studio Marketplace.
- VSCodium, Cursor and other editors based on VS Code: install it from Open VSX.
- Without access to these stores: download the
.vsix package of a version from the releases, then run Extensions: Install from VSIX….
VS Code 1.85 or later.
Feedback
Report problems and ideas in the issues. A file that does not open as expected helps a lot, if you can share it.
Development
The viewer is written in TypeScript; its TDMS parser has no dependency and is checked against files written by LabVIEW. To build, test or contribute, see docs/development.md.
License
BSD 3-Clause
| |