Last updated: January 16, 2009
This section provides an example of how to use the Spectrum Monitor via the GPIB.
The following procedure assumes that the mobile station's antenna output is connected to the RF IN/OUT connector, and that the mobile station is transmitting a forward channel signal.
10 REAL Amplitudes(400) ! Set up array to hold 401 amplitude results (trace data) 20 OUTPUT 714;"SETUP:SMONITOR:CONTINUOUS OFF"!Configures the Spectrum Monitor to 30 !single trigger mode. 40 OUTPUT 714;"SETUP:SMONITOR:COUNT:NUMBER 20"!Configures a multi-measurement 50 !of 20. 60 OUTPUT 714;"SETUP:SMONITOR:TRIGGER:SOURCE IMMEDIATE"!Configure trigger source 70 !to immediate. 80 OUTPUT 714;"SETUP:SMONITOR:FREQUENCY:SPAN 20 MHz"!Set frequency span 90 OUTPUT 714;"SETUP:SMONITOR:BWIDth:MANUAL 300 KHZ" !Decouples the frequency span 100 ! and the resolution bandwidth, and sets the resolution bandwidth. 110 OUTPUT 714;"INITIATE:SMONITOR"!Start the Spectrum Monitor 120 ! 130 OUTPUT 714;"FETCH:SMONITOR:INTEGRITY?"!Fetch SMON Integrity 140 ENTER 714;Integrity 150 PRINT "Spectrum Monitor Integrity: ";Integrity 160 IF Integrity=0 THEN !Fetch results if SMON 170 OUTPUT 714;"FETCH:SMONITOR:TRACE?"!has valid integrity. 180 ENTER 714;Integrity,Amplitudes(*)!Load valid results into array 190 PRINT "Trace Data Amplitude Results (dB):" 200 PRINT "--------------------------------------------------" 210 PRINT Amplitudes(*) !Prints the 401 stored data points. 220 PRINT "--------------------------------------------------" 230 ELSE 240 PRINT "Bad Integrity value =";Integrity 250 STOP 260 END IF 270 ! Move the marker to the signal peak and query the frequency and level 280 OUTPUT 714;"CALCULATE:SMONITOR:MARKER1:PEAK:MAXIMUM" 290 OUTPUT 714;"CALCULATE:SMONITOR:MARKER1:FREQUENCY?" 300 ENTER 714;Peak_frequency 310 PRINT "Maximum Peak Frequency (MHz): ";Peak_frequency 320 OUTPUT 714;"CALCULATE:SMONITOR:MARKER1:AMPLITUDE?" 330 ENTER 714;Peak_amplitude 340 PRINT "Maximum Peak Amplitude (dBm): ";Peak_amplitude 350 END
The results returned by this program are:
Integrity
returns the Spectrum Monitor
Integrity Indicator
(0 means that the Spectrum Monitor completed with no errors).
Amplitudes()
returns 401 points representing the amplitude results (in dBm) of the trace data.
Peak_frequency
returns the frequency in MHz at marker 1. In this case, marker 1 is positioned at the highest peak value.
Peak_amplitude
returns the amplitude in dBm at marker 1. In this case, marker 1 is positioned at the highest peak value.