EasyManua.ls Logo

Giga-tronics 8003 - Page 146

Giga-tronics 8003
258 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8003 Precision Scalar Analyzer
3-4 Manual 20791, Rev. C, June 2001
Typical TBASIC Program for Stepped CW Measurements
100 ! ************************************************************
110 ! 8003 CW Measurement Demonstration program
120 ! TBasic version
130 ! Copyright 2001, Giga-tronics Power Measurements Division
140 ! ************************************************************
150 !
160 OPTION BASE 0! arrays start with index of 0
170 DIM Buffer[19]! allocate storage for CW data
180 !
190 POLL Status,Primary;4! Use serial poll to clear any existing srq s
200 WRITE GPIB CMD(Dcl)! Device Clear does a PRESET on the 8003
210 !
220 ! Set up Analyzer channel configuration first
230 !
240 PRINT @4:POWER 1,A;avg 4;on! channel 1 is in swept mode,
250 ! Sensor A, 4 averages
260 PRINT @4:CHAN 2;off;CHAN 3;off;CHAN 4;off
270 !
280 ! Now, set up the sweep parameters
290 !
300 PRINT @4:FIXED;freq 2000;level -15
310 ! Set CW frequency of 2 GHz, level at -15 dBm
320 PRINT @4:FIXED;level on! turn on RF output
330 SLEEP 8 ! put in appropriate wait time for sweeper to set up
340 !
350 ! This next line sets up display format but is not strictly
360 ! necessary for data collection over the bus
370 !
380 PRINT @4:READOUT! power meter display mode
390 !
400 ! Zero sensor A before taking a reading
410 !
420 ON SRQ GOTO Done zeroa ! exit when zeroing done
430 PRINT @4:ZERO A;srq! Zero sensor A, pull srq when done
440 Loop1: GOTO Loop1! Wait until srq (or do other tasks)
450 Done zeroa: POLL Status,Primary;4! Clear srq with serial poll
460 OFF SRQ ! disable further srq s
470 !
480 ! Take a reading
490 !
500 FOR Reading no = 0 TO 19! take 20 readings
510 PRINT @4:FIXED;freq ;2000+Reading no/19*(8000-2000)
520 !step sweeper in 20 even steps from 2 to 8 GHz
530 SLEEP 1 ! make sure sweeper is settled
540 PRINT @4:POWER 1,avg off! turn averaging off to restart
550 PRINT @4:POWER 1,avg on! then turn averaging on
560 PRINT @4:OUTPUT 1! ask for reading
570 INPUT @4:Buffer[Reading no]! put reading in data buffer
580 NEXT Reading no
590 PRINT Buffer;
600 !
610 END

Table of Contents

Related product manuals