configure_math
Configure MATH1-MATH4 on a Rigol MHO98 oscilloscope by setting operators, sources, scale, FFT, filters, and logic thresholds; only supplied parameters change, with validation before sending.
Instructions
Configure math channel MATH1..MATH4 (manual 3.16). Only given parameters are changed; all validation happens before anything is sent.
operator: ADD|SUBTract|MULTiply|DIVision|AND|OR|XOR|NOT|FFT|INTG|DIFF| SQRT|LG|LN|EXP|ABS|LPASs|HPASs|BPASs|BSTop|AXB source1/source2: arithmetic/function/filter sources — CH1..CH4, REF1..REF10 or a lower-numbered MATH channel (MATH1..MATH) scale/offset: vertical scale/offset of the math result (unit follows the operator; invalid for logic and FFT operators) invert: invert the math waveform (not for FFT/logic) lsource1/lsource2: logic operation sources — D0..D15 or CH1..CH4 grid: FULL|HALF|NONE math window grid; expand: GND|CENTer vertical expansion reference; wavetype: MAIN|ZOOM (ZOOM needs zoom enabled) fft_source: CH1..CH4 or MATH1..MATH3 fft_window: RECTangle|BLACkman|HANNing|HAMMing|FLATtop|TRIangle fft_unit: VRMS|DB; fft_mode: NORMal|AVERage|MAXHold fft_avg_count: FFT average count 2..1000 (AVERage mode) fft_scale/fft_offset: spectrum vertical scale/offset (2.0 dB / 1 mVrms steps default; range depends on fft_unit) fft_hscale_hz: frequency span 10 Hz..2 GHz; fft_hcenter_hz: center frequency 5 Hz..2 GHz (span and center influence each other) fft_start_hz/fft_end_hz: 0..2 GHz; end must exceed start by >10 Hz fft_search_enable: FFT peak search on/off; fft_search_num: 1..15 peaks; fft_search_threshold/fft_search_excursion: peak detection levels (excursion >= 0, in dB); fft_search_order: AMPorder|FREQorder filter_type: LPASs|HPASs|BPASs|BSTop; filter_w1/filter_w2: cutoff frequencies in Hz (band types need both, W1 < W2; range depends on the screen sample rate) sensitivity: logic operation sensitivity in div (0.1..1.0) distance: differentiation smoothing window 5..10000 points threshold1..threshold4: logic thresholds of CH1..CH4 in V label_show: show the math waveform label; dismode: True = show the math waveform in the main view instead of the math window reset: auto-fit the result's vertical scale (:MATH:RESet) extra: {"KEYWORD": value} passthrough for :MATH keywords documented in section 3.16 (e.g. {"FFT:SEARch:NUM": 10}); unknown keywords are rejected; RESet takes no value (pass None).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | No | ||
| extra | No | ||
| index | No | ||
| reset | No | ||
| scale | No | ||
| expand | No | ||
| invert | No | ||
| offset | No | ||
| dismode | No | ||
| display | No | ||
| source1 | No | ||
| source2 | No | ||
| distance | No | ||
| fft_mode | No | ||
| fft_unit | No | ||
| lsource1 | No | ||
| lsource2 | No | ||
| operator | No | ||
| wavetype | No | ||
| fft_scale | No | ||
| filter_w1 | No | ||
| filter_w2 | No | ||
| fft_end_hz | No | ||
| fft_offset | No | ||
| fft_source | No | ||
| fft_window | No | ||
| label_show | No | ||
| threshold1 | No | ||
| threshold2 | No | ||
| threshold3 | No | ||
| threshold4 | No | ||
| filter_type | No | ||
| sensitivity | No | ||
| fft_start_hz | No | ||
| fft_avg_count | No | ||
| fft_hscale_hz | No | ||
| fft_hcenter_hz | No | ||
| fft_search_num | No | ||
| fft_search_order | No | ||
| fft_search_enable | No | ||
| fft_search_excursion | No | ||
| fft_search_threshold | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |