User`s manual

290 END
300 !
310 SUB Ramp_wave
320 Ramp_wave: !Subprogram which defines a ramp waveform and output
330 !sequence.
340 COM @Afg,@Afg1
350 INTEGER Waveform(1:200) !Calculate waveform points as dac codes
360 FOR I=-100 TO 99
370 Waveform(I+101)=(I*.050505)/.00125
380 NEXT I
390 !
400 OUTPUT @Afg;"SOUR:ARB:DAC:SOUR INT" !dac data source
410 OUTPUT @Afg;"SOUR:ARB:DAC:FORM SIGN" !dac data format (signed)
420 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL RAMP" !segment name
430 OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 200" !segment size
440 OUTPUT @Afg USING "#,K";"SOUR:LIST1:SEGM:VOLT:DAC #3400"
450 OUTPUT @Afg1;Waveform(*) !400 bytes: 3 digits (2 bytes/ampl point)
460 OUTPUT @Afg !CR LF
470 !
480 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL RAMP_OUT" !sequence name
490 OUTPUT @Afg;" SOUR:LIST1:SSEQ:DEF 1" !sequence size
500 OUTPUT @Afg;" SOUR:LIST1:SSEQ:SEQ RAMP" !segment order
510 SUBEND
520 !
530 SUB Rst
540 Rst: !Subprogram which resets the E1445.
550 COM @Afg,Afg1
560 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
570 ENTER @Afg;Complete
580 SUBEND
590 !
600 SUB Wf_del
610 Wf_del: !Subprogram which deletes all sequences and segments.
620 COM @Afg,Afg1
630 OUTPUT @Afg;"FUNC:USER NONE" !select no sequences
640 OUTPUT @Afg;"LIST:SSEQ:DEL:ALL" !Clear sequence memory
650 OUTPUT @Afg;"LIST:SEGM:DEL:ALL" !Clear segment memory
660 SUBEND
670 !
680 SUB Errmsg
690 Errmsg: !Subprogram which displays E1445 programming errors
700 COM @Afg,Afg1
710 DIM Message$[256]
720 !Read AFG status byte register and clear service request bit
730 B=SPOLL(@Afg)
740 !End of statement if error occurs among coupled commands
750 OUTPUT @Afg;""
760 OUTPUT @Afg;"ABORT" !abort output waveform
770 REPEAT
780 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
Continued on Next Page
Chapter 7 High Speed Operation 233