Generating A Half-Rectified Sine Wave - HP E1340A User Manual

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

Advertisement

C and QuickBASIC
Program Versions
Generating a
Half-Rectified Sine
Wave
Chapter 3
380
FOR J=1 TO Width/2
390
Waveform(J+1024)=Waveform(J+1024)+J*.04
400
NEXT J
410
FOR J=1 TO Width/2
420
Waveform(J+1024+Width/2)=Waveform(J+1024+Width/2)
+1-(J*.04)
430
NEXT J
440
!
450
OUTPUT @Afg;"SOUR:LIST:SEGM:SEL A"!select segment name
460
OUTPUT @Afg;" SOUR:LIST:SEGM:VOLT";Waveform(*)!load
470
SUBEND
The C example program, SPIKES.C, is in directory " CPROG" and the
QuickBASIC example program, SPIKES.BAS, is in directory " QBPROG"
on the C and QuickBASIC example disk (part number E1340-10034).
This program generates a Half-Rectified Sine Wave using 4096 segments or
points.
Generating Arbitrary Waveforms with the HP E1340A
waveform points
80

Advertisement

Table of Contents
loading

Table of Contents