Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1024

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

Advertisement

38
Sample Programs
1024
DoCommand ":MEASure:FREQuency"
varQueryResult = DoQueryNumber(":MEASure:FREQuency?")
MsgBox "Frequency:" + vbCrLf + _
FormatNumber(varQueryResult / 1000, 4) + " kHz"
DoCommand ":MEASure:VAMPlitude"
varQueryResult = DoQueryNumber(":MEASure:VAMPlitude?")
MsgBox "Vertical amplitude:" + vbCrLf + _
FormatNumber(varQueryResult, 4) + " V"
' Download the screen image.
' -----------------------------------------------------------------
' Get screen image.
Dim byteData() As Byte
byteData = DoQueryIEEEBlock_UI1(":DISPlay:DATA? PNG")
' 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
Put hFile, , byteData
Close hFile
' Close file.
MsgBox "Screen image (" + CStr(UBound(byteData) + 1) + _
" bytes) 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 available: " + _
DoQueryString(":WAVeform:POINts?")
' Set the waveform source.
DoCommand ":WAVeform:SOURce CHANnel1"
Debug.Print "Waveform source: " + _
DoQueryString(":WAVeform:SOURce?")
' Choose the format of the data returned:
DoCommand ":WAVeform:FORMat WORD"
Debug.Print "Waveform format: " + _
DoQueryString(":WAVeform:FORMat?")
' Display the waveform settings from preamble:
Dim Preamble()
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
' Write data.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents