320
Chapter 6 Application Programs
Program Listings
6
' Download data points to volatile memory
txtError.SelText = "Downloading Arb..." & vbCrLf
With Fgen
.WriteString "DATA VOLATILE, " & DataStr
End With
txtError.SelText = "Download Complete" & vbCrLf
' Set up arbitrary waveform and output
With Fgen
.WriteString "DATA:COPY PULSE, VOLATILE" ' Copy arb to non-volatile
' memory
.WriteString "FUNCtion:USER PULSE" ' Select the active arb waveform
.WriteString "FUNCtion:SHAPe USER" ' Output the selected arb waveform
.WriteString "OUTPut:LOAD 50" ' Output termination is 50 Ohms
.WriteString "FREQuency 5000;VOLTage 5" ' Output frequency is 5 kHz
' @ 5 Vpp
.WriteString "OUTPut ON" ' Enable Output
End With
Exit Sub
MyError:
txtError = Err.Description & vbCrLf
Resume Next
End Sub