Agilent Technologies InfiniiVision 7000A Series Programmer's Manual page 860

Table of Contents

Advertisement

12
Programming Examples
End Sub
Private Sub DoCommand(command As String)
860
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: " + _
Format(sngYOrigin, "Scientific")
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)
' 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
For lngI = 0 To lngNumBytes - 1
lngDataValue = CLng(byteArray(lngI))
' Write time value, voltage value.
Print #hFile, _
Format((lngI - lngXReference) * dblXIncrement + _
dblXOrigin, "Scientific") + ", " + _
FormatNumber((lngDataValue - lngYReference) * _
sngYIncrement + sngYOrigin)
Next lngI
' Close output file.
Close hFile
' Close file.
MsgBox "Waveform format BYTE data written to " + _
"c:\scope\data\waveform_data.csv."
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents