Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1101

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

VisaComError:
End Sub
'
' Analyze the captured waveform.
' -------------------------------------------------------------------
Private Sub Analyze()
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
DoQueryString(":TIMebase:POSition?")
' Set the acquisition type (NORMal, PEAK, AVERage, or HRESolution).
DoCommand ":ACQuire:TYPE NORMal"
Debug.Print "Acquire type: " + _
DoQueryString(":ACQuire:TYPE?")
' Or, configure by loading a previously saved setup.
' -----------------------------------------------------------------
Dim varSetupString As Variant
strPath = "c:\scope\config\setup.dat"
Open strPath For Binary Access Read As hFile
Get hFile, , varSetupString
Close hFile
' Close file.
' Write learn string back to oscilloscope using ":SYSTem:SETup"
' command:
DoCommandIEEEBlock ":SYSTem:SETup", varSetupString
Debug.Print "Setup bytes restored: " + CStr(LenB(varSetupString))
' Capture an acquisition using :DIGitize.
' -----------------------------------------------------------------
DoCommand ":DIGitize CHANnel1"
Exit Sub
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End
On Error GoTo VisaComError
' Make a couple of measurements.
' -----------------------------------------------------------------
DoCommand ":MEASure:SOURce CHANnel1"
Debug.Print "Measure source: " + _
DoQueryString(":MEASure:SOURce?")
DoCommand ":MEASure:FREQuency"
varQueryResult = DoQueryNumber(":MEASure:FREQuency?")
MsgBox "Frequency:" + vbCrLf + _
FormatNumber(varQueryResult / 1000, 4) + " kHz"
DoCommand ":MEASure:VAMPlitude"
varQueryResult = DoQueryNumber(":MEASure:VAMPlitude?")
MsgBox "Vertial amplitude:" + vbCrLf + _
FormatNumber(varQueryResult, 4) + " V"
' Download the screen image.
Programming Examples
' Open file for input.
' Read data.
39
1101

Advertisement

Table of Contents
loading

Table of Contents