Technical data

1014 Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
35 Sample Programs
myScope.DoQueryString(":MEASure:SOURce?"))
myScope.DoCommand(":MEASure:FREQuency")
fResult = myScope.DoQueryNumber(":MEASure:FREQuency?")
Console.WriteLine("Frequency: {0:F4} kHz", fResult / 1000)
myScope.DoCommand(":MEASure:VAMPlitude")
fResult = myScope.DoQueryNumber(":MEASure:VAMPlitude?")
Console.WriteLine("Vertial amplitude: {0:F2} V", fResult)
' Download the screen image.
' ------------------------------------------------------------
' Get the screen data.
nLength = myScope.DoQueryIEEEBlock_Bytes(":DISPlay:DATA? PNG", _
ResultsArray)
' Store the screen data to a file.
strPath = "c:\scope\data\screen.png"
Dim fStream As FileStream
fStream = File.Open(strPath, FileMode.Create)
fStream.Write(ResultsArray, 0, nLength)
fStream.Close()
Console.WriteLine("Screen image ({0} bytes) written to {1}", _
nLength, strPath)
' Download waveform data.
' ------------------------------------------------------------
' Get the waveform type.
Console.WriteLine("Waveform type: {0}", _
myScope.DoQueryString(":WAVeform:TYPE?"))
' Get the number of waveform points.
Console.WriteLine("Waveform points: {0}", _
myScope.DoQueryString(":WAVeform:POINts?"))
' Set the waveform source.
myScope.DoCommand(":WAVeform:SOURce CHANnel1")
Console.WriteLine("Waveform source: {0}", _
myScope.DoQueryString(":WAVeform:SOURce?"))
' Choose the format of the data returned:
myScope.DoCommand(":WAVeform:FORMat WORD")
Console.WriteLine("Waveform format: {0}", _
myScope.DoQueryString(":WAVeform:FORMat?"))
' Display the waveform settings from preamble:
Dim dctWavFormat As New Dictionary(Of String, String)
dctWavFormat.Add("0", "ASCii")
dctWavFormat.Add("1", "BYTE")
dctWavFormat.Add("2", "WORD")
dctWavFormat.Add("3", "LONG")
dctWavFormat.Add("4", "LONGLONG")
Dim dctAcqType As New Dictionary(Of String, String)
dctAcqType.Add("1", "RAW")