BASIC Program Example (TRIWAVE)
1
!RE-STORE“TRIWAVE”
2
!This program outputs a 200 point, 10 kHz, 4V triangle wave
3
!with a 1V DC offset.
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 subprograms
130
CALL Rst
140
CALL Tri_wave
150
!
160
WAIT .1 !allow interrupt to be serviced
170
OFF INTR
180
END
190
!
200
SUB Tri_wave
210 Tri_wave:
!Subprogram which outputs a triangle wave
220
COM @Afg
230
OUTPUT @Afg;“SOUR:ROSC:SOUR INT1;”;
!reference oscillator
240
OUTPUT @Afg;“:TRIG:STAR:SOUR INT1;”;
!trigger source
250
OUTPUT @Afg;“:SOUR:FREQ1:RANG 0;”;
!frequency range
260
OUTPUT @Afg;“:SOUR:FREQ1:FIX 10E3;”;
!frequency
270
OUTPUT @Afg;“:SOUR:FUNC:SHAP TRI;”;
!function
280
OUTPUT @Afg;“:SOUR:RAMP:POIN 200;”;
!waveform points
290
OUTPUT @Afg;“:SOUR:VOLT:LEV:IMM:AMPL 4V;”;
!amplitude
300
OUTPUT @Afg;“:SOUR:VOLT:LEV:IMM:OFFS 1V”
!dc offset
310
OUTPUT @Afg;“INIT:IMM”
!wait-for-arm state
320
SUBEND
330
!
340
SUB Rst
350 Rst:
!Subprogram which resets the E1445.
360
COM @Afg
370
OUTPUT @Afg;"*RST;*OPC?"
!reset the AFG
380
ENTER @Afg;Complete
390
SUBEND
400
!
410
SUB Errmsg
420 Errmsg: !Subprogram which displays E1445 programming errors
430
COM @Afg
440
DIM Message$[256]
Continued on Next Page
Chapter 2
Generating Standard Waveforms 67
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...