Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1144

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

Advertisement

39
Programming Examples
End Sub
'
' Analyze the captured waveform.
' -------------------------------------------------------------------
Private Sub Analyze()
1144
' Capture an acquisition using :DIGitize.
' -----------------------------------------------------------------
DoCommand ":DIGitize CHANnel1"
' Make a couple of 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 "Vertial amplitude:" + vbCrLf + _
FormatNumber(dblQueryResult, 4) + " V"
' Download the screen image.
' -----------------------------------------------------------------
DoCommand ":HARDcopy:INKSaver OFF"
' Get screen image.
Dim lngBlockSize As Long
lngBlockSize = DoQueryIEEEBlock_Bytes(":DISPlay:DATA? PNG, COLor")
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
For lngI = 0 To lngBlockSize - 1
Put hFile, , byteArray(lngI)
Next lngI
Close hFile
' Close file.
MsgBox "Screen image written to " + strPath
' Download waveform data.
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
' Write data.

Advertisement

Table of Contents
loading

Table of Contents