Using Pass/Fail mask on the DS1000Z is a great way to debug signals. Controlling the mask settings over the bus can be tricky.
Here we show an example for Mask Operation.
First, get the signal you want on the scope display.
Then, send:
-> :MASK:ENAB ON
// set the mask to pass 0.25 divisions wide and tall around the last signal
-> :MASK:X 0.25
-> :MASK:Y 0.25
-> :MASK:CREATE
-> :MASK:DATA?
//this command returns binary data that looks like this in text:
//then you can reset your instrument or change your settings, but after that still get the mask back with:
-> :MASK:DATA <binary stream>
//for binary stream simply send the same data that came back when you requested the mask previously
Finally, you can activate the mask calculations with:
-> :MASK:OPER RUN