1258 Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide34 :WAVeform CommandsFormatNumber(lngVSteps * sngYIncrement / 8) + _" V" + vbCrLfstrOutput = strOutput + "Offset = " + _FormatNumber((lngVSteps / 2 - lngYReference) * _sngYIncrement + sngYOrigin) + " V" + vbCrLfstrOutput = strOutput + "Sec/Div = " + _FormatNumber(lngPoints * dblXIncrement / 10 * _1000000) + " us" + vbCrLfstrOutput = 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:'' '' Where:' = #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 LongDim lngDataValue As Long' Unsigned integer bytes.varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)For lngI = 0 To UBound(varQueryResult) _Step (UBound(varQueryResult) / 20) ' 20 points.If intBytesPerData = 2 ThenlngDataValue = varQueryResult(lngI) * 256 _+ varQueryResult(lngI + 1) ' 16-bit value.ElselngDataValue = varQueryResult(lngI) ' 8-bit value.End IfstrOutput = strOutput + "Data point " + _CStr(lngI / intBytesPerData) + ", " + _FormatNumber((lngDataValue - lngYReference) _* sngYIncrement + sngYOrigin) + " V, " + _FormatNumber(((lngI / intBytesPerData - lngXReference) _* sngXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLfNext lngIMsgBox "Waveform data:" + vbCrLf + strOutputSee complete example programs at: Chapter 42, “Programming Examples,”starting on page 1437