Model 2700 Multimeter/Switch System User’s Manual Buffer 6-15
m. CALCulate2:FORMat <name> Select buffer statistic
CALCulate2:STATe ON | OFF Control (on/off) buffer statistic
CALCulate2:IMMediate Calculate data in buffer
CALCulate2:IMMediate? Calculate and read result
CALCulate2:DATA? Read result of statistic calculation
<name> = MINimum | MAXimum | MEAN | SDEViation | PKPK | NONE
After the selected buffer statistic is enabled, IMMediate or IMMediate? must be sent to
calculate the statistic from the data in the buffer. The CALCulate2:DATA? command does
not initiate a calculate operation. It simply returns the result of the last calculation. If new
data is stored in the buffer, you must again send IMMediate or IMMediate? to recalculate
the statistic from that new data.
NOTE If the standard deviation calculation is being performed on a buffer that has
more than 1000 readings, the “CALCULATING” message will flash to indicate
that the Model 2700 is busy. While busy with the calculation, remote
programming commands will not execute.
NOTE Use *OPC or *OPC? with CALC2:IMM and CALC2:IMM? when performing
the standard deviation calculation on a large buffer. See
Section 12 for details
on *OPC and *OPC?
Programming example
The following command sequence stores 20 readings in the buffer and then calculates the
mean for those readings. Note that after sending a query command, the Model 2700 must
be addressed to talk.
NOTE The following example can be run from the KE2700 Instrument Driver using the
example named “BufStats” in
Table H-1 of Appendix H.
' Store readings:
TRAC:CLE:AUTO ON ' Enable buffer auto-clear.
TRAC:POIN 20 ' Set buffer size to 20.
TRAC:FEED SENS ' Select raw readings for storage.
TRAC:FEED:CONT NEXT ' Start storage process.
TRAC:DATA? ' Request all stored readings.
' Calculate mean:
CALC2:FORM MEAN ' Select mean calculation.
CALC2:STAT ON ' Enable mean calculation.
CALC2:IMM? ' Perform calculation and request result.