HP E1340A User's Manual
Download Operation & user’s manual of HP E1340A Portable Generator for Free or View it Online on All-Guides.com.
Generating a Sine
Wave
To output a sine wave, only an amplitude needs to be specified and the AFG
placed in the wait-for-trigger state (INIT). Using the minimum amount of
AFG commands, this programs generates a 10 kHz, 10 Vp-p sine wave.
HP IBASIC (RSTSINE)
1 !RE-SAVE"RSTSINE"
2 !This program outputs a sine wave based on a specified amplitude
3 !and the reset settings of the AFG.
4 !
10 !Assign an I/O path between IBASIC and the AFG.
20 ASSIGN @Afg TO 80910
30 COM @Afg
40 !
50 !Reset the AFG
60 CALL Rst
70 OUTPUT @AFG;"SOUR:VOLT:LEV:IMM:AMPL 5" !set amplitude
80 OUTPUT @Afg;"INIT:IMM" !output sine wave using reset conditions
90 END
100 !
110 SUB Rst
120 Rst: !subprogram which resets the AFG.
130 COM @Afg
140 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG
150 ENTER @Afg;Complete
160 SUBEND
C and QuickBASIC
Programs
The C and QuickBASIC versions of RSTSINE are on the C language
example programs disk (HP P/N E1340-10036).
HP E1340A Example Programs
For easy reference, names and descriptions of the example programs in this
manual are summarized in Appendix B, Table B-1.
Chapter 1 Getting Started with the HP E1340A 40