configure_reference
Configure a reference waveform slot to store a known-good trace and compare live signals against it. Adjust source, scale, offset, color, label, or save and reset captures.
Instructions
Configure a reference waveform slot. Omitted items are left unchanged.
A reference waveform is a copy of a trace stored inside the instrument and drawn over the live one, so a signal can be compared against a known-good capture. This only changes what the instrument displays and computes: the acquisition is untouched and no output is driven. ref is the slot 1-10 (see get_capabilities ref_channels). Read the result back with get_reference_state.
source is what the slot shows and saves: "CH1"-"CH4", a math trace "MATH1"-"MATH4", or a digital channel "D0"-"D15". The programming guide says only a channel that is currently displayed may be selected, but this firmware accepts a channel whose display is off as well (measured), so the source is not restricted here.
scale is the vertical scale per division and offset_v the vertical offset in volts, both of the stored trace. color is gray / green / blue / red / orange. label is the text drawn next to the trace (letters, digits, '_', '.', '+' and '-'; no spaces).
label_display turns the labels on or off for EVERY reference waveform at once - it is a single global switch on the instrument, not a per-slot setting, so it is reported identically for every slot.
save=true stores the current waveform of the source into this slot. It is sent last, after the settings in the same call, so the source is already selected. IT IS IRREVERSIBLE: whatever that slot held before is overwritten and lost, there is no undo, and there is no way to check beforehand whether the slot already holds a capture. Ask the human user before overwriting a slot they may still need.
reset=true restores the slot's default vertical scale and offset. It is sent first, before the settings in the same call, so scale and offset_v given together with it survive. It does not erase a stored waveform.
Specify at least one item to change. The device may snap values, so trust applied (the read-back value), not requested.
Reference waveforms cannot be downloaded: :WAVeform:SOURce does not accept them. To compare numerically on the host, subtract with configure_math(operator="subtract", source1="CH1", source2="REF1") and fetch the result with capture_waveform(channel="MATH1").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| save | No | ||
| color | No | ||
| label | No | ||
| reset | No | ||
| scale | No | ||
| source | No | ||
| offset_v | No | ||
| label_display | No |