Programming Examples
96
Agilent
8169A
Polarization Controller, Second Edition
510
520
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730
740
750
760
770
780
790
800
810
820
830
840
850
860
870
890
900
910
920
930
940
950
960
970
980
990
Inc=-Inc/2
ELSE
Inc=-Inc
Maxward=True
END IF
ELSE
Maxpow=Newpow
Maxward=True
END IF
UNTIL ABS(Inc)<.05
!
! Time to insert the DUT
!
PRINT TABXY(10,9);"Hit ENTER when you have inserted the DUT!"
INPUT Dummy
!
! Set up the instruments for slow scanning of the sphere, and at fast
! measurement time to sample the power
!
OUTPUT Pol;"psphere:rate 0"
OUTPUT Mm;"sens2:pow:atime 20ms"
OUTPUT Mm;"sens2:pow:unit dbm"
! Set values that have to change for maximum and minimum
Minpow=100
Maxpow=-100
!
! Start the scanning
!
OUTPUT Pol;"init"
!
! Sample enough values to be sure of catching the maximum and minimum
!
FOR Reading=1 TO 500
OUTPUT Mm;"read2:pow?"
ENTER Mm;Power
IF Power<Minpow THEN Minpow=Power
IF Power>Maxpow THEN Maxpow=Power
NEXT Reading
!
! Calculate (and display) the difference
!
PRINT TABXY(10,12);"Polarization Dependence",Maxpow-Minpow;"dB"
!
! Tidy up and leave
!
OUTPUT Pol;"abort"
OUTPUT Mm;"sour:pow:state off"
END