Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1123

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

Private Sub Analyze()
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
On Error GoTo ErrorHandler
' Make measurements.
' -----------------------------------------------------------------
DoCommand ":MEASure:SOURce CHANnel1"
Debug.Print "Measure source: " + _
DoQueryString(":MEASure:SOURce?")
DoCommand ":MEASure:FREQuency"
dblQueryResult = DoQueryNumber(":MEASure:FREQuency?")
MsgBox "Frequency:" + vbCrLf + _
FormatNumber(dblQueryResult / 1000, 4) + " kHz"
DoCommand ":MEASure:VAMPlitude"
dblQueryResult = DoQueryNumber(":MEASure:VAMPlitude?")
MsgBox "Vertical amplitude:" + vbCrLf + _
FormatNumber(dblQueryResult, 4) + " V"
' Download the screen image.
' -----------------------------------------------------------------
' Get screen image.
Dim lngBlockSize As Long
lngBlockSize = DoQueryIEEEBlock_Bytes(":DISPlay:DATA? PNG")
Debug.Print "Screen image bytes: " + CStr(lngBlockSize)
' Save screen image to a file:
Dim strPath As String
strPath = "c:\scope\data\screen.png"
If Len(Dir(strPath)) Then
Kill strPath
' Remove file if it exists.
End If
Dim hFile As Long
hFile = FreeFile
Open strPath For Binary Access Write Lock Write As hFile
Dim lngI As Long
' Skip past header.
For lngI = CInt(Chr(byteArray(1))) + 2 To lngBlockSize - 1
Put hFile, , byteArray(lngI)
Next lngI
Close hFile
' Close file.
MsgBox "Screen image written to " + strPath
' Download waveform data.
' -----------------------------------------------------------------
' Get the waveform type.
Debug.Print "Waveform type: " + _
DoQueryString(":WAVeform:TYPE?")
' Get the number of waveform points.
Debug.Print "Waveform points: " + _
DoQueryString(":WAVeform:POINts?")
' Write data.
38
Sample Programs
1123

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents