7-58 Chapter7
Programming Examples
Measurement Data Transfer Examples
Running the Program
Run the program. The analyzer is preset and a sweep is taken. Marker 1 is enabled and
positioned on the largest value in the trace. The marker is output to the controller and
printed on the controller display. The analyzer is returned to local control. Position the
marker using the front panel knob or data-entry keys, and compare the displayed value on
the analyzer with the value that was transmitted to the controller.
The three values returned to the controller are:
1. reflection, in dB
2. a non-significant value
3. the stimulus frequency at the maximum point
A non-significant value means that the analyzer returned a value that is meaningless in
this data format.
Table 4-1 on page 4-5 provides an easy reference for the types of data returned with the
various data-format operational modes.
BASIC Program Listing
10 ! This program takes a sweep on the analyzer and turns on a marker.
20 ! The marker is positioned on the trace maximum and the marker data
30 ! is output in ASCII format.
40 !
50 ! EXAMP3A
60 !
70 ASSIGN @Nwa TO 716 ! Assign an I/O path for the analyzer
80 !
90 CLEAR SCREEN
100 ! Initialize the analyzer
110 ABORT 7 ! Generate an IFC (Interface Clear)
120 CLEAR @Nwa ! SDC (Selective Device Clear)
130 OUTPUT @Nwa;"OPC?;PRES;" ! Preset the analyzer and wait
140 ENTER @Nwa;Reply ! Read in the 1 returned
150 !
160 OUTPUT @Nwa;"OPC?;SING" ! Single sweep mode and wait
170 ENTER @Nwa;Reply ! Read 1 when sweep complete
180 !
190 OUTPUT @Nwa;"MARK1;" ! Turn on marker 1
200 OUTPUT @Nwa;"SEAMAX;" ! Find the maximum
210 !
220 OUTPUT @Nwa;"OUTPMARK;" ! Request the current marker value
230 ENTER @Nwa;Value1,Value2,Stim ! Read three marker values
240 !
250 ! Show the marker data received.
260 PRINT " Value 1"," Value 2"," Stimulus (Hz)"
270 PRINT Value1,Value2,Stim ! Print the received values
280 PRINT
290 PRINT " Compare the active marker block with the received values"
300 !
310 LOCAL @Nwa ! Release HP-IB control
320 END