capture_waveform
Capture oscilloscope waveform data and convert it to volts, supporting analog channels and math traces. Large datasets are saved to a CSV file, with sample interval and time metadata provided.
Instructions
Capture waveform data and return it converted to volts (V).
channel is "CH1"-"CH4" or a math trace "MATH1"-"MATH4" (configure one with configure_math). A math trace is read as the data currently displayed on screen, so turn its display on first.
When there are many points the data is written to a CSV file and its path is returned in data_file. Screen data may be decimated, so read the effective sample rate as the reciprocal of sample_interval_s.
A math trace using the fft operator has a frequency x axis: it returns x_unit "Hz" (sample_interval_s is then the frequency step in hertz and time_origin_s the start frequency) and no effective_sample_rate_sa_per_s. Every other source keeps the time axis and the usual shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| max_points | No |