1   !*************************************************
2   !* DESCRIPTION:	Agilent E5100A/B Sample Program
3   !*
4   !* AUTHOR:		Agilent Technologies Japan, Ltd.
5   !* CREATED:		05/29/2001
6   !* PROGRAM NAME:	FRCI_EQV
7   !* REVISION:		A.02.00
8   !*
9   !*     Copyright (c) Agilent Technologies,
10 !*              All rights reserved.
11 !*
12 !*
13 !*  Customer shall have the personal, non-
14 !* transferable rights to use, copy or modify
15 !* this SAMPLE PROGRAM for Customer's internal
16 !* operations. Customer shall use the SAMPLE
17 !* PROGRAM solely and exclusively for its own
18 !* purpose and shall not license, lease, market
19 !* or distribute the SAMPLE PROGRAM or
20 !* modification or any part thereof.
21 !*
22 !*  Agilent Technologies shall not be liable for
23 !* the quality, performance or behavior of the
24 !* SAMPLE PROGRAM. Agilent Technologies especially
25 !* disclaims that the operation of the SAMPLE
26 !* PROGRAM shall be uninterrupted or error free.
27 !* This SAMPLE PROGRAM is provided AS IS.
28 !*
29 !*  AGILENT TECHNOLOGIES DISCLAIMS THE IMPLIED
30 !* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 !* A PARTICULAR PURPOSE.
32 !*
33 !*  Agilent Technologies shall not be liable for
34 !* any infringement of any patent, trademark,
35 !* copyright or other proprietary rights by the
36 !* SAMPLE PROGRAM or its use. Agilent Technologies
37 !* does not warrant that the SAMPLE PROGRAM is
38 !* free from infringements or such rights of third
39 !* parties. However, Agilent Technologies will not
40 !* knowingly infringe or deliver a software that
41 !* infringes the patent, trademark, copyright or
42 !* other proprietary right of a third party.
43 !*
44 !*************************************************
45 !
110   DIM Startf(1:2),Stopf(1:2),Ifbw(1:2),Nop(1:2),Power(1:2)
120  !
130  ASSIGN @E5100 TO 800
140  CLEAR @E5100
150  !
160  OUTPUT @E5100;"PRES"
170  OUTPUT @E5100;"CHAN1;ANAMODE ZTRAN;MEAS AR;FMT MAGZP;SCAY 1"
180  OUTPUT @E5100;"POWU WATT;PICIRC ON"
190  OUTPUT @E5100;"HOLD"
200  OUTPUT @E5100;"DUAC OFF"
210  OUTPUT @E5100;"COUC OFF"
220  OUTPUT @E5100;"DISG OFF"
230  OUTPUT @E5100;"DISAHIHB"
240  !
250  INPUT "Center frequency ? (MHz)",Center
260  Center=Center*1.E+6
270  INPUT "Span frequency ? (kHz)",Span
280  Span=Span*1000.
290  !
300  GOSUB List_set
310  !
320  GOSUB Pi_cal
330  !
340  EXECUTE "ANAOCH1"
350  EXECUTE "ANARFULL"
360  EXECUTE "ANAODATA"
370  !
380  DISP "CONNECT DEVICE, and PRESS CONTINUE."
390  PAUSE
400  DISP
410  !
420  !      MEASUREMENT
430  !
440  LOOP
450  !
460      EXECUTE "SING"
470  !
480      EXECUTE "OUTPRESO?"
490      Ci=READIO(8,0)
500      Fr=READIO(8,1)
510  !
520      WRITEIO 8,0;Center*.9
530      EXECUTE "EQUC0?"
540      C0=READIO(8,0)
550  !
560      EXECUTE "EQUCPARS4?"
570      C1=READIO(8,1)
580      L1=READIO(8,2)
590      R1=READIO(8,3)
600  !
610  GOSUB Printing
620  !
630  DISP "CONNECT NEXT DEVICE and Press Continue."
640  PAUSE
650  !
660  END LOOP
670  !
680  STOP
690  !
700  !
710 Pi_cal:  !
720   OUTPUT @E5100;"CALI ONEP"
730   !
740   DISP "Connect SHORT, and press [Continue]"
750   PAUSE
760   OUTPUT @E5100;"CLASS11B?"
770   ENTER @E5100;Tmp
780   !
790   DISP "Leave the ternimal OPEN, and press [Continue]"
800   PAUSE
810   OUTPUT @E5100;"CLASS11A?"
820   ENTER @E5100;Tmp
830   !
840   DISP "Connect LOAD, and press [Continue]"
850   PAUSE
860   OUTPUT @E5100;"CLASS11C?"
870   ENTER @E5100;Tmp
880   !
890   OUTPUT @E5100;"SAV1?"
900   ENTER @E5100;Tmp
910   !
920   RETURN
930   !
940   !
950 Printing:   !
960   !
970   CLEAR SCREEN
980   !
990   PRINT TABXY(1,1);"RESULT"
1000  PRINT USING "25A,3D.8D,6A";"RESONANCE FREQUENCY (Fr) ";Fr/1.E+6;" (MHz)"
1010  PRINT USING "14A,15X,5D.2D,6A";"CI (Zr) VALUE ";Ci;" (ohm)"
1020  PRINT
1030  PRINT USING "10A,5X,5D.3D,5A";"C0 VALUE ";C0*1.E+12;" (pF)"
1040  PRINT USING "10A,5X,5D.5D,5A";"C1 VALUE ";C1*1.E+12;" (pF)"
1050  PRINT USING "10A,5X,5D.3D,5A";"L1 VALUE ";L1*1000;" (mH)"
1060  PRINT USING "10A,5X,5D.3D,6A";"R1 VALUE ";R1;" (ohm)"
1070  !
1080  RETURN
1090  !
1100  !
1110 List_set:!
1120  Startf(1)=Center*.9
1130  Stopf(1)=Center*.9
1140  Nop(1)=1
1150  Ifbw(1)=1000
1160  Startf(2)=Center-Span/2
1170  Stopf(2)=Center+Span/2
1180  Nop(2)=200
1190  Ifbw(2)=1000
1200  !
1210  INPUT "POWER (uW)",W
1220  !
1230  OUTPUT @E5100;";EDITLIST;EDITLIS1;CLEL"
1240  FOR I=1 TO 2
1250    Power(I)=W/1.E+6
1260    OUTPUT @E5100;"SADD"
1270    OUTPUT @E5100;"STAR ";Startf(I)
1280    OUTPUT @E5100;"STOP ";Stopf(I)
1290    OUTPUT @E5100;"POIN ";Nop(I)
1300    OUTPUT @E5100;"IFBW ";Ifbw(I)
1310    OUTPUT @E5100;"POWE ";Power(I)
1320    OUTPUT @E5100;"SDON"
1330  NEXT I
1340  OUTPUT @E5100;"EDITDONE"
1350  OUTPUT @E5100;"SWPT LIST"
1360  OUTPUT @E5100;";LISDOBASE"
1370  RETURN
1380  !
1390  END
