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

Table of Contents

Advertisement

12
Programming Examples
ErrorHandler:
End Sub
Private Sub DoCommand(command As String)
ErrorHandler:
End Sub
Private Function DoCommandIEEEBlock(command As String, _
906
' 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 = 10 To lngNumBytes - 2
lngDataValue = CLng(byteArray(lngI))
' Write time value, voltage value.
Print #hFile, _
Format(dblXOrigin + lngI * dblXIncrement, "Scientific") + _
", " + _
FormatNumber((lngDataValue - dblYReference) * dblYIncrement + _
dblYOrigin)
Next lngI
' Close output file.
Close hFile
' Close file.
MsgBox "Waveform format BYTE data written to " + _
"c:\scope\data\waveform_data.csv."
Exit Sub
MsgBox "*** Error : " + Error, vbExclamation
End
On Error GoTo ErrorHandler
Call ivprintf(id, command + vbLf)
CheckForInstrumentErrors command
Exit Sub
MsgBox "*** Error : " + Error, vbExclamation
End
lngBlockSize As Long)
On Error GoTo ErrorHandler
' Send command part.
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
' Skip past 10-byte header.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents