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
Summary of Contents for E1340A
Page 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Page 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Page 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Page 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Page 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Page 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Page 218: ...218 HP E1340A Specifications Appendix A ...
Page 284: ...284 HP E1340A Register Based Programming Appendix C ...
Page 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...