Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

MDO scope: clear current waveform

DPO/MSO/MDO4000 Series, DPO/MSO/MDO/TDS/THS3000 Series, DPO/MSO/TDS/TPS2000 Series, TBS/TBA1000 Series
Post Reply
ellensn
Posts: 9
Joined: January 30th, 2017, 7:00 am
Country: United States

MDO scope: clear current waveform

Post by ellensn » April 29th, 2020, 9:55 am

Hello,

When I first turn on an MDO scope, don't trigger it, and, eg., query the RMS of channel 1 (`scope.query(':MEASU:MEAS1:TYP RMS;VAL?')`), I get `9.91e37` which is equivalent to a nan. This is expected behavior and, in my case, desirable.

Once I acquire anything, though, I can't seem to get back to this former state where a nan is returned rather than the last measurement. I've tried `*CLS`, `DCL`, and a few other things to no avail.

Basically, I want to know when I'm getting garbage data. I have what seems to me to be a kludge where I note the current acquisition number (`:ACQ:NUMAC?`) and keep checking to be sure that it has increased at least as much as `:ACQ:NUMAV?` before collecting any measurements. I figured that clearing the screen after eg. some change and then asking for measurements until the answer wasn't a nan would be more efficient, were it possible.

Thanks.

Carl M
Tektronix Applications
Tektronix Applications
Posts: 800
Joined: July 30th, 2008, 4:45 pm
Country: United States

Re: MDO scope: clear current waveform

Post by Carl M » April 29th, 2020, 10:58 am

the instrument has an operation complete bit that provides robust determination of a new waveform. keep in mind it is only set for single-shot acquisitions (i.e. not free run) and must be triggered (i.e. normal trigger).

as for measurement value qualification, I'd check the event status register. I know this works after MEASU:IMM:VALUE? which I recommend for programmatic collection of results

related topics: viewtopic.php?t=136954#p276299, viewtopic.php?t=137950#p278587
Tektronix Application Engineer

ellensn
Posts: 9
Joined: January 30th, 2017, 7:00 am
Country: United States

Re: MDO scope: clear current waveform

Post by ellensn » April 29th, 2020, 11:23 am

I appreciate the response. I see that the following sequence accomplishes what I was looking for and leaves the scope running afterwards which suits my purposes well:

Code: Select all

print(scope.query(':MEASU:MEAS1:TYP RMS;VAL?'))
scope.write(":ACQ:STOPA SEQ")
scope.write(":ACQ:STOPA RUNST")
print(scope.query(':MEASU:MEAS1:TYP RMS;VAL?'))
returns:

Code: Select all

169.7535E-3  # last RMS

9.91E+37  # desired nan
In the thread you linked, you wrote
the only way to be sure you are making the same measurement on separate acquisitions (or multiple measurements on a single acquisition) is with single shot acquisition (which will set the operation complete bit) and *OPC? synchronization.
Is what I have written above similarly robust? I can see the reasoning to go to actual single shot acquisition and use *OPC? though the method I described fits with my current code with less modification.

Post Reply

Return to “Non- Windows Based Oscilloscopes”

Who is online

Users browsing this forum: No registered users and 2 guests