Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 693

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

ErrorHandler:
End Sub
'
' Analyze the captured waveform.
' -------------------------------------------------------------------
Private Sub Analyze()
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
Debug.Print "Setup bytes restored: " + CStr(lngRestored)
' Acquire data.
' -----------------------------------------------------------------
DoCommand ":DIGitize"
Exit Sub
MsgBox "*** Error : " + Error, vbExclamation
End
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:" + vbCrLf + _
FormatNumber(dblQueryResult, 4) + " V"
DoCommand ":MEASure:FREQuency"
dblQueryResult = DoQueryNumber(":MEASure:FREQuency?")
MsgBox "Frequency:" + vbCrLf + _
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
Put hFile, , byteArray(lngI)
Next lngI
Programming Examples
' Skip past 10-byte header.
' Write data.
12
693

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents