Program Examples
Publication 21555, Rev. E, September 2002 A-33
! Commands in Normal Mode!!
390 !
400 OUTPUT @Pwr_mtr;SENS1:CORR:FREQ 5E7
! Cal Factors always 0.00dB at 50MHz
410 !
420 ! Find out the number of Cal Factors in EEPROM
430 ! Include Std Cal Factors at 1 GHz intervals and any special Cal Factors.
440 !
450 OUTPUT @Pwr_mtr;DIAG:SENS1:EEPROM:CALFR?
460 ENTER @Pwr_mtr;Frs_std_freq,Std_freq_step,No_std_freqs,No_spl_freqs
470 ENTER @Pwr_mtr;Frst_std_freq,Std_freq_step,No_std_freqs
480 No_spl_freqs=1 ! Added to correct bug in DIAG:SENS#:EEPROM:CALFR?
490 PRINT Frst_std_freq,Std_freq_step,No_std_freqs,No_spl_freqs
500 !
510 !
520 ! When you query the 58542 for frequencies and Cal Factors there will be
530 ! No_std_freqs + No_spl_freqs = number of items you need to read
540 !
550 No_cal_pnts=No_std_freqs+No_spl_freqs
560 REDIM Freqs(No_cal_pnts),Clfcs(No_cal_pnt)
! Dimension according to number of Cal Factors to be read in.
570 PRINT There are ;No_cal_pnts; of Cal Factors in this sensor.
580 !
590 OUTPUT @Pwr_mtr;SENS1:CORR:EEPROM:FREQ?
! Asks the 58542 for the Frequency array from sensor 1
600 ENTER @Pwr_mtr;Freqs(*)
610 PRINT Freqs(*)
620 !
630 OUTPUT @Pwr_mtr;SENS1:CORR:EEPROM:CALF?
! Asks the 58542 for the Frequency array from sensor 1
640 ENTER @Pwr_mtr;Clfcs(*)
650 PRINT Clfcs(*)
660 !
670 !##############################################################################
680 ! Now that all the Cal Factors are loaded with their corresponding frequencies,
690 ! we need to create a table of interpolated Cal Factor points based upon the frequencies used
700 ! and number of measurement points in the test program.
710 !
720 ! First get a couple pieces of necessary information
730 !
740 INPUT Input sweep START frequency in GHz.,Strt_freq
750 INPUT Input sweep STOP frequency in GHz.,Stop_freq
760 INPUT Number of points per sweep. 100 to 400 suggested.,Swep_pnts
770 IF Strt_freq>Stop_freq THEN
780 PRINT Make STOP freq. > START freq.
790 WAIT 1
800 GOTO 740
810 ELSE
820 IF Strt_freq<.051 THEN GOTO 740
830 IF Swep_pnts<1 THEN GOTO 740! You can put additional requirements in this section.
840 END IF
850 Strt_freq=1.E+9*Strt_freq
860 Stop_freq=1.E+9*Stop_fr ! Set units to Hz
870 REDIM Corr_clf(Swep_pnts),Rdgs(Swep_pnts),Rdgs_corr(Swep_pnts)
! Re-sized to match number of measuremen
! pointsin sweep
880 !
890 ! Interpolation routine creates Cal Factor Correction Table in Clf_corr(*)
900 ! Values are in dB!!!! NOT W linear units
910 !
920 FOR I=1 TO Swep_pnts ! For each point in Clf_corr(*)
930 Rdgs(I)=1