Herunterladen Inhalt Inhalt Diese Seite drucken

Kapitel 6 Anwendungsprogramme Programmbeispiel Beispiel: Einfache Sinus-Signalform; Programmbeispiel - Agilent Technologies 33220A Benutzerhandbuch

20 mhz-synthesizer-funktions- / arbitraersignalgenerator
Inhaltsverzeichnis

Werbung

6
Kapitel 6 Anwendungsprogramme
Programmbeispiel Beispiel: Einfache Sinus-Signalform

Programmbeispiel

Beispiel: Einfache Sinus-Signalform
Dieses Programm (auf der CD-ROM im Unterverzeichnis „Examples\
chapter6\SimpleSine" zu finden) wählt für die Funktion „Sine" und
stellt anschließend die Frequenz, die Amplitude und den Offset für das
Signal ein.
Private Sub cmdSimpleSine_Click()
Dim io_mgr As VisaComLib.ResourceManager
Dim Fgen As VisaComLib.FormattedIO488
Set io_mgr = New VisaComLib.ResourceManager
Set Fgen = New VisaComLib.FormattedIO488
Set Fgen.IO = io_mgr.Open(txtIO.Text)
On Error GoTo MyError
' This program sets up a waveform by selecting the waveshape
' and adjusting the frequency, amplitude, and offset.
With Fgen
.WriteString "*RST"
generator
.IO.Clear
registers
.WriteString "FUNCtion SINusoid"
' Other options are SQUare, RAMP, PULSe, NOISe, DC, and USER
.WriteString "OUTPut:LOAD 50"
in Ohms
' May also be INFinity, as when using oscilloscope or DMM
.WriteString "FREQuency 2500"
.WriteString "VOLTage 1.2"
.WriteString "VOLTage:OFFSet 0.4"
Volts
' Voltage may also be set as VOLTage:HIGH and VOLTage:LOW for
low level
' and high level
.WriteString "OUTPut ON"
output
End With
Exit Sub
MyError:
txtError = Err.Description & vbCrLf
Resume Next
End Sub
336
' Reset the function
' Clear errors and status
' Select waveshape
' Set the load impedance
' (50 Ohms default)
' Set the frequency.
' Set the amplitude in Vpp.
' Also see VOLTage:UNIT
' Set the offset in
' Turn on the instrument

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis