Chapter 8
SCPI
SCPI and RAPID!
4460 GSM System Option and 4468 EDGE System Option
Version 12.20
337
LET scpi = FREEFILE
OPEN “scpi” as #scpi
PRINT #scpi, “*IDN?”
INPUT #scpi, version$
CLOSE #scpi
SCPI common command
*IDN?
is used to read out the identification of the test
set. The value returned is then stored in RAPID! string variable
version$
. The
content of
version$
will be something like
”Willtek,4400,0511099”
.
Using queries
Many commands have a query form. These queries enable you to read out data
from the SCPI system like measurement results or the current value of parame-
ters (like the current transmission frequency of the RF generator).
Building queries
For a query, simply add a question mark to the command (without any spaces or
other symbols in-between).
Example 1
The example below initiates the measurement of the burst length and returns the
related value.
...
OUTPUT #scpi, “:MEASure:RFTX:LENGth?”
INPUT #scpi, burstlength$
Example 2
More than one query can be placed into a single command line. The individual
queries must be separated by semicolons (;). The returned values will also be
separated by semicolons.
The example below reads out the current system time and then queries the
contents of the event status register.
...
OUTPUT #scpi, “:SYSTem:TIME?; :*ESR?”
INPUT #scpi, result$
The returned result string could be
“17,40,55;4”
, for example. This would
denote a time of
5:40
PM and an event status register value of
4
.
Example 3
In case, a query needs a parameter to be specified, this parameter is then placed
behind the question mark. As with normal commands, there must be at least one
blank between the question mark and the parameter:
...
OUTPUT #scpi, “:MEASure:GSM:ARRay:RFRX:BER:CIA? 2
”
...
This command will perform the BER measurement on the class Ia bits twice and
return both measurement results in a string. The string returned in this example
is
“2.1,2.2”
.