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)
INIT
*WAI
CALC:AVER:ALL?
Typical data returned for this command is:
+5.50020355962701E+006
+1.04179550991303E+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:AVERage?
– returns the average (mean) of all readings in the reading count.
Keysight 53210A User's Guide
TRIG:COUN 1
SAMP:COUN 500
SENS:FREQ:GATE:TIME 10e-3
CALC:STAT ON
CALC:AVER:STAT ON
mean
min value
CALCulate[1]:AVERage:STATe ON
53210A Math, Graphing, and Data Logging
// frequency measurement on ch 1
// trigger count is 1
// 500 readings per trigger
// 10 ms gate time
// enable CALCulate1 subsystem
// enable statistics
// initiated the measurements
// wait for all rdgs to complete
// compute statistics
std. dev
+2.59738014535884E+006
max value
+9.94903904473447E+006
.
6
159