Agilent Technologies InfiniiVision 3000 X-Series Programmer's Manual page 1243

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

Advertisement

Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
Debug.Print "Acquisition type: HRESolution"
End If
Debug.Print "Waveform points: " + _
FormatNumber(lngPoints, 0)
Debug.Print "Waveform average count: " + _
FormatNumber(lngCount, 0)
Debug.Print "Waveform X increment: " + _
Format(dblXIncrement, "Scientific")
Debug.Print "Waveform X origin: " + _
Format(dblXOrigin, "Scientific")
Debug.Print "Waveform X reference: " + _
FormatNumber(lngXReference, 0)
Debug.Print "Waveform Y increment: " + _
Format(sngYIncrement, "Scientific")
Debug.Print "Waveform Y origin: " + _
FormatNumber(sngYOrigin, 0)
Debug.Print "Waveform Y reference: " + _
FormatNumber(lngYReference, 0)
' Get the waveform data
Dim lngNumBytes As Long
lngNumBytes = DoQueryIEEEBlock_Bytes(":WAVeform:DATA?")
Debug.Print "Number of data values: " + _
CStr(lngNumBytes - CInt(Chr(byteArray(1))) - 2)
' Set up output file:
strPath = "c:\scope\data\waveform_data.csv"
' Open file for output.
Open strPath For Output Access Write Lock Write As hFile
' Output waveform data in CSV format.
Dim lngDataValue As Long
' Skip past header.
For lngI = CInt(Chr(byteArray(1))) + 2 To lngNumBytes - 2
lngDataValue = CLng(byteArray(lngI))
' Write time value, voltage value.
Print #hFile, _
FormatNumber(dblXOrigin + (lngI * dblXIncrement), 9) + _
", " + _
FormatNumber(((lngDataValue - lngYReference) * _
sngYIncrement) + sngYOrigin)
Next lngI
' Close output file.
Close hFile
' Close file.
Programming Examples
1243
40

Advertisement

Table of Contents
loading

Table of Contents