User`s manual
700 REPEAT
710 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
720 ENTER @Afg;Code,Message$
730 PRINT Code,Message$
740 UNTIL Code=0
750 STOP
760 SUBEND
Visual BASIC and
Visual C/C++ Program
Versions
The Visual BASIC example program, FSK2.FRM, is in directory
“VBPROG” and the Visual C example program, FSK2.C, is in directory
“VCPROG” on the CD that came with your Agilent E1445A.
FSK Using an
Arbitrary Waveform
The FSK_ARB program uses frequency-shift keying with an arbitrary
waveform to shift between two sample rates. The control source is a 5 V
signal applied to the AFG’s front panel “FSK In” BNC connector.
BASIC Program Example (FSK_ARB)
1 !RE-STORE “FSK_ARB”
2 !This program shifts the frequency of an arbitrary waveform
3 !based on a control signal applied to the “FSK In” BNC connector.
4 !
10 !Assign I/O path between the computer and E1445A.
20 ASSIGN @Afg TO 70910
30 COM @Afg
40 !
50 !Set up error checking
60 ON INTR 7 CALL Errmsg
70 ENABLE INTR 7;2
80 OUTPUT @Afg;"*CLS"
90 OUTPUT @Afg;"*SRE 32"
100 OUTPUT @Afg;"*ESE 60"
110 !
120 !Call the subprogram which resets and clears the AFG.
130 CALL Rst
140 CALL Wf_del
150 !Set the FSK mode, the FSK sample frequencies for 1 kHz and
160 !2 kHz output frequencies, the FSK source, the function, and
170 !output level.
180 OUTPUT @Afg;"SOUR:FREQ1:MODE FSK;"; !FSK mode
190 OUTPUT @Afg;" :SOUR:FREQ1:FSK 4.096E6,8.192E6;"; !sample frequencies
200 OUTPUT @Afg;" :SOUR:FREQ1:FSK:SOUR EXT;"; !FSK source
210 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function
220 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 1.1V" !amplitude
230 !Call the subprogram which defines the Sin(x)/x waveform and
240 !output sequence.
250 CALL Sinx_def
260 !Select the output sequence and start the waveform.
Continued on Next Page
152 Sweeping and Frequency-Shift Keying Chapter 4