scope_save_waveform_csv
Save waveform data from a LeCroy oscilloscope as a timestamped CSV file (time_s, voltage_v) for post-processing. Automatically stores in a 'waveforms/' subfolder. Specify channel and optional maximum points.
Instructions
Capture a waveform and save it as a timestamped CSV file ready for post-processing.
Files are always saved to a 'waveforms/' subfolder next to the server with an auto-generated filename, e.g.: waveforms/C1_20260329_153042.csv The full path is returned so you know exactly where the file landed.
The CSV has two columns: time_s and voltage_v. Metadata lines starting with # at the top are ignored by pandas (use comment='#').
Example Python usage: import pandas as pd df = pd.read_csv('waveforms/C1_20260329_153042.csv', comment='#') df.plot(x='time_s', y='voltage_v')
Args: channel: Channel number 1–4 max_points: Maximum samples to save (default 10000).
Transport: SCPI (binary WF? DAT1 transfer + INSPECT? WAVEDESC scaling)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| max_points | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |