Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1106

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

Advertisement

39
Programming Examples
VisaComError:
End Function
Private Function DoQueryIEEEBlock_UI1(query As String) As Variant
VisaComError:
End Function
Private Sub CheckInstrumentErrors()
1106
Dim strErrors As String
myScope.WriteString query
DoQueryNumbers = myScope.ReadList
CheckInstrumentErrors
Exit Function
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
On Error GoTo VisaComError
myScope.WriteString query
DoQueryIEEEBlock_UI1 = myScope.ReadIEEEBlock(BinaryType_UI1)
CheckInstrumentErrors
Exit Function
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
On Error GoTo VisaComError
Dim strErrVal As String
Dim strOut As String
myScope.WriteString ":SYSTem:ERRor?"
strErrVal = myScope.ReadString
While Val(strErrVal) <> 0
strOut = strOut + "INST Error: " + strErrVal
myScope.WriteString ":SYSTem:ERRor?"
strErrVal = myScope.ReadString
Wend
If Not strOut = "" Then
MsgBox strOut, vbExclamation, "INST Error Messages"
myScope.FlushWrite (False)
myScope.FlushRead
End If
Exit Sub
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
' Query any errors data.
' Read: Errnum,"Error String".
' End if find: 0,"No Error".
' Request error message.
' Read error message.

Advertisement

Table of Contents
loading

Table of Contents