Command Groups
Math Command G
roup
Use the commands in the Math Command Group to create and define a
math waveform. First, specify the math type using MATH[1]:TYPe – either
dual wavefor
m, FFT, advanced math, or spectrum math. Then, using the
MATH[1]:DEFine command, you can build simple math expressions that
contain no computation, such as
:MATH:DEFine CH1. You can also build
complex expressions that consist of up to 128 characters in a quoted string,
and comprise many sources, functions, and operands, such as
:MATH:DEFINE
"SINE(CH1)*(VAR1+CH2)*CH3 - CAREA(CH4)".
Note that when your program updates a live waveform or alters a reference
waveform, the math waveforms containing those waveforms as sources are also
updated
to reflect the changes.
NOTE. If you set the math type to
FFT
, your math expression can only be the
FFT of a live analog or reference waveform. However, if the math type is set
to
ADVanced
, then you can include FFT as part of a math expression. See the
examples of advanced math in MATH[1]:DEFine for more information.
Table 2-32: Math Commands
Command
Description
MATH[1]? Returns the definition of the math waveform
MATH[1]:AUTOSCale Sets (or queries) the state of automatic vertical scaling of the math waveform .
MATH[1]:DEF ine
This command specifies the current math function as a text string.
MATH[1]:HO Rizontal:POSition This command specifies the math horizontal display position for FFT or (non-live) math
reference waveforms
MATH[1]:HO Rizontal:SC Ale This command specifies the math horizontal display scale for FFT or for Dual Math
waveforms
MATH[1]:HORizontal:UNIts Returns the math waveform horizontal unit value
MATH[1]:LABel
Sets or queries the waveform label for the math waveform
MATH[1]:SPECTral:MAG This command specifies the units of spectral magnification in the math s tring
MATH[1]:SPECTral:WINdow This command specifies the window function for math waveform spectral input data
MATH[1]:TYPe
This command specifies the math waveform type (
DUAL, FFT, ADVanced or
SPECTRUM
). This command is used along with MATH :DEFine.
MATH[1]:VERTical:POSition This command speci fies the vertical position of the currently selected math type
MATH[1]:VERTical:SCAle This command specifies the vertical scale of the currently selected math type
MATH[1]:VERTical:UNIts
Returns the math wav e form vertical units
MATHVAR?
Returns all numerical values used within math expressions
MATHVAR:VAR<x>
This command specifies numerical values you can use within math expressions
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual 2-35