Programming Examples 12
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide 737
' to WORD or BYTE format.
' Set waveform format to BYTE.
oscp.DoCommand(":WAVeform:FORMat BYTE")
' WAVE_POINTS - Sets the number of points to be transferred.
' The number of time points available is returned by the
' "ACQUIRE:POINTS?" query. This can be set to any binary
' fraction of the total time points available.
oscp.DoCommand(":WAVeform:POINts 1000")
' GET_PREAMBLE - The preamble contains all of the current
' WAVEFORM settings returned in the form <preamble block><NL>
' where the <preamble block> is:
' FORMAT : int16-0=BYTE, 1 = WORD, 2 = ASCII.
' TYPE : int16-0=NORMAL, 1 = PEAK DETECT,
' 2 = AVERAGE.
' POINTS : int32 - number of data points transferred.
' COUNT : int32-1andisalways1.
' XINCREMENT : float64 - time difference between data
' points.
' XORIGIN : float64 - always the first data point in
' memory.
' XREFERENCE : int32 - specifies the data point associated
' with the x-origin.
' YINCREMENT : float32 - voltage difference between data
' points.
' YORIGIN : float32 - value of the voltage at center
' screen.
' YREFERENCE : int32 - data point where y-origin occurs.
Console.WriteLine("Reading preamble.")
Dim fResultsArray As Double()
fResultsArray = oscp.DoQueryValues(":WAVeform:PREamble?")
Dim fFormat As Double = fResultsArray(0)
Console.WriteLine("Preamble FORMat: {0:e}", fFormat)
Dim fType As Double = fResultsArray(1)
Console.WriteLine("Preamble TYPE: {0:e}", fType)
Dim fPoints As Double = fResultsArray(2)
Console.WriteLine("Preamble POINts: {0:e}", fPoints)
Dim fCount As Double = fResultsArray(3)
Console.WriteLine("Preamble COUNt: {0:e}", fCount)
Dim fXincrement As Double = fResultsArray(4)
Console.WriteLine("Preamble XINCrement: {0:e}", fXincrement)
Dim fXorigin As Double = fResultsArray(5)
Console.WriteLine("Preamble XORigin: {0:e}", fXorigin)
Dim fXreference As Double = fResultsArray(6)
Console.WriteLine("Preamble XREFerence: {0:e}", fXreference)
Dim fYincrement As Double = fResultsArray(7)
Console.WriteLine("Preamble YINCrement: {0:e}", fYincrement)