User`s manual
280 SUB Sinx_def
290 Sinx_def: !Define Sin(x)/x waveform and output sequence.
300 COM @Afg
310 DIM Waveform(1:4096)
320 FOR I=-2047 TO 2048
330 IF I=0 THEN I=1.E-38
340 Waveform(I+2048)=((SIN(2*PI*.53125*I/256))/(.53125*I/256)*.159154943092)
350 NEXT I
360 !
370 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL SIN_X" !select segment to be defined
380 OUTPUT @Afg;"SOUR:LIST1:SEGM:DEF 4096" !reserve memory for segment
390 OUTPUT @Afg;"SOUR:LIST1:SEGM:VOLT";Waveform(*) !load waveform points
400 !
410 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL SIN_X_OUT" !select sequence to be defined
420 OUTPUT @Afg;"SOUR:LIST1:SSEQ:DEF 1" !specify # segments in sequence
430 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEQ SIN_X" !set segment order in sequence
440 SUBEND
450 !
460 SUB Rst
470 Rst: !Subprogram which resets the E1445.
480 COM @Afg
490 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
500 ENTER @Afg;Complete
510 SUBEND
520 !
530 SUB Errmsg
540 Errmsg: !Subprogram which displays E1445 programming errors
550 COM @Afg
560 DIM Message$[256]
570 !Read AFG status byte register and clear service request bit
580 B=SPOLL(@Afg)
590 !End of statement if error occurs among coupled commands
600 OUTPUT @Afg;""
610 OUTPUT @Afg;"ABORT" !abort output waveform
620 REPEAT
630 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
640 ENTER @Afg;Code,Message$
650 PRINT Code,Message$
660 UNTIL Code=0
670 STOP
680 SUBEND
Visual BASIC and
Visual C/C++ Program
Versions
The Visual BASIC example program, SIN_X.FRM, is in directory
“VBPROG” and the Visual C example program, SIN_X.C, is in directory
“VCPROG” on the CD that came with your Agilent E1445A.
106 Generating Arbitrary Waveforms Chapter 3