282
Chapter 6 Application Programs
Example: Microsoft Visual Basic for Windows
6
Example: Microsoft Visual Basic for Windows
Option Explicit
Dim m_Count As Integer ’ Used to sequence messages
Private IOUtils As New AgtUtilsObject
’ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""’
’ Copyright (c) 2000 Agilent Technologies. All Rights Reserved. ’
’ ’
’ Agilent Technologies provides programming samples for illustration ’
’ purposes only. This sample program assumes that you are familiar ’
’ with the programming language being demonstrated and the tools used ’
’ to create and debug procedures. Agilent support engineers can help ’
’ answer questions relating to the functionality of the software ’
’ components provided by Agilent, but they will not modify these samples ’
’ to provide added functionality or construct procedures to meet your ’
’ specific needs. ’
’ You have a royalty-free right to use, modify, reproduce, and distribute ’
’ this sample program (and/or any modified version) in any way you find ’
’ useful, provided that you agree that Agilent has no warranty, ’
’ obligations, or liability for any sample programs. ’
’ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""’
’
’ Agilent 33250A 80 MHz Function/Arbitrary Waveform Generator Examples
’
’ Examples include Modulation, Pulse, Sweeping, Burst, and Status checking.
’ Examples illustrate various uses of short/long form SCPI.
’ Examples also illustrate enabling/disabling output BNCs.
’ To view results on Scope, set to:
’ Channel 1: Output BNC, 50ohms, 50us/div, 200mV/div
’ Channel 2: Sync BNC, 50us/div, 500mV/div, trigger on Channel 2
’
’ Microsoft Visual Basic 6.0 Programming Examples
’ 3-30-00
’
Private Sub cmdStart_Click()
Dim i As Integer ’ Used as general purpose counter
cmdStart.Enabled = False ’ Disable Start button
’
’ Return the 33250A to turn-ON conditions
’
Arb.IO.Output "*RST" ’ Default state of instrument
Arb.IO.Output "*CLS" ’ Clear errors and status
Continued...