BASIC Program Example (SINEWAVE)
1
!RE-STORE"SINEWAVE"
2
!The following program generates a 1 kHz, 5 Vp sine wave.
3
!
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 subprograms
130
CALL Rst
140
CALL Sine_wave
150
!
160
WAIT .1 !allow interrupt to be serviced
170
OFF INTR 7
180
END
190
!
200
SUB Sine_wave
210 Sine_wave: !Subprogram which outputs a sine wave
220
COM @Afg
230
OUTPUT @Afg;"SOUR:FREQ1:FIX 1E3;";
!frequency
240
OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;";
!function
250
OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5V"
!amplitude
260
OUTPUT @Afg;"INIT:IMM"
!wait-for-arm state
270
SUBEND
280
!
290
SUB Rst
300 Rst:
!Subprogram which resets the E1445.
310
COM @Afg
320
OUTPUT @Afg;"*RST;*OPC?"
!reset the AFG
330
ENTER @Afg;Complete
340
SUBEND
350
!
360
SUB Errmsg
370 Errmsg: !Subprogram which displays E1445 programming errors
380
COM @Afg
390
DIM Message$[256]
400
!Read AFG status byte register and clear service request bit
410
B=SPOLL(@Afg)
420
!End of statement if error occurs among coupled commands
430
OUTPUT @Afg;""
440
OUTPUT @Afg;"ABORT"
!abort output waveform
450
REPEAT
Continued on Next Page
Chapter 2
Generating Standard Waveforms 59
Summary of Contents for E1445A
Page 2: ......
Page 14: ...Notes 12 Agilent E1445A User s Manual Contents...
Page 18: ...Notes 16 Agilent E1445A Arbitrary Function Generator User s Manual...
Page 19: ...Notes Agilent E1445A Arbitrary Function Generator User s Manual 17...
Page 20: ...Notes 18 Agilent E1445A Arbitrary Function Generator User s Manual...
Page 54: ...Notes 52 Getting Started Chapter 1...
Page 84: ...Notes 82 Generating Standard Waveforms Chapter 2...
Page 204: ...Notes 202 Arming and Triggering Chapter 5...
Page 432: ...Figure 9 1 E1445A Status Groups and Associated Registers 430 AFG Status Chapter 9...
Page 446: ...Notes 444 AFG Status Chapter 9...
Page 464: ...Notes 462 Agilent E1445A Specifications Appendix A...
Page 534: ...Notes 532 Agilent E1445A User s Manual Index...