Program Example - HP E1340A User Manual

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

Advertisement

Program Example

HP IBASIC Program Example (UNS_DAT)
Chapter 6
This program shows how to store a waveform segment (i.e., points of an
arbitrary waveform) into the AFG's segment memory. The program
transfers the data to the AFG as a comma ( , ) separated list. The example
generates a 4096 point +5 V to -5 V negative going ramp.
1. Reset the AFG -
*RST
2. Setup the AFG for Output -
[SOURce:]FREQuency[:CW|FIXed] <
[SOURce:]FUNCtion[:SHAPe] USER
[SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] <
3. Select the DAC Data Source -
[SOURce:]ARBitrary:DAC:SOURce INTernal
This command selects the source that transfers data to the DAC
(see " Program Comments" ). Use
the
[SOURce:]FUNCtion USER
this command; it is given here for good programming practice.)
4. Select the Waveform Segment -
[SOURce:]LIST[:SEGMent]:SELect <
Use either
,
,
A
B
C
5. Store the Waveform Segment as DAC Data -
[SOURce:]LIST[:SEGMent]:VOLTage:DAC <
This command stores the waveform segment into segment memory
using DAC codes consisting of 16-bit integers.
6. Generate the Output -
[SOURce:]FUNCtion:USER <
INITiate[:IMMediate]
1
!RE-SAVE"UNS_DAT"
2
!This program downloads AFG data in the form of DAC codes
3
!(unsigned numbers). The data represents a 5V ramp waveform.
4
!
10
!Assign I/O path between IBASIC and the E1340A.
20
ASSIGN @Afg TO 80910
30
COM @Afg,Waveform(1:4096)
40
!
50
!Set up error checking
60
ON INTR 8 CALL Errmsg
70
ENABLE INTR 8;2
Continued on next page
frequency
INTernal
subsystem. (Reset automatically sets
name
, or
in
name
for the waveform segment.
D
<
>
name
>
HP E1340A High Speed Operation
>
amplitude
>
to transfer the data using
>
voltage_list
>
110

Advertisement

Table of Contents
loading

Table of Contents