doc/help/CSV-Import-Export.md
Serial Studio can export incoming telemetry data to CSV files during a live session and replay previously saved CSV files through the full data pipeline. This page covers both workflows, the file format, and the MDF4 alternative available in Pro.
The following diagram shows how CSV export runs on a background thread during live data, and how CSV playback feeds recorded data back through the same pipeline.
flowchart LR
A["Device"] --> B["Frame Builder"]
B --> C["Dashboard"]
B --> D["CSV / MDF4 File"]
Export: 8192 queue capacity | 1024 frame flush threshold | 1 s timer | zero dashboard impact
flowchart LR
A["CSV File"] --> B["CSV Player"]
B --> C["Frame Builder"]
C --> D["Dashboard"]
CSV export is toggled in the Setup Panel of the main window. Enable the CSV Export switch before or during a live connection. Once enabled, Serial Studio writes every incoming frame to a CSV file on a background thread, so dashboard performance is unaffected.
Exported CSV files are saved under the user's Documents directory in a structured hierarchy:
Documents/Serial Studio/CSV/<Project Name>/<Year>/<Month>/<Day>/<Time>.csv
For example, a session started at 3:30:05 PM on March 17, 2026, for a project named "Weather Station" would produce:
Documents/Serial Studio/CSV/Weather Station/2026/03/17/15-30-05.csv
The CSV file contains a header row followed by one row per received frame.
Header row:
RX Date/Time,GroupName/DatasetName,GroupName/DatasetName,...
The first column is the elapsed time in seconds since the session started, with nanosecond precision (e.g., 0.000000000, 0.016384512). The remaining columns correspond to each dataset defined in the project, ordered by their unique ID. The header labels are formed as GroupName/DatasetName so you can trace each column back to the project structure.
Data rows:
Each row represents one complete frame. Cells contain the numeric or string values of each dataset at that point in time.
The CSV::ExportWorker runs on a dedicated background thread. Frames are enqueued from the main thread in a lock-free manner and written to disk in batches. This design ensures that disk I/O latency never blocks the dashboard or data pipeline.
To replay a previously recorded CSV file:
When a CSV file is opened, Serial Studio examines the first column to determine the timestamp format:
0.0, 1.5, 3.016): Used directly as elapsed time. This is the format Serial Studio's own export produces.2026-03-17 15:30:05): Parsed into absolute timestamps and converted to elapsed offsets.The CSV Player provides the following controls:
| Control | Action | Shortcut |
|---|---|---|
| Play / Pause | Start or pause playback | Space |
| Previous Frame | Step back one frame | Left Arrow |
| Next Frame | Step forward one frame | Right Arrow |
| Progress Slider | Seek to any position in the file | Drag or click |
The current timestamp is displayed next to the slider, formatted as HH:MM:SS.mmm.
During playback, the CSV Player feeds each row through the same data pipeline used for live connections: Frame Builder, then Dashboard. This means all widgets, plots, and gauges render exactly as they would with a live device. The player respects the original timing between frames, so playback speed matches the original recording rate.
For projects with multiple data sources, the CSV Player maps columns back to their respective source IDs. Each column is associated with a source based on the dataset's unique ID recorded in the header. The player reconstructs per-source frames and injects them into the pipeline at the correct source routing.
Playback runs at real-time speed by default. The player uses the timestamp differences between consecutive rows to schedule frame delivery, preserving the original data rate.
Serial Studio Pro can also export and replay MDF4 (Measurement Data Format version 4) files, an ASAM standard for storing measurement data in a compact binary format.
| Aspect | CSV | MDF4 (Pro) |
|---|---|---|
| File size | Larger (text-based) | Smaller (binary, compressed) |
| Write speed | Adequate for most rates | Better for high-frequency data |
| Compatibility | Universal (Excel, Python, MATLAB, R) | Specialized (CANape, DIAdem, asammdf) |
| Metadata | Column headers only | Rich: channel names, units, conversions |
| Best for | General analysis, sharing | Automotive, industrial, high-rate logging |
CSV files:
import pandas; df = pandas.read_csv('file.csv')data = readtable('file.csv');data <- read.csv('file.csv')MDF4 files (Pro):
from asammdf import MDF; mdf = MDF('file.mf4')