Herunterladen Inhalt Inhalt Diese Seite drucken

Beispiel: Arbiträrsignal Laden (Ascii) - Agilent Technologies 33220A Benutzerhandbuch

20 mhz-synthesizer-funktions- / arbitraersignalgenerator
Inhaltsverzeichnis

Werbung

Beispiel: Arbiträrsignal laden (ASCII)
Dieses Programm (auf der CD-ROM im Unterverzeichnis „Examples\chapter6\ASCI-
Iarb" zu finden) lädt Arbiträrsignal-Daten im ASCII-Format in den Funktionsgenerator.
Die Datenwerte liegen in einem Bereich von -1 bis +1.
Private Sub cmdASCIIArb_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)
Dim Waveform() As String
Dim I As Integer
Dim DataStr As String
ReDim Waveform(1 To 4000)
On Error GoTo MyError
' This program uses the arbitrary waveform function to
' download and output a square wave pulse with a calculated
' rise time and fall time.
' points downloaded to the function generator as ASCII data.
With Fgen
.WriteString "*RST"
.IO.Clear
.IO.Timeout = 40000
End With
' Compute waveform
txtError.Text = ""
txtError.SelText = "Computing Waveform..." & vbCrLf
For I = 1 To 5
Waveform(I) = Str$((I - 1) / 5)
Next I
For I = 6 To 205
Waveform(I) = "1"
Next I
For I = 206 To 210
Waveform(I) = Str$((210 - I) / 5)
Next I
For I = 211 To 4000
Waveform(I) = "0"
Next I
DataStr = Join(Waveform, ",")
Fortzsetzung...
Programmbeispiel Beispiel: Einfache Sinus-Signalform
The waveform consists of 4000
' Reset the function generator
' Clear errors and status registers
' Set timeout to 40 seconds for long
' download strings
' Set rise time (5 points)
' Set pulse width (200 points)
' Set fall time (5 points)
' Set remaining points to zero
' Create string from data array
Kapitel 6 Anwendungsprogramme
4
6
341

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis