User`s manual
710 OUTPUT @Afg;"SOUR:FREQ1:MODE SWE;"; !sweep mode
720 OUTPUT @Afg;" :SOUR:FREQ1:STAR 40.96E3;"; !start sample rate
730 OUTPUT @Afg;" :SOUR:FREQ1:STOP 81.92E3;"; !stop sample rate
740 OUTPUT @Afg;":SOUR:SWE:COUN INF;"; !sweep count
750 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function (arbitrary)
760 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 1.1V" !scale arb values
770 !
780 DIM Waveform(1:4096)
790 FOR I=1 TO 4096
800 Waveform(I)=2*RND-1.
810 NEXT I
820 OUTPUT @Afg;"LIST:SEGM:SEL NOISE" !select segment
830 OUTPUT @Afg;" LIST:SEGM:DEF 4096" !reserve memory
840 OUTPUT @Afg;" LIST:SEGM:VOLT ";Waveform(*) !load points
850 !
860 OUTPUT @Afg;"LIST:SSEQ:SEL N1" !select sequence
870 OUTPUT @Afg;" LIST:SSEQ:DEF 1" !number of segments
880 OUTPUT @Afg;" LIST:SSEQ:SEQ NOISE" !segment order in sequence
890 SUBEND
900 !
910 SUB Rst
920 Rst: !Subprogram which resets the E1445.
930 COM @Afg
940 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
950 ENTER @Afg;Complete
960 SUBEND
970 !
980 SUB Wf_del
990 Wf_del: !Subprogram which deletes all sequences and segments.
1000 COM @Afg
1010 OUTPUT @Afg;"FUNC:USER NONE" !select no sequences
1020 OUTPUT @Afg;"LIST:SSEQ:DEL:ALL" !delete all sequences
1020 OUTPUT @Afg;"LIST:SEGM:DEL:ALL" !delete all waveform segments
1040 SUBEND
1050 !
1060 SUB Errmsg
1070 Errmsg:!Subprogram which displays E1445 programming errors
1080 COM @Afg
1090 DIM Message$[256]
1100 !Read AFG status byte register and clear service request bit
1110 B=SPOLL(@Afg)
1120 !End of statement if error occurs among coupled commands
1130 OUTPUT @Afg;""
1140 OUTPUT @Afg;"ABORT" !abort output waveform
1150 REPEAT
1160 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
1170 ENTER @Afg;Code,Message$
1180 PRINT Code,Message$
1190 UNTIL Code=0
1200 STOP
1210 SUBEND
Chapter 4 Sweeping and Frequency-Shift Keying 143