User`s manual
Chapter 1 33
Using HP-IB
Getting Started
6. Send the MEASure query command to initiate a reading. This
will place the measured value into the Test Set’s Output
Queue.
NOTE
When making AF Analyzer SINAD, Distortion, Signal to Noise Ratio,
AF Frequency, DC Level, or Current measurements, the measurement
type must first be selected using the SELect command.
For example, MEAS:AFR:SEL'SINAD' followed by MEAS:AFR:SINAD?
7. Use the ENTER statement to transfer the measured value to a
variable within the context of the program.
The following example program illustrates how to make settings
and then take a reading from the Test Set. This setup takes a
reading from the spectrum analyzer marker after tuning it to the
RF generator’s output frequency.
Example 1-1 Example
10 Addr=714
20 OUTPUT Addr;"*RST" !Preset to known state
30 OUTPUT Addr;"TRIG:MODE:RETR SING" !Sets single trigger
40 OUTPUT Addr;"DISP RFG" !Selects the RF Gen screen
50 OUTPUT Addr;"AFG1:FM:STAT OFF" !Turns FM OFF
60 OUTPUT Addr;"RFG:AMPL -66 DBM" !Sets RF Gen ampl to -66 dBm
70 OUTPUT Addr;"RFG:FREQ 500 MHZ" !Sets RF Gen freq to 500 MHz
80 OUTPUT Addr;"RFG:AMPL:STAT ON" !Turns RF Gen output ON
90 OUTPUT Addr;"DISP SAN"!Selects Spectrum Analyzer’s screen
100 OUTPUT Addr;"SAN:CRF 500 MHZ" !Center Frequency 500 MHz
110 ! -------------------MEASUREMENT SEQUENCE-------------------
120 OUTPUT Addr;"TRIG" !Triggers reading
130 OUTPUT Addr;"MEAS:SAN:MARK:LEV?" !Query of Spectrum
140 !Analyzer’s marker level
150 ENTER Addr;Lvl !Places measured value in variable Lvl
160 DISP Lvl!Displays value of Lvl
170 END
The RF Generator’s output port and the Spectrum Analyzer’s
input port are preset to the RF IN/OUT port. This allows the
Spectrum Analyzer to measure the RF Generator with no
external connections. The Spectrum Analyzer marker is always
tuned to the center frequency of the Spectrum Analyzer after
preset. With the RF Generator’s output port and Spectrum
Analyzer input port both directed to the RF IN/OUT port, the two
will internally couple with 46 dB of gain, giving a measured value
of approximately
−
20 dBm. While not a normal mode of operation
this setup is convenient for demonstration since no external
cables are required. This also illustrates the value of starting
from the preset state since fewer programming commands are
required.