Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1030

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs
VisaComError:
End Function
Private Function DoQueryIEEEBlock_I2(query As String) As Variant
VisaComError:
End Function
Private Sub CheckInstrumentErrors()
VisaComError:
1030
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
myScope.WriteString query
DoQueryIEEEBlock_I2 = myScope.ReadIEEEBlock(BinaryType_I2)
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? STRing"
strErrVal = myScope.ReadString
While Val(strErrVal) <> 0
strOut = strOut + "INST Error: " + strErrVal
myScope.WriteString ":SYSTem:ERRor? STRing" ' Request error message.
strErrVal = myScope.ReadString
Wend
If Not strOut = "" Then
MsgBox strOut, vbExclamation, "INST Error Messages"
myScope.FlushWrite (False)
myScope.FlushRead
End If
Exit Sub
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
' Query any errors data.
' Read: Errnum,"Error String".
' End if find: 0,"No Error".
' Read error message.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents