110  ASSIGN @E5100 TO 800             ! IBASIC INITIALIZATION
120  CLEAR @E5100                     !
130  OUTPUT @E5100;"DISAHIHB"         !
140  !
150  DIM Table(1:31,1:3)              ! VARIABLE  DECLARATION
160  !
170  INPUT "Number of segments?",Numb ! ENTER AND DISPLAY NUMBER OF SEGMENTS
180  !
190  PRINT USING "10A,11A,11A,20A";"Segment","Start(MHz)","Stop(MHz)","Number of points"              !
200  !
210  FOR I=1 TO Numb                  ! GOTO TABLE SETUP ROUTINE
220    GOSUB Loadpoin                 !
230  NEXT I                           !
240  !
250  LOOP                             ! ASK IF  EDIT NEEDED
260    INPUT "Do you want to edit? (Y/N)",An$
270  EXIT IF An$="N" OR An$="n"       !
280    INPUT "Segment Number?",I      !
290    GOSUB Loadpoin                 !
300  END LOOP                         !
310  !
320  OUTPUT @E5100;"PRES"             ! MEASUREMENT SETUP
330  OUTPUT @E5100;"CHAN1;ANAMODE GAINP;MEAS AR;FMT LOGM" !
340  !
350  OUTPUT @E5100;"EDITLIST"         ! TABLE SETUP
360  OUTPUT @E5100;"CLEL"             !
370  FOR I=1 TO Numb                  !
380    OUTPUT @E5100;"SADD"           !
390    OUTPUT @E5100;"STAR ";Table(I,1)*1.E+6                     !
400    OUTPUT @E5100;"STOP ";Table(I,2)*1.E+6                     !
410    OUTPUT @E5100;"POIN ";Table(I,3)                           !
420    OUTPUT @E5100;"SDON"           !
430  NEXT I                           !
440  OUTPUT @E5100;"EDITDONE"         !
450  OUTPUT @E5100;"SWPT LIST"          !
460  OUTPUT @E5100;"LISDOBASE"        !
470  !
480  OUTPUT @E5100;"SING?"            ! MAKE A MEASUREMENT
490  ENTER @E5100;Tmp
500  OUTPUT @E5100;"AUTO"             ! AUTO SCALING
510  STOP                             ! STOP PROGRAM
520  !
530 Loadpoin:                         ! TABLE PARAMETER SETUP SUBROUTINE
540    INPUT "Enter start frequency (MHz)",Table(I,1)
550    INPUT "Enter stop frequency (MHz)",Table(I,2)
560    INPUT "Enter number of points",Table(I,3)
570    IF Table(I,3)=1 THEN Table(I,2)=Table(I,1)
580    PRINT TABXY(0,I+1);RPT$(" ",58)
590    PRINT TABXY(0,I+1);I;TAB(11);Table(I,1);TAB(22);Table(I,2);TAB(35);Table(I,3)
600    RETURN                         !
610    !
620    END                            ! END OF PROGRAM
5000   !*************************************************
5010   !* DESCRIPTION:  Agilent E5100A/B Sample Program
5020   !*
5030   !* AUTHOR:       Agilent Technologies Japan, Ltd.
5040   !* CREATED:      05/01/2008
5050   !* PROGRAM NAME: LIST_SWP
5060   !* REVISION:     A.02.01
5070   !*
5080   !*     Copyright (c) Agilent Technologies,
5090   !*              All rights reserved.
5100   !*
5110   !*
5120   !*  Customer shall have the personal, non-
5130   !* transferable rights to use, copy or modify
5140   !* this SAMPLE PROGRAM for Customer's internal
5150   !* operations. Customer shall use the SAMPLE
5160   !* PROGRAM solely and exclusively for its own
5170   !* purpose and shall not license, lease, market
5180   !* or distribute the SAMPLE PROGRAM or
5190   !* modification or any part thereof.
5200   !*
5210   !*  Agilent Technologies shall not be liable for
5220   !* the quality, performance or behavior of the
5230   !* SAMPLE PROGRAM. Agilent Technologies especially
5240   !* disclaims that the operation of the SAMPLE
5250   !* PROGRAM shall be uninterrupted or error free.
5260   !* This SAMPLE PROGRAM is provided AS IS.
5270   !*
5280   !*  AGILENT TECHNOLOGIES DISCLAIMS THE IMPLIED
5290   !* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5300   !* A PARTICULAR PURPOSE.
5310   !*
5320   !*  Agilent Technologies shall not be liable for
5330   !* any infringement of any patent, trademark,
5340   !* copyright or other proprietary rights by the
5350   !* SAMPLE PROGRAM or its use. Agilent Technologies
5360   !* does not warrant that the SAMPLE PROGRAM is
5370   !* free from infringements or such rights of third
5380   !* parties. However, Agilent Technologies will not
5390   !* knowingly infringe or deliver a software that
5400   !* infringes the patent, trademark, copyright or
5410   !* other proprietary right of a third party.
5420   !*
5430   !*************************************************