User`s guide

53220A/53230A User’s Guide 243
Formats and Data Flow 7
FETCh? - is used following INITiate:IMMediate. After all measurements
specified by TRIGger:COUNt and SAMPle:COUNt are complete, FETCh?
transfers the readings from reading memory to the output buffer. Since read-
ing memory is not erased by this action, readings can be “fetched” from mem-
ory multiple times. If there are no readings available or measurements in
progress when a “fetch” is performed, err -230, “Data corrupt or stale” is gen-
erated.
If the data format is REAL (FORMat subsystem), each block of readings
fetched by FETCh? is preceded by an IEEE 488.2 Indefinite-Length Block
header (Table 7-1). When sending multiple commands in a single command
string, FETCh? should always be the last command in the string.
FETCh? Example
// frequency meas of 500 kHz signal with uHz resolution
CONF:FREQ 500E3, 1E-6, (@1) // configure counter
TRIG:COUN 1 // set trigger count
SAMP:COUN 10 // take 10 readings
INIT:IMM // initiate counter to start rdgs
FETC? // fetch rdgs from memory when complete
R? [<max_count>] - is used following INITiate:IMMediate. Trans-
fers all, or up to the specified max_count number of readings to the output
buffer and erases those readings (beginning with the oldest) in reading mem-
ory.
Unlike FETCh?, R? can be used to transfer readings before the total reading
count is reached (TRIGger:COUNt x SAMPle:COUNt) to prevent a memory
overflow. If there are no readings available or measurements in progress when
R?” is sent, err -230, “Data corrupt or stale” is generated.
Readings are transferred in Definite-Length Block format (Table 7-1), whether
in ASCII or REAL (binary) format (FORMat subsystem). The ‘oldest’ reading is
transferred first (first in - first out).
R? Example