220
Chapter 4 Application Programs
Program Listings
4
Program Listings
Example: A Simple Sine Waveform
This program (found in the “Examples\chapter6\SimpleSine” subdirectory on the CD-
ROM) selects the function as “sine,” and then sets the frequency, amplitude and offset of
the waveform.
' """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
' This Simple Sine program enables a simple sine wave output on channel 1
' of a 33500 Series instrument with the following signal characteristics:
'
'Wave Shape: Sine
'Frequency: 1000 Hz
'Amplitude: 2 Volt Peak to Peak
'Offset: 0 Volt
'Output Impedence: 50 Ohm
'Channel1 Output: Enabled
'
' """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Private Sub Command1_Click()
Dim io_mgr As VisaComLib.ResourceManager
Dim mfIo As VisaComLib.FormattedIO488
Set io_mgr = New AgilentRMLib.SRMCls
Set mfIo = New FormattedIO488
Set mfIo.IO = io_mgr.Open(Text1.Text, NO_LOCK, 2000, "")
On Error GoTo MyError
' This program sets up a waveform by selecting the waveshape
' and adjusting the frequency, amplitude, and offset.