Chapter 8
SCPI
SCPI and RAPID!
338
4460 GSM System Option and 4468 EDGE System Option
Version 12.20
Event handling – registers
Basically, measurements can be started and results can be read out using the
MEASure
and
FETCh
subsystems of the 4400.
However, system events (like errors) could occur while those measurements are
in progress and the measurement results read in could thus be invalid.
Therefore, the 4400 is equipped with an event handling system. This system may
be programmed by the user to raise an event on certain conditions.
Using the programming features, the SCPI system of the 4400 will for instance
generate an event in case an error occurs during the performance of the current
command.
Before the result string of a measurement is read out, it is a good idea to check
the internal event registers of the 4400 first. Most frequently, this check is a look
at the test set’s service register. Bit 2 of this register will be set as soon as there
is an error message in the error queue.
The programming of the event handling system is described in detail in subsec-
tion
“Understanding the STATus subsystem” on page 345
.
The use of the service register is outlined in subsection
The scheme to use the registers for communication between a RAPID! program
or the GPIB on one side and the 4400 on the other side always follows the
following principles:
“Programming examples” on page 338
shows some practical examples
for the basic use of the register communication between SCPI and RAPID!.
Programming examples
In this subsection, you will find some application-oriented examples for RAPID!
programs using SCPI on the 4400. These examples concentrate on the following
topics:
– “Standard TX measurements” on page 339
– “Message exchange” on page 340
– “Example of a GPIB protocol” on page 341
NOTE
To avoid confusion between the registers of the STATus subsystem and the
much more general SCPI statusbyte, the latter is called the service register
throughout this manual.
Step
RAPID!
GPIB
Preparing service
register
:PROGram:SRE
<i1>
*SRE <i1>
Set up a loop that
waits for an event
DO...”read ser-
vice regis-
ter”...LOOP
“SRQ”
Read service register
:PROGram:STB?
serial poll or
*STB?