Home Previous Next


Retrieving Measurement Results

General command
structure
The results of a measurement can be retrieved by means of the FETCh, SAMPle or READ query. All three commands have the same structure:
FETCh<type>:<meas_obj>[:RESult]<spec>?
SAMPle<type>:<meas_obj>[:RESult]<spec>?

READ<type>:<meas_obj>[:RESult]<spec>?

The literals written in angle brackets have the following meaning:

   
<type> Measurement trace (:ARRay), scalar values ([:SCALar]) can be retrieved in the network tests; see the relevant operating manuals.

To limit the number of commands and simplify the program syntax, all scalar results determined in a measurement are generally read out with a single command. They are returned as a list of values separated by commas.

The length of the arrays depends on the measurement group and possibly on the configuration settings; see also Subarrays paragraph below.

   
<meas_obj> Measurement group (measurement object): POWer | SPECtrum are used in RF Non Signalling mode.
   
<spec> [:CURRent] current evaluation period, other statistical traces can be retrieved in the network tests.
   
Subarrays Arrays generally consist of a large number of values representing the measurement trace over the whole time or frequency range. With the SUBarrays commands, the CMU provides a flexible tool for handling large amounts of data. These commands restrict a measurement to up to 32 subranges where either all measurement results or a single statistical value can be read out.
   
Subarray
configuration
The subarrays are configured with the following commands:
CONFigure:SUBarrays:<meas_obj> <Mode>, <Start>, <Samples>
    {,<Start>, <Samples>}
   
<meas_obj> Measurement group (measurement object). For examples refer to the manuals for the network tests.
   
<Mode> Statistics mode for all subranges. The following parameters can be set:
ALL

Return all measurement values (the number of values in every subrange is given by the <Samples> parameter).

ARIThmetical

Return the arithmetical mean value of the results in every subrange.

MINimum

Return the minimum of the results in every subrange.

MAXimum

Return the maximum of the results in every subrange.

IVAL

Return a single measurement value corresponding to the abscissa value <Start>. If <Start> is located between two test points with valid results then the result is calculated from the results at these two adjacent test points by linear interpolation. Ignore the <Samples> parameter.

   
<Start> Start of current range (time or frequency or channel number).
   
<Samples> Number of samples in current range.
   
  The subranges may overlap but must be within the total range of the <meas_obj>. Test points outside this range are not measured (result NAN) and do not enter into the ARIThmetical, MINimum and MAXimum values.

By default, only one range corresponding to the total measurement range is used and all measurement values are returned.

   
Subarray results Subarray results are retrieved by means of FETCh, SAMPle or READ queries, with :SUBarrays inserted as a second-level keyword:
FETCh:SUBarrays<type>:<meas_obj>[:RESult]<spec>?
SAMPle:SUBarrays<type>:<meas_obj>[:RESult]<spec>?
READ:SUBarrays<type>:<meas_obj>[:RESult]<spec>?

In the default subarray configuration, these commands are identical with the FETCh, SAMPle or READ queries described above (i.e. all measurement results are read out).

   
FETCh command FETCh<type>:<meas_obj>[:RESult]<spec>?

Retrieves the latest valid measurement results.

If the FETCh query is used immediately after an INITialize... command, the first evaluation period is terminated before the query is executed so that a valid result can be acquired. If called up repeatedly after termination of the first evaluation period, the FETCh query may return the same results several times until they have been updated after the next period.

A FETCh returns the results without interaction with the measurement (unsynchronized query). In some cases this may cause inconsistent results to be read so that the SAMPle command should be used while the measurement is in the RUN state.

   
Measurement states According to the definition given above the effect of the FETCh query depends on the measurement status and the history of the measurement:
Status Valid Results? Effect of FETCh...?
¹ OFF Yes Returns the current results.
OFF No Generates an SCPI error -230, Data corrupt or stale. This is why FETCh should not be used while the measurement is in the OFF state.
RUN No Waits until valid results are available and returns these results.
STOP No Generates an SCPI error -230, Data corrupt or stale.

This scenario occurs, e.g. if the measurement is stopped explicitly before the first evaluation period has been terminated.

 
SAMPle command SAMPle<type>:<meas_obj>[:RESult]<spec>?

Retrieves the results of the current evaluation period. In single shot measurements, SAMPle is equivalent to READ.

In a continuous measurement, or in counting mode (see repetition mode in Measurement Statistics), SAMPle is executed only after termination of the current evaluation period. This implies that a single measurement result can be returned only once by a SAMPle query; if called up repeatedly, SAMPle will return the result of subsequent evaluation periods.

Due to this behavior, the SAMPle query is suitable for monitoring the progress of continuous measurements in time. Multiple identical results, which might be returned by repeated FETCh commands, are avoided.

A SAMPle query returns the results after interacting with the measurement (synchronized query). This means that only valid results are returned, inconsistencies are avoided.

   
Measurement states According to the definition given above the effect of the SAMPle query depends on the measurement status and the history of the measurement:
 
Status Valid Results? Effect of SAMPle...?
STOP | RDY | STEP Yes Returns the current results. In this case, the SAMPle command is equivalent to the FETCh command.
OFF No Generates an SCPI error -230, Data corrupt or stale. This is why SAMPle should not be used while the measurement is in the OFF state.
RUN Yes | No Waits until the end of the current evaluation period, returns the results, and resumes the measurement (unless the current evaluation period is the last to be measured).
STOP No Generates an SCPI error -230, Data corrupt or stale.

This scenario occurs, e.g. if the measurement is stopped explicitly before the first evaluation period has been terminated.

 
READ command READ<type>:<meas_obj>[:RESult]<spec>?

Starts a new measurement, terminates the measurement and returns the results after one single shot. The READ...? query is equivalent to:

ABORt...;

INITiate...;

FETCh...?

The READ command preserves all configurations (such as event reporting, stop condition, statistics count...). READ initiates a measurement which is terminated after one single shot ( measurement state STOP, status RDY; if an error occurred, the status is ERR). However, it does not affect the repetition mode setting itself.

In case of no error (status RDY), the measurement can be continued by means of the CONTinue command. It will be performed with the repetition mode set before READ was executed.


Home Previous Next