Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1104

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

Advertisement

39
Programming Examples
VisaComError:
End Sub
Private Sub DoCommand(command As String)
VisaComError:
End Sub
Private Sub DoCommandIEEEBlock(command As String, data As Variant)
1104
Debug.Print "Number of data values: " + _
CStr(UBound(varQueryResult) + 1)
' 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
Dim lngI As Long
For lngI = 0 To UBound(varQueryResult)
lngDataValue = varQueryResult(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.
MsgBox "Waveform format BYTE data written to " + _
"c:\scope\data\waveform_data.csv."
Exit Sub
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End
On Error GoTo VisaComError
myScope.WriteString command
CheckInstrumentErrors
Exit Sub
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents