7-60 Chapter7
Programming Examples
Measurement Data Transfer Examples
• The trace-data array is allocated.
• The trace length is set to 11.
• The selected frequency span is swept once.
• The FORM 4, ASCII format is set.
• The formatted trace is read from the analyzer and displayed.
• The frequency increments between the points are calculated.
• The marker is activated and placed at the lowest frequency of the analyzer (50 MHz).
• The instrument is returned to local control and the program ends.
Running the Program
Run the program and watch the controller console. The analyzer will perform an
instrument preset. The program will then print out the data values received from the
analyzer. The marker is activated and placed at the left-hand edge of the analyzer's
display. Position the marker with the knob and compare the values read with the active
marker with the results printed on the controller console. The data points should agree
exactly. Keep in mind that no matter how many digits are displayed, the analyzer is
specified to measure:
• magnitude to a resolution of 0.001 dB
• phase to a resolution of 0.01 degrees
• group delay to a resolution of 0.01 ps
Changing the display format will change the data sent with the OUTPFORM transfer. See
Table 7-10 for a list of the specific data that is provided with each format. The data from
OUTPFORM reflects all the post processing such as:
• time domain
• gating
• electrical delay
• trace math
• smoothing
BASIC Program Listing
10 ! This program shows an ASCII format trace data transfer using form 4.
20 ! The data is received as a string of ASCII characters, 24 characters
30 ! per data point and transferred into a real array in the controller. The
40 ! corresponding frequency data is calculated from the analyzer settings.
50 !
60 ! EXAMP3B
70 !
80 ASSIGN @Nwa TO 716 ! Assign an I/O path to the analyzer
90 !
100 CLEAR SCREEN
110 ! Initialize
120 ABORT 7 ! Generate an IFC (Interface Clear)
130 CLEAR @Nwa ! SDC (Selective Device Clear)
140 OUTPUT @Nwa;"OPC?;PRES;" ! Preset the analyzer
150 ENTER @Nwa;Reply ! Read the 1 when complete
160 !