get_waveform
Capture oscilloscope waveform data from a selected source and save it to a local CSV or NPY file, returning metadata and statistics while keeping large sample arrays out of context.
Instructions
Acquire waveform data and SAVE it to a local file.
Returns metadata (preamble + statistics) and the file path only — sample arrays are never inlined, to protect the caller's context window.
source: CH1..CH4 or MATH1..MATH4 (MATH only in NORMal mode). mode: NORMal (screen, 1000 pts) | MAXimum | RAW (full memory; the instrument is stopped first). fmt: BYTE|WORD|ASCII. start/stop: 1-based inclusive point range (RAW/MAX). points: alternative window selector — number of points to read (:WAVeform:POINts, manual 3.28.4); when given, the RAW full-memory start/stop default is skipped and start/stop are only sent if explicitly provided. save_format: csv | npy (npy recommended for RAW ≥ 1M points; CSV is refused above max_csv_points=2M unless force_csv=True — a 50M-point CSV would be ~2 GB of text). Parse the file afterwards with your own protocol scripts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fmt | No | BYTE | |
| mode | No | NORMal | |
| stop | No | ||
| start | No | ||
| points | No | ||
| source | No | CH1 | |
| filename | No | ||
| force_csv | No | ||
| save_format | No | csv | |
| max_csv_points | No | ||
| stop_instrument_first | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |