MDO3000 Programmer Manual.pdf - 第1101页
Appendix E: Mask/Limit Command Sequence Examples This section provides some sample mask command sequences that show you how to accomplish a few typical tasks. Example 1: Creating custom masks Goal: Create a custom mask, …

Appendix D: Waveform Transfer (WFMOutpre and CURVe Query) Examples
XUNIT "Hz"
This value indicates the units of the x-axis of the waveform record. This value is always “Hz”
for RF frequency domain traces. This is query onl y. (If you would like to determine only this
value, use the
WFMOutpre:XUNit? query.)
XINCR 2.0000
E+6
This value in
dicates the frequency, in hertz, between data points i n the waveform record.
This is query only. (If you would like to determine only this value, use the WFMOutpre:XINcr?
query.)
XZERO 1.4000E+9 This value indicates the frequency, in hertz, of the first data point in the waveform record.
This freque
ncy is relative to the time of the trigger, which is always 0. This XZEro frequency
can be negative. This is query only. (If you would like to determine only this value, use
the WFMOutpre:XZEro? query.)
PT_OFF 0 This is a query provided only for compatibility with other Tektronix oscilloscopes. T he
returned
valueisalways0. (Ifyouwouldliketo determine only this value, use the
WFMOutpre:PT_Off? query.)
YUNIT "W"
This value indicates the units of data points in the waveform record. T his value depends on
the vertical units of the source waveform – in this case, watts. This is query only. (If you
would li
ke to determine only this value, use the WFMOutpre:YUNit? query.)
YMULT 1.5625E-3
This val
ue indicates the multiplying factor to convert the data point values to the units
specified by the:WFMOutpre:YUNit command. This is query only. (If you would like to
determine only this value, use the WFMOutpre:YMUlt? query.)
YOFF 0.0E+0 This value indicates the vertical position of the source waveform. This value is unused for
RF fre
quency domain traces and is always 0.
YZERO
0.0E+0
This v
alue indicates the vertical offset of the source waveform. This value is unused for RF
frequency domain traces and is always 0.
DOMAIN FRE QUENCY This value indicates the domain i n w hich the source waveform is displayed and stored. For
RF time domain traces, the domain is Time and waveform transfer information is treated
as in
teger information. For RF frequency domain traces, the domain is Frequency and
waveform transfer information is treated as floating point information. This is query only. (If
you would like to determine only this value, use the WFMOutpre:DOMain? query.)
WFMTYPE RF_FD
This value indicates the type of the source waveform. RF_FD indicates an RF frequency
dom
ain trace (frequency domain waveform). This is query only. (If you would like to
determine only this value, use the WFMOutpre:WFMTYPe? query.)
CENTERFREQUENCY 2.4000E+9 T his value indicates the center frequency, in hertz, of the source waveform. This is query only.
(If you would like to determine only this value, use the WFMOutpre:CENTERFREQuency?
qu
ery.)
S
PAN 2.0000E+9
T
his value indicates the frequency span, in hertz, of the source waveform. This is query
only. (If you would like to determine only this value, use the WFMOutpre:SPAN? query.)
R
EFLEVEL 1.0000E-3
This value indicates the reference level, in watts, of the source waveform. This is query only.
(If you would like to determine only this value, use the WFMOutpre:REFLEvel? query.)
D-16 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual

