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 segment using the default horizontal
and v erti
cal scope settings. (Note: the default horizontal scale is 4 µsec/div.)
You can v
erify that it’s a custom mask 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 number of horizontal divisions is 10.
Th
e points in these lists are presented in a counter clock-wise manner starting with
the lower # left hand corner (-20e-6, .1) for SEG1 and (-20e-6,-.2) for S EG2:
: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 return 1, indicating that acquisitions are taking place.
:MASK:STOPONVIOLATION ON This command will cause waveform 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