
2201R Mobile Tester SCPI Reference Guide
Chapter 2 Remote control of the 2201R Mobile Tester
47090/323
Copyright © 2016 Aeroflex Limited. All rights reserved.
35
How to convert a result string back into numeric variables
The example program below illustrates how the returned string can be converted back into numeric variables in a
program running on an external PC to control the instrument.
PRINT #scpi, “:MEAS:GSM:ARR:RFTX:ALL? 2”
INPUT #scpi, result$
index = 0
result$ = result$ + “,”
DO
‘ Find the position within result$, where the first comma appears
P = INSTR(result$, “,”)
’ Read out the part of result$ in front of the first comma and convert it into
a numeric value
result(index) = VAL(LEFT$(result$, P – 1))
’ Cut off the value just read from result$
result$ = MID$(result$, P +1))
index = index + 1
LOOP UNTIL result$=””
:MEAS[:CONT]:BLOCkdata
The
BLOCkdata
command element of this subsystem is used to read out all the single measurement results
necessary to generate the result graphics.
:MEASure:...:GROup
As mentioned before (see Notes in section
’The MEASure subsystem’ on page 31
), a new measurement always
terminates a preceding one of the same or related type.
Therefore, the
GROup
command element has been implemented in the SCPI command set of the 2201R. This
command element allows to specify a user-definable list of measurements than can then be started with one
command. The measurement results can be read out using the query form of this command – or with the related
command of the FETCh subsystem.
NOTE
In this respect,
:MEAS:RFTX:ALL
can be regarded as a predefined ‘group’,
containing all important RFTX measurements.