Agilent Technologies E1446A user manual Amplifying a Sine Wave, Basic Rgbampl

Models: E1446A

1 161
Download 161 pages 46.15 Kb
Page 143
Image 143

BASIC Subprograms

Amplifying a Sine Wave

BASIC (RGBAMPL)

The subprograms used by each register-based program are stored/saved in a separate file (file name ’E46SUBS’). These subprograms are listed after the last example (Summing Two Signals).

This program uses the E1446A to amplify a 2 Vpp E1445A AFG signal to 14.15 Vpp. Since the intended output amplitude and the input amplitude are known, the amount of attenuation (0 - 31 dB attenuator) is determined as:

attenuation(dB) = 20 LOG Vo/(Vi * 10)

where Vo is the output amplitude and Vi is the input signal amplitude (Vo and Vi units (Vpp, Vp) must be the same). Thus,

attenuation(dB) = 20 LOG 14.15/20 = -3 dB

1!RE-STORE "RGBAMPL"

2LOADSUB ALL FROM "E46SUBS"

3!

10COM /E1446/ Base_addr,INTEGER In_ctrl,Out_imped

20!

30!SET UP E1445A

40!

50ASSIGN @Afg TO 1680 !E1445A and V/360 I/O path

60!

70!E1445A error checking

80ON INTR 16 CALL Errmsg

90ENABLE INTR 16;32

100OUTPUT @Afg;"*CLS"

110OUTPUT @Afg;"*SRE 32"

120OUTPUT @Afg;"*ESE 60"

130!

140!Reset E1445A and clear status

150OUTPUT @Afg;"*RST;*CLS;*OPC?"

160ENTER @Afg;Ready

170!

180

OUTPUT @Afg;"SOUR:FREQ1:FIX 1E3;";

!frequency

190

OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;";

!function

200OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 2VPP;"; !amplitude

210OUTPUT @Afg;":OUTP:LOAD:AUTO ON;"; !couple load to impedance

220

OUTPUT @Afg;":OUTP:IMP 50" !output impedance

230

!

Continued on Next Page

C-18 Register-Based Programming

Example Programs

Page 143
Image 143
Agilent Technologies E1446A user manual Amplifying a Sine Wave, Basic Rgbampl, Register-Based Programming Example Programs