EasyManuals Logo
Home>Agilent Technologies>Inverter>33120A

Agilent Technologies 33120A User Manual

Agilent Technologies 33120A
312 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #269 background imageLoading...
Page #269 background image
Downloading an Arbitrary Waveform over RS-232
This program teaches the following concepts:
How to define a set of binary waveform points and download the
points to volatile memory. The downloaded waveform is a damped
sine wave.
How to copy the download waveform to non-volatile memory.
BASIC / RS-232 (Program 5)
10 !
20 ! This program shows how to download an arbitrary waveform
30 ! using binary data over the RS-232 interface. The program
40 ! generates a damped sine wave using 16,000 points.
50 !
60 OPTION BASE 1
70 CONTROL 10,3;9600 ! Configure PC for 9600 baud (COM2)
80 CONTROL 10,4;7 ! Configure PC for 8 bits with no parity
90 INTEGER Waveform(16000),I,Ncycles ! Dimension array and variables
100 REAL Damp_factor ! Define real variable
110 ASSIGN @Fgen TO 10 ! Device address is 10
120 ASSIGN @Bin TO 10;FORMAT OFF ! Prepare interface for binary data
130 OUTPUT @Fgen;"*RST" ! Reset the function generator
140 !
150 OUTPUT @Fgen;"SYST:REM" ! Enable the remote RS-232 mode
160 OUTPUT @Fgen;"FORM:BORD SWAP" ! Swap data bytes (send LSB first)
170 OUTPUT @Fgen;"FREQ 5000" ! Output frequency is 5 kHz
180 OUTPUT @Fgen;"OUTP:LOAD 50" ! Output termination is 50 ohms
190 OUTPUT @Fgen;"VOLT 5" ! Output amplitude is 5 Vpp
200 !
210 Ncycles = 10 ! Define number of cycles
220 Damp_factor = -5 ! Define damping factor
230 !
240 ! Calculate data points
250 !
260 DISP "Calculating Data Points..."
270 FOR I=1 TO 16000
280 IF I<14000 THEN
290 Waveform(I)=SIN(2*PI*Ncycles*I/14000)*2047
300 Waveform(I)=Waveform(I)*EXP(Damp_factor*I/14000)
310 ELSE
320 Waveform(I)=0
330 END IF
340 NEXT I
6
Chapter 6 Application Programs
Downloading an Arbitrary Waveform over RS-232
267

Table of Contents

Other manuals for Agilent Technologies 33120A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 33120A and is the answer not in the manual?

Agilent Technologies 33120A Specifications

General IconGeneral
BrandAgilent Technologies
Model33120A
CategoryInverter
LanguageEnglish

Related product manuals