8003 Precision Scalar Analyzer
3-6 Manual 20791, Rev. C, June 2001
Typical HP-Basic Program for Stepped CW Measurements
100 ! ********************************************************
110 ! 8003 CW Measurement Demonstration Program
120 ! HP300 Series Version
130 ! Copyright 2001, Giga-tronics Power Measurements Division
140 ! *********************************************************
150 !
160 OPTION BASE 0! arrays in this example start with index of 0
170 DIM Buffer(19)! allocate storage for CW data
180 !
190 Status=SPOLL(704)! use serial poll to clear any existing srq s
200 CLEAR 704! Device Clear does a PRESET on the 8003
210 !
220 ! Set up analyzer channel configuration first
230 !
240 OUTPUT 704;POWER 1,A;avg 4;on! channel 1 is in CW mode, sensor A
250 ! and has an averaging number of 4
260 OUTPUT 704;CHAN 2;off;CHAN 3;off;CHAN 4;off
270 ! turn off channels 2, 3, and 4
280 !
290 ! Now, set up the sweeper parameters
300 !
310 OUTPUT 704;FIXED;freq 2000;level -15
320 ! Set CW frequency of 2 GHz and output level of -15 dBm
330 OUTPUT 704;FIXED;level on! turn on RF output
340 WAIT 8! put in appropriate wait time for sweeper to set up
350 !
360 ! This next line sets up the display format but is not strictly
370 ! necessary for data collection over the bus
380 !
390 OUTPUT 704;READOUT! make sure that the analyzer is in readout
400 ! (large number display) mode
410 !
420 ! Zero sensor A before taking a reading
430 !
440 ENABLE INTR 7;2! enable interrupts from instrument srq s
450 ON INTR 7 GOTO Done zeroa! exit from current routine when zeroing
done
460 OUTPUT 704;ZERO A;srq! zero sensor A, pull srq when done
470 Loop1: GOTO Loop1! Wait until srq (or do other tasks)
480 Done zeroa: Status=SPOLL(704)! Clear srq with serial poll
490 !
500 ! Take a series of readings in CW mode
510 !
520 FOR Reading no=0 TO 19! take 20 readings
530 OUTPUT 704;FIXED;freq ;2000+Reading no/19*(8000-2000)
540 ! set sweeper cw frequency to evenly space readings from 2 to 8 GHz
550 WAIT 1! put in time to make sure sweeper and analyzer are settled
560 OUTPUT 704;POWER 1,avg off! restart averaging by first turning off
570 OUTPUT 704;POWER 1;avg on! then turn averaging on
580 OUTPUT 704;OUTPUT 1! ask for reading
590 ENTER 704;Buffer(Reading no)! put the reading in the data buffer
600 NEXT Reading no
610 PRINT Buffer(*)
620 !
630 END