Planar R54 Programming Manual page 225

Vector reflectometer; programming com/dcom
Table of Contents

Advertisement

Example 4. Measurement Data Acquisition
The following program shows data array acquisition with further writing into a file. The
program also shows the method of a sweep triggering and waiting for the sweep
completion.
Three variables F, M, P are declared in the second string of the code. They are used for
arrays of frequency values (Hz), magnitude values (dB), and phase values (degree)
respectively.
After the instrument has been reset to the factory settings, two operators are used for the
sweep triggering and waiting for the sweep completion:
app.SCPI.TRIGger.SEQuence.Source = "BUS"
app.SCPI.TRIGger.SEQuence.Single
The first operator sets the LAN bus command or the COM/DCOM interface command
as a trigger source. It aborts the sweep and switches the instrument to waiting for a
trigger. The second operator is used for a new sweep triggering and waiting for the
sweep completion.
Note
On completion of the sweep, three arrays are read out: frequency values, magnitude
values and phase values. Before the magnitude and phase arrays are read out, the
corresponding trace format is set.
The array size of frequency F is equal to the number of measurement points, and the
array size of magnitude M and phase P is equal to the double number of measurement
points (see section 11 "Measurement Data Arrays"). In rectangular formats (for
magnitude and phase) the measurement data are real numbers located in even cells of
the array. Odd cells of the array contain 0.
On completion of the program, the frequency, magnitude and phase values for each
measurement point are written string by string into the file named TESTFILE.
Unlike
the
SCPI.TRIGger.SEQuence.IMMediate
SCPI.IEEE4882.TRG
immediately
after
SCPI.TRIGger.SEQuence.Single command is not completed
until
the
end
SCPI.TRIGger.SEQuence.Single command is the simplest way
to set the waiting for the sweep completion.
commands,
which
a
trigger
of
the
sweep.
and
are
completed
generation,
the
Using
the
225

Advertisement

Table of Contents
loading

Table of Contents