Agilent Technologies InfiniiVision 2000 X-Series Programmer's Manual page 898

Oscilloscopes
Hide thumbs Also See for InfiniiVision 2000 X-Series:
Table of Contents

Advertisement

38
Programming Examples
End Function
Private Function DoQueryIEEEBlock_Bytes(query As String) As Long
ErrorHandler:
End Function
Private Sub CheckInstrumentErrors()
.
898
MsgBox "*** Error : " + Error, vbExclamation
End
On Error GoTo ErrorHandler
' Send query.
Call ivprintf(id, query + vbLf)
' Read definite-length block bytes.
Sleep 2000
' Delay before reading data.
Call ifread(id, byteArray(), ByteArraySize, vbNull, retCount)
' Get number of block length digits.
Dim intLengthDigits As Integer
intLengthDigits = CInt(Chr(byteArray(1)))
' Get block length from those digits.
Dim strBlockLength As String
strBlockLength = ""
Dim i As Integer
For i = 2 To intLengthDigits + 1
strBlockLength = strBlockLength + Chr(byteArray(i))
Next
' Return number of bytes in block plus header.
DoQueryIEEEBlock_Bytes = CLng(strBlockLength) + intLengthDigits + 2
CheckInstrumentErrors
Exit Function
MsgBox "*** Error : " + Error, vbExclamation
End
On Error GoTo ErrorHandler
Dim strErrVal As String * 200
Dim strOut As String
Call ivprintf(id, ":SYSTem:ERRor?" + vbLf)
Call ivscanf(id, "%200t", strErrVal)
While Val(strErrVal) <> 0
strOut = strOut + "INST Error: " + strErrVal
Call ivprintf(id, ":SYSTem:ERRor?" + vbLf)
Call ivscanf(id, "%200t", strErrVal)
Wend
Agilent InfiniiVision 2000 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