Fetch one result

Query syntax

:FETCh[:SCALar]? [<series name>]

where <series names> in measurement function dependent series

Query response format

The format of the returned data is determined by the format commands :FORMAT:TINF and :FORMAT:DATA. See description below.

Description

The fetch query retrieves one measurement result for the given series name without making new measurements. Fetch does not work unless a measurement has been made by the :INITiate command. Series name argument is optional. If ommited, the command will default to first series for current measurement. If the counter has made an array of measurements, the query fetches the first measuring results first. The second query fetches the second result and so on. When the last measuring result has been fetched, the query returns empty string.

Measuring result can be fetched as long as the result is valid, i.e. until the following occurs:

– *RST is received.

– an :INITiate command is executed

– any reconfiguration is done.

The format of the returned data is determined by the format commands :FORMAT:TINF and :FORMAT:DATA:

 :FORMAT:DATA ASCii:FORMAT:DATA REAL:FORMAT:DATA PACKED
:FORMAT:TINF OFF<Val>,<Val>,<Val>…#18<Val>,
#18<Val>,
#18<Val>…
#280<Val><Val><Val>…
:FORMAT:TINF ON<Val>,<TS>,<Val>,<TS>,<Val>,<TS>#18<Val>,
#18<TS>,
#18<Val>,
#18<TS>,
#18<Val>,
#18<TS>…
#6000160<Val><TS><Val><TS><Val><TS>….

Val = measurement value (double-precision floating-point format according to IEEE-754 in REAL and PACKed)

TS = timestamp value (double-precision floating-point format according to IEEE-754 in REAL, and 64-bit integer representing the number of picoseconds in PACKed)

#18 and #3160 - are binary data headers. First digit after “#” represent the number of subsequent digits. Those digits specify the size of a binary data (in bytes) that follow the header. For example, in REAL format in the header #18 "1" indicates that there is one more digit to read after “#”. “8” indicates that there will be 8 bytes of binary samples. In PACKED format the header #6000160 shows that there are 6 more digits after '#'. 000160 indicates that there will be 160 bytes of binary data.

In some situations, the instrument may not be able to provide valid results because of a measured value exceeds expected range (for example signal has too big amplitude or frequency is too high). In such situations the samples returned by :FETCh[:SCALar] and :FETCh:ARRay will have special ‘infinity’ value. In ASCII format it will be inf string, and for REAL and PACKED formats it will be bit pattern corresponding to infinity according to IEEE 754.