Agilent Technologies InfiniiVision 4000 X-Series Programmer's Manual page 1030

Oscilloscopes
Hide thumbs Also See for InfiniiVision 4000 X-Series:
Table of Contents

Advertisement

33
:WAVeform Commands
See complete example programs at:
starting on page 1217
1030
'
'
<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.
' 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
varQueryResult = myScope.ReadIEEEBlock(BinaryType_UI1)
' Unsigned integer bytes.
For lngI = 0 To UBound(varQueryResult) _
Step (UBound(varQueryResult) / 20)
If intBytesPerData = 2 Then
lngDataValue = varQueryResult(lngI) * 256 _
+ varQueryResult(lngI + 1)
Else
lngDataValue = varQueryResult(lngI)
End If
strOutput = strOutput + "Data point " + _
CStr(lngI / intBytesPerData) + ", " + _
FormatNumber((lngDataValue - lngYReference) _
* sngYIncrement + sngYOrigin) + " V, " + _
FormatNumber(((lngI / intBytesPerData - lngXReference) _
* sngXIncrement + dblXOrigin) * 1000000) + " us" + vbCrLf
Next lngI
MsgBox "Waveform data:" + vbCrLf + strOutput
Agilent InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide
' 20 points.
' 16-bit value.
' 8-bit value.
Chapter
41, "Programming Examples,"
The

Advertisement

Table of Contents
loading

Table of Contents