User`s manual
450 !
460 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL TRI" !segment name
470 OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 2048" !segment size
480 OUTPUT @Afg;" SOUR:LIST1:SEGM:VOLT";Waveform(*) !waveform points
490 SUBEND
500 !
510 SUB Sine_wave
520 Sine_wave: !Subprogram which computes a sine wave and stores
530 !it in a segment
540 COM @Afg
550 DIM Waveform(1:2048) !Calculate sine wave
560 FOR I=1 TO 2048
570 Waveform(I)=5.*(SIN(2.*PI*(I/2048.)))
580 NEXT I
590 !
600 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL SINEWAVE" !segment name
610 OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 2048" !segment size
620 OUTPUT @Afg;" SOUR:LIST1:SEGM:VOLT";Waveform(*) !waveform points
630 SUBEND
640 !
650 SUB Seq_def
660 Seq_def:!Subprogram which defines the output sequence
670 COM @Afg
680 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL WAVE_OUT" !sequence name
690 OUTPUT @Afg;"SOUR:LIST1:SSEQ:DEF 2" !sequence size
700 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEQ SINEWAVE,TRI" !execution order
710 OUTPUT @Afg;"SOUR:LIST1:SSEQ:DWEL:COUN 2,1" !segment dwell count
720 SUBEND
730 !
740 SUB Rst
750 Rst: !Subprogram which resets the E1445.
760 COM @Afg
770 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
780 ENTER @Afg;Complete
790 SUBEND
800 !
810 SUB Wf_del
820 Wf_del: !Subprogram which deletes all sequences and segments.
830 COM @Afg
840 OUTPUT @Afg;"FUNC:USER NONE" !select no sequences
850 OUTPUT @Afg;"LIST:SSEQ:DEL:ALL" !Clear sequence memory
860 OUTPUT @Afg;"LIST:SEGM:DEL:ALL" !Clear segment memory
870 SUBEND
880 !
890 SUB Errmsg
900 Errmsg: !Subprogram which displays E1445 programming errors
910 COM @Afg
920 DIM Message$[256]
930 !Read AFG status byte register and clear service request bit
940 B=SPOLL(@Afg)
Continued on Next Page
Chapter 3 Generating Arbitrary Waveforms 97