6 53220A/53230A Math, Graphing, and Data Logging
216 Keysight 53220A/53230A User’s Guide
Example: Enabling and computing statistics
The following example returns the mean, standard deviation, minimum value, and
maximum value for a set of 500 readings. The trigger count setting, although it
defaults to ‘1’, is shown for completeness. A ‘wait’ statement is included to delay
the analysis until all readings are complete.
CONF:FREQ (@1) // frequency measurement on ch 1
TRIG:COUN 1 // trigger count is 1
SAMP:COUN 500 // 500 readings per trigger
SENS:FREQ:GATE:TIME 10e-3 // 10 ms gate time
CALC:STAT ON // enable CALCulate1 subsystem
CALC:AVER:STAT ON // enable statistics
INIT // initiated the measurements
*WAI // wait for all rdgs to complete
CALC:AVER:ALL? // compute statistics
Typical data returned for this command is:
mean std. dev
+5.50020355962701E+006 +2.59738014535884E+006
min value max value
+1.04179550991303E+006, +9.94903904473447E+006
Average value, minimum value, maximum value, average peak-to-peak
value
Individual characteristics of a given set of readings can be determined using the
following commands. Before any of the commands are used, statistics must be
enabled with CALCulate[1]:AVERage:STATe ON.
CALCulate[1]:AVERage:AVERage?
– returns the average (mean) of all readings in the reading count.
CALCulate[1]:AVERage:MINimum?
– returns the minimum value of all readings in the current reading count.
CALCulate[1]:AVERage:MAXimum?
– returns the maximum value of all readings in the current reading count.