Generating Dc Voltages - HP E1340A User Manual

Arbitrary function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

Generating DC Voltages

HP IBASIC Program Example (DCVOLTS)
43
Generating Standard Waveforms with the HP E1340A
This program outputs a +5 V DC voltage. The commands are:
1. Reset the AFG -
*RST
The
*RST
command aborts any waveform output and selects the
sinusoid function.
2. Select the Function -
[SOURce:]FUNCtion[:SHAPe] DC
This command selects the DC function.
3. Set the Amplitude -
[SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] <
This command specifies the amplitude. Refer to the section called
" Selecting the Amplitude Levels and Output Units" on page 50 for
more information.
1
!RE-SAVE"DCVOLTS"
2
!This program outputs 5V dc.
3
!
10
!Assign I/O path between IBASIC and the E1340A.
20
ASSIGN @Afg TO 80910
30
COM @Afg
40
!
50
!Set up error checking
60
ON INTR 8 CALL Errmsg
70
ENABLE INTR 8;2
80
OUTPUT @Afg;"*CLS"
90
OUTPUT @Afg;"*SRE 32"
100
OUTPUT @Afg;"*ESE 60"
110
!
120
!Call the subprogram which resets the AFG.
130
CALL Rst
140
!
150
!Set AFG parameters
160
OUTPUT @Afg;"SOUR:FUNC:SHAP DC" !function
170
OUTPUT @Afg;"SOUR:VOLT:LEV:IMM:AMPL 5V" !amplitude
180
!
190
WAIT .1
Continued on next page
amplitude
!allow interrupt to be serviced
Chapter 2
>

Advertisement

Table of Contents
loading

Table of Contents