904
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
12
Programming Examples
Debug.Print "Setup bytes restored: " + CStr(lngRestored)
' Acquire data.
' -----------------------------------------------------------------
DoCommand ":DIGitize"
Exit Sub
ErrorHandler:
MsgBox "*** Error : " + Error, vbExclamation
End
End Sub
'
' Analyze the captured waveform.
' -------------------------------------------------------------------
Private Sub Analyze()
On Error GoTo ErrorHandler
' Make a couple of measurements.
' -----------------------------------------------------------------
DoCommand ":MEASure:SOURce CHANnel1"
Debug.Print "Measure source: " + _
DoQueryString(":MEASure:SOURce?")
DoCommand ":MEASure:VAMPlitude"
dblQueryResult = DoQueryNumber(":MEASure:VAMPlitude?")
MsgBox "Vertical amplitude:" + _
FormatNumber(dblQueryResult, 4) + " V"
DoCommand ":MEASure:FREQuency"
dblQueryResult = DoQueryNumber(":MEASure:FREQuency?")
MsgBox "Frequency:" + _
FormatNumber(dblQueryResult / 1000, 4) + " kHz"
' Download the screen image.
' -----------------------------------------------------------------
' Get screen image.
Dim lngBlockSize As Long
lngBlockSize = _
DoQueryIEEEBlock_Bytes(":DISPlay:DATA? PNG, SCReen, COLor")
Debug.Print "Image IEEEBlock bytes: " + CStr(lngBlockSize)
' Save screen image to a file:
Dim strPath As String
strPath = "c:\scope\data\screen.png"
Dim hFile As Long
hFile = FreeFile
Open strPath For Binary Access Write Lock Write As hFile
Dim lngI As Long
For lngI = 10 To lngBlockSize - 1
' Skip past 10-byte header.
Put hFile, , byteArray(lngI)
' Write data.
Next lngI
Содержание InfiniiVision 7000A Series
Страница 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Страница 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Страница 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 652: ...652 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 5 Commands by Subsystem...
Страница 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Страница 784: ...784 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 10 Synchronizing Acquisitions...
Страница 810: ...810 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 11 More About Oscilloscope Commands...
Страница 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...