Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 738

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

Advertisement

12
Programming Examples
738
Dim fYorigin As Double = fResultsArray(8)
Console.WriteLine("Preamble YORigin: {0:e}", fYorigin)
Dim fYreference As Double = fResultsArray(9)
Console.WriteLine("Preamble YREFerence: {0:e}", fYreference)
' QUERY_WAVE_DATA - Outputs waveform records to the controller
' over the interface that is stored in a buffer previously
' specified with the ":WAVeform:SOURce" command.
' READ_WAVE_DATA - The wave data consists of two parts: the
' header, and the actual waveform data followed by a
' New Line (NL) character.
' format:
'
'
<header><waveform data block><NL>
'
' Where:
'
'
<header> = #800002048
'
' The "#8" may be stripped off of the header and the remaining
' numbers are the size, in bytes, of the waveform data block.
' The size can vary depending on the number of points acquired
' for the waveform which can be set using the
' ":WAVEFORM:POINTS" command.
' of bytes from the oscilloscope; then, read the following NL
' character to terminate the query.
' Read waveform data.
nLength = oscp.DoQueryIEEEBlock(":WAVeform:DATA?", ResultsArray)
Console.WriteLine("Read waveform data ({0} bytes).", nLength)
' Make some calculations from the preamble data.
Dim fVdiv As Double = 32 * fYincrement
Dim fOffset As Double = fYorigin
Dim fSdiv As Double = fPoints * fXincrement / 10
Dim fDelay As Double = (fPoints / 2) * fXincrement + fXorigin
' Print them out...
Console.WriteLine("Scope Settings for Channel 1:")
Console.WriteLine("Volts per Division = {0:f}", fVdiv)
Console.WriteLine("Offset = {0:f}", fOffset)
Console.WriteLine("Seconds per Division = {0:e}", fSdiv)
Console.WriteLine("Delay = {0:e}", fDelay)
' Print the waveform voltage at selected points:
Dim i As Integer = 0
While i < 1000
Console.WriteLine("Data point {0:d} = {1:f2} Volts at " + _
"{2:f10} Seconds", i, _
(CSng(ResultsArray(i)) - fYreference) * fYincrement + _
fYorigin, _
(CSng(i) - fXreference) * fXincrement + fXorigin)
i = i + 50
End While
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
The query data has the following
(this is an example header)
You may then read that number

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents