Example: Linear Sweep - Keysight Technologies 33210A User Manual

10 mhz function/arbitrary waveform generator
Hide thumbs Also See for 33210A:
Table of Contents

Advertisement

6
Application Programs

Example: Linear Sweep

This program (found in the "Examples\chapter6\LinearSweep" subdirectory on
the CD-ROM) creates a linear sweep for a sine wave. It sets the start and stop
frequencies, and the sweep time.
Private Sub cmdLinearSweep_Click()
MyError:
End Sub
334
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 linear sweep using a sinusoid
' waveform.
It sets the start and stop frequency and sweep
' time.
With Fgen
.WriteString "*RST"
.IO.Clear
.WriteString "FUNCtion SINusoid"
.WriteString "OUTPut:LOAD 50"
.WriteString "VOLTage 1"
.WriteString "SWEep:SPACing LINear"
.WriteString "SWEep:TIME 1"
.WriteString "FREQuency:STARt 100"
.WriteString "FREQuency:STOP 20e3"
' Frequency sweep limits may also be set as FREQuency:CENTer and
' FREQuency:SPAN on the 332x0A
' For the 332x0A, also see MARKer:FREQuency
.WriteString "OUTPut ON"
.WriteString "SWEep:STATe ON"
End With
Exit Sub
txtError = Err.Description & vbCrLf
Resume Next
' Reset the function generator
' Clear errors and status registers
' Select waveshape
' Set the load impedance to
' 50 Ohms (default)
' Set the amplitude to 1 Vpp.
' Set Linear or LOG spacing
' Sweep time is 1 second
' Start frequency is 100 Hz
' Stop frequency is 20 kHz
' Turn on the instrument output
' Turn sweep on
Keysight 33210A User's Guide

Advertisement

Table of Contents
loading

Table of Contents