3Commands by Subsystem
lngYReference = Preamble(9) strOutput = ""
'strOutput = strOutput + "Format = " + CStr(intFormat) + vbCrLf 'strOutput = strOutput + "Type = " + CStr(intType) + vbCrLf 'strOutput = strOutput + "Points = " + CStr(lngPoints) + vbCrLf 'strOutput = strOutput + "Count = " + CStr(lngCount) + vbCrLf 'strOutput = strOutput + "X increment = " + _
'FormatNumber(dblXIncrement * 1000000) + " us" + vbCrLf 'strOutput = strOutput + "X origin = " + _
'FormatNumber(dblXOrigin * 1000000) + " us" + vbCrLf 'strOutput = strOutput + "X reference = " + _
'CStr(lngXReference) + vbCrLf
'strOutput = strOutput + "Y increment = " + _
'FormatNumber(sngYIncrement * 1000) + " mV" + vbCrLf 'strOutput = strOutput + "Y origin = " + _
'FormatNumber(sngYOrigin) + " V" + vbCrLf
'strOutput = strOutput + "Y reference = " + _
'CStr(lngYReference) + vbCrLf strOutput = strOutput + "Volts/Div = " + _
FormatNumber(lngVSteps * sngYIncrement / 8) + _ " V" + vbCrLf
strOutput = strOutput + "Offset = " + _ FormatNumber((lngVSteps / 2 - lngYReference) * _ sngYIncrement + sngYOrigin) + " V" + vbCrLf
strOutput = strOutput + "Sec/Div = " + _ FormatNumber(lngPoints * dblXIncrement / 10 * _ 1000000) + " us" + vbCrLf
strOutput = strOutput + "Delay = " + _ FormatNumber(((lngPoints / 2 - lngXReference) * _ dblXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLf
'QUERY_WAVE_DATA - Outputs waveform data that is stored in a buffer.
'Query the oscilloscope for the waveform data.
myScope.WriteString ":WAV:DATA?"
'READ_WAVE_DATA - The wave data consists of two parts: the header,
'and the actual waveform data followed by a new line (NL) character.
'The query data has the following format:
'
'<header><waveform_data><NL>
'Where:
'<header> = #800001000 (This is an example header)
'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. You can then read that number of bytes from the
'oscilloscope and the terminating NL character.
'
Dim lngI As Long
Dim lngDataValue As Long
' Unsigned integer bytes.
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
For lngI = 0 To UBound(varQueryResult) _
422 | Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Reference |