240 | ! |
|
250 | SUB Diffout |
|
260 Diffout: !Subprogram which sets up the E1445A and E1446A | ||
270 | COM @Afg,@Amp |
|
280 | OUTPUT @Afg;"SOUR:FREQ1:FIX 1E3;"; | !frequency |
290 | OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; | !function |
300 | OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL MIN;"; !amplitude (.161869 Vpk) | |
310 | OUTPUT @Afg;":OUTP:LOAD:AUTO ON;"; | !couple load to impedance |
320 | OUTPUT @Afg;":OUTP:IMP 50" | !impedance |
330 | ! |
|
340 | !Set up the Agilent E1446A |
|
350 | OUTPUT @Amp;"INP1:IMP 50" | !input impedance |
360 | OUTPUT @Amp;"INP1:ATT 30" | !input attenuation (dB) |
370 | OUTPUT @Amp;"OUTP2:IMP 50" | !Diff + output impedance |
380 | OUTPUT @Amp;"OUTP3:IMP 50" | !Diff - output impedance |
390 | ! |
|
400 | OUTPUT @Afg;"INIT:IMM" !E1445A |
410SUBEND
420!
430SUB Rst
440Rst: !Subprogram which resets the E1445A and E1446A
450COM @Afg,@Amp
460OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
470ENTER @Afg;Complete
480OUTPUT @Amp;"*RST;*OPC?" !reset the amplifier
490ENTER @Amp;Complete
500SUBEND
510!
520SUB Errmsg
530Errmsg: !Subprogram which displays E1445/E1446 programming errors
540COM @Afg,@Amp
550DIM Message$[256]
560!Read AFG (at sec addr 10) status byte register, clear service
570!request bit
580B=SPOLL(@Afg)
590 IF BIT(B,6) THEN !AFG requested service
600!End of statement if error occurs among coupled commands
610OUTPUT @Afg;""
620OUTPUT @Afg;"ABORT"!abort output waveform
630PRINT "E1445A errors"
640PRINT
650REPEAT
660OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
670ENTER @Afg;Code,Message$
680PRINT Code,Message$
690 UNTIL Code=0
Continued on Next Page
Using the Differential (small signal) Outputs |