Appendix E: Mask/Limit Command Sequence Examples
This section provides some sample mask command sequences that show you
how to accomplish a few typical tasks.
Example 1: Creating custom masks
Goal: Create a custom mask, run a test that stops on violation, and determine
the number
of hits per mask segment.
Command Comment
*RST Re sets the oscilloscope to the factory default settings.
:MASK:CUSTOM INIT This should display a triangle mask with one segm ent using the default horizontal
and verti
cal scope settings. (Note: the default horizontal scale is 4 µsec/div.)
You can v
erify that it’s a custom m ask by querying:
MASK:S
TANDARD?
Should
return CUSTOM .
Next, u
se mask commands to specify the mask parameters:
:MASK
:USER:AMPLitude 100.0000E-3
:MASK:USER:VSCALe 100.0000E-3
:MASK:USER:VPOS 0.0E+0
:MAS
K:USER:VOFFSet 0.0E+0
:MASK:USER:HSCALE 4.0000E-6
:MASK:USER:HTRIGPOS 500.0000E-3
:MAS
K:USER:WIDth 4.0000E-6
:MASK:USER:RECOrdlength 10000
:MASK:USER:TRIGTOSAMP 0.0E+0
Next, substitute a customized mask for the initial mask by creating two blue bands
ac
ross the screen, one above and one below the x-axis.
Note the dimensions of the display are 40e-6 X 10e-3 (10*horizontal_scale X
10*vertical_scale). The num ber of horizontal divisions is 10.
Th
e points in these lists are presented in a c ounter clock-wise manner starting with
the lower # left hand corner (-20e-6, .1) for SEG1 and (-20e-6,-.2) for SEG2:
:MASK:USER:SEG1:POINTS
-20e-6,.1,20e-6,.1,20e-6,.2,-20e-6,.2
:
MASK:USER:SEG2:POINTS
-20e-6,-.2,20e-6,-.2,20e-6,-.1,-20e-6,-.1
Next, force a failure. Generate 100KHz sine wave, amplitude 0.22 volt, offset 0.0.
:ACQUIRE:STATE? Should r eturn 1, indicating that acquisitions are taking place.
:MASK:STOPONVIOLATION ON This command will cause w aveform acquisitions to stop upon the first occurrence of a
waveform violation once the test starts.
:MASK:TEST:STATE ON Starts the test.
:ACQUIRE:STATE? Should now return 0, verifying that waveform acquisitions have stopped.
MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual E-1

Appendix E: Mask/Limit Command Sequence Examples
Command Comment
You can use the following queries to count the hits and get other information about
the test. Total hits should equal the s um of the SEG1 and SEG2 hits.
:MASK:COUN T:HITS?
:MASK:COUNT
:SEG1:HITS?
:MASK:COUNT:SEG2:HITS?
:MASK:COUNT:TOTAL?
:MASK:COUN
T:VIOLATIONS?
:MASK:COUNT:WAVEFORMS?
:MASK:COUNT:VIOLATIONS? should return 1, since stoponviolation was set.
Example 2:
Modifyinganexistingmask
Goal: Modify an existing standard mask, save the modified mask, then recall
the modified mask.
NOTE. Th
is example does not apply for MDO3000 series models.
Command Comment
*RST Resets the oscilloscope to the factory default settings.
:MASK:STANDARD DS1C This command displays a standard DS1C mask.
:MASK:STANDARD? Should return D S1C.
:MASK:CUSTOM COPYACTIVE
This c
ommand copies the currently displayed mask and designates it as a custom mask.
:MASK:STANDARD? Should now return CUSTOM.
You can query to find out the points of each segment:
:MASK:USER:SEG1:PO INTS? Should return -155.3300E-9,420.0000E-3,-41.2100E-9,420.0000E-3,
-6.3400E-9,2.1000,-6.3400E-9,4.6200,82.4200E-9,4.6200,82.4200E-9,4.4100,
17
1.1800E-9,4.4100,171.1800E-9,2.1000,206.0500E-9,420.0000E-3,
320.1700E-9,420.0000E-3,320.1700E-9,6.3000,-155.3300E-9,6.3000
:MASK:USER:SEG2:PO INTS? Should return -155.3300E-9,-2.1000,320.1700E-9,-2.1000,320.1700E-9,
-420.0000E-3,152.1600E-9,-420.0000E-3,152.1600E-9,2.1000,114.1200E-9,
3
.9900,50.7200E-9,3.9900,12.6800E-9,2.1000,12.6800E-9,-420.0000E-3,-155.3300E-9,
-420.0000E-3
:MASK:USER:SEG3:PO INTS? Should return 0.0E+0,0.0E+0 since this mask has only 2 segments.
Next, you can modify the mask.
:MASK:USER:SEG2 DELETE The bottom segment of the m ask (segment 2) should disappear from the display.
:MASK:USER:SEG2:PO INTS? Should now return 0.0E+0,0.0E+0.
Create a new segment 2:
:MASK:USER:SEG2:PO INTS
[Enter new points for segment 2
here]
The MASK:USER:SE G2:POINTS command specifies the X-Y coordinate pairs of all points i n
the specified segment, using waveform units. There can be up to 8 s egments.
A new segment 2 should appear on the display.
E-2 MDO4000/B/C, MSO/DPO4000B and MDO3000 Series Oscilloscopes Programmer Manual