User`s manual

200 END
210 !
220 SUB Fsk_ttl
230 Fsk_ttl: !Subprogram which sets up frequency-shift keying and trigger
240 !line TTLTRG 5 as the control source.
250 COM @Afg,@Cmd_mod
260 OUTPUT @Afg;"SOUR:FREQ1:MODE FSK;"; !FSK mode
270 OUTPUT @Afg;" :SOUR:FREQ1:FSK 1E6,2E6;"; !FSK frequencies
280 OUTPUT @Afg;" :SOUR:FREQ:FSK:SOUR TTLT5;"; !FSK source
290 OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !function
300 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5 V" !amplitude
310 OUTPUT @Afg;"INIT:IMM" !wait-for-trigger state
320 SUBEND
330 !
340 SUB Setup_ttl5
350 Setup_ttl5: !Subprogram which sets up trigger line TTLTrg5 to
360 !change the AFG frequency-shift keying frequencies.
370 COM @Afg,@Cmd_mod
380 OUTPUT @Cmd_mod;"OUTP:TTLT5:STAT ON" !enable line TTLTrg5
390 OUTPUT @Cmd_mod;"OUTP:TTLT5:SOUR INT" !drive TTLTrg5 internally
400 !Loop which shifts frequency
410 DISP “Press ’Continue’ to shift frequency”
420 PAUSE
430 DISP “”
440 FOR I=1 TO 10
450 IF BIT(I,0) THEN
460 OUTPUT @Cmd_mod;"OUTP:TTLT5:LEV:IMM 1" !level is electrically low
470 ELSE
480 OUTPUT @Cmd_mod;"OUTP:TTLT5:LEV:IMM 0" !level is electrically high
490 END IF
500 WAIT 1
510 NEXT I
520 SUBEND
530 !
540 SUB Rst
550 Rst: !Subprogram which resets the E1445.
560 COM @Afg
570 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
580 ENTER @Afg;Complete
590 SUBEND
600 !
610 SUB Errmsg
620 Errmsg: !Subprogram which displays E1445 programming errors
630 COM @Afg,@Cmd_mod
640 DIM Message$[256]
650 !Read AFG status byte register and clear service request bit
660 B=SPOLL(@Afg)
670 !End of statement if error occurs among coupled commands
680 OUTPUT @Afg;""
690 OUTPUT @Afg;"ABORT" !abort output waveform
Continued on Next Page
Chapter 4 Sweeping and Frequency-Shift Keying 